Topic: C++ SDK documentation in wiki (and how you can help)
Last night I looked into the possibility of writing a bot to edit the C++ SDK pages in the wiki using the XML output of Doxygen. After figuring out how to work with the Mediawiki API I managed to more or less spam the Recent changes list at the end of the evening (since then I've been given the "bot" status thus hiding my changes in the normal listing).
How does it work? Well, the C++ SDK documentation has now two parts: the source-code-end and the wiki-end.
Source code
To document the API we need to put comments into all the public header files in the source code that Doxygen can parse.
Start by forking my Maratis repository at GitHub:
https://github.com/dahnielson/Maratis
Switch to the development branch of your fork:
https://github.com/dahnielson/Maratis/tree/development
Add comment blocks with triple slashes (///) to header files in the MSDK/MEore/Includes and MSDK/MEngine/Includes directories:
/// This is a description of class Foo.
/// Descriptions can span several lines if you wish.
class Foo
{
/// This is a description of member function bar.
void bar();
/// This is a decription of member function baz.
/// \param qux this is description of the qux parameter
/// \return this is a description of the return value
bool baz(int qux);
};
When you are done commit the change and send me a pull-request. BTW, it is possible to edit files of your forked repository directly in your web browser on GitHub.
Wiki
My newly created bot, aptly named Doxybot, parses the XML output that Doxygen generate from the documented source code and post the documentation to a special wiki page for each class. Doxybot uses the ids created by Doxybot as page name for each class, e.g. the class MBehavior become http://wiki.maratis3d.org/index.php?tit
sMBehavior. However that is not a page intended for humans to edit manually as the bot will overwrite any changes to the pages with names prefixed by "class". Instead the bot page is transcluded into the regular page http://wiki.maratis3d.org/index.php?title=MBehavior:
{{:classMBehavior}}
Everything around the transclusion on the regular page can be edited manually as normal for additional documentation.
Last edited by Dahnielson (2014-02-08 13:26:51)