Cuberite Forum

Full Version: Documentation drive
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
So far this is only supplementary information. The APIDump still doesn't do anything else than class reference. It has nothing on hooks, doesn't really promote using named constants, and has nothing on the style or some techniques. I think hooks are the next thing to add.

The HTML is generated completely by the plugin, by hand. It just writes the bare HTML files out from the information it collects on the exported classes. Have a look at APIDump's main.lua file. It has a DumpAPIHtm() function that does it all - it queries the exported API (by calling CreateAPITables() ), then matches that API to the documentation provided in the APIDesc file (ReadDescriptions() ), and finally spits out the class index file along with a file for each class (WriteHtmlClass() ). You can see pieces of HTML interspersed in the code. Does that answer what you were asking, or did I misunderstand the question?

I'm gonna document the cPluginManager class, it has seen a lot of changes since the API was last written.
cPluginManager done.

I'm thinking about trying to write some kind of an automatic harvestor for the undocumented functions' parameters and descriptions from the C++ headers. Nothing fancy, just doing a big search over the entire .h file for the function name and seeing if it has a doxycomment above it; and maybe even parsing the Bindings.cpp for the function args.
Am I the only one... who documents things? I've seen only one other commit into APIDump's definitions, by STR (thank you, sir, for not letting me be alone in this); that is not what I'd call "active". Come on, is it really that difficult? Just pick a class, copy the skeleton from "undocumented.lua", open up the C++ header file declaring that class and copy over the functions' descriptions.
cEntity's my next goal. I expect a few functions there to be obsolete, exported when they should not be, in need of renaming etc.
I did cServer yesterday but i didn't commit it. I wil do that when I get home.
(09-27-2013, 05:33 PM)xoft Wrote: [ -> ]cEntity's my next goal. I expect a few functions there to be obsolete, exported when they should not be, in need of renaming etc.

Ah, stawp! I was doing that, do you want to continue?
Already done and pushed. You should have said you were doing itTongue
Ah, I'll stay with red stone then. I can't find any speed decreases with a deque though.
Now doing cPlugin.
I'll write up the cLineBlockTracer docs. Need to take my mind off the stupid HTTP for a while.

Done.
Pages: 1 2 3 4 5 6 7