Developers Documentation

RRRR
edited October 2012 in Development
**A Reference Library** is taking form! This will take awhile, and you're free to contribute with whatever you can. :)

**The whole documentation** is found here: <a href="http://netresponsibility.com/dev/docs/">http://netresponsibility.com/dev/docs/</a>, and it's generated by a utility called PocoDoc. PocoDoc is mainly targeting the Poco library, but I've made the choice to use it for Net Responsibility as well, so if you're already familiar with Poco's documentation, you will feel comfortable with this one too. Also, all Poco components used are included in our docs, just for simplicity.

**Note that you do not need** the utility PocoDoc to get going with adding your own documentation. It's enough to submit the changes to our Mercurial repo, and they will be processed later on. However, if you wish to generate your own docs, a very simple thread to get going is <a href="http://pocoproject.org/forum/viewtopic.php?f=12&t=3839#p6017">found here</a>.

**The documenting is done** within the header files (./include/*.h). Simply add some triple slash comments after class definitions or method definitions. It may look like this:

class BootHistory
/// BootHistory processes the computer's boot history to determine whether or
/// not Net Responsibility has been shut down manually.
///
/// Almost all code is taken from the Linux command "last", so credit goes to
/// Miquel van Smoorenburg, miquels@cistron.nl
{
public:
BootHistory();
int getBootTime();
/// Get the unix timestamp of when the current session booted.

int getHaltTime(int bootTime);
/// Get the unix timestamp of when the session with the given bootTime
/// halted.


More verbose guidelines are found in chapter 21 of <a href="http://www.appinf.com/download/CppCodingStyleGuide.pdf">this PDF</a>. For more live examples, just open up any header file of the Poco library, or look at those NR headers we've documented so far.

You may also **write your own tutorials** on anything related to Net Responsibility development. This is done by adding, or editing, *.page files to the folder called ./doc. The syntax may be a little more confusing at first, but some samples are found in ./docs/samplePage.txt. Even here you may open up .page files in the Poco libraries' doc folders to get some more examples.

**Hope this will become useful** for us developers, and I hope you will join me in the important job of documenting this project!
Sign In or Register to comment.