\page feature to define its contents. All Related Pages will be extracted from the documentation and put together as the Starter Guide. To allow this the SG has priority, i.e. all information that should go into the SG has to be put on a \page. This page should be \ref ed from the class and function documentation when it is necessary.
#ifndef to remove parts from the documentation. OSG_DOC_LEVEL is set to 1, 2 or 3, for user, extender and developer documentation. Alternatively there are the OSG_DOC_EXT and OSG_DOC_DEV defines for specific levels.
The primary use of these values is to exclude some classes from being added to the code.
#if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
class reallyInternalClass
{};
#endif // exclude from doc
If not the whole class, but only some parts of the documentation text should be only for specific groupd, the ext/endext and dev/enddev commands can be used.
/*! This class does bla. \ext To extend it you need foo. \endext \dev Internally it uses bar and baz. \enddev */
/*! \defgroup GrpBaseBaseVolume
\ingroup GrpBaseBase
...
.dox and should have a capitalized name, e.g. Material.dox. They are not collected automatically, they have to manually be inserted into the DOC_PAGES variable in the Doc/Makefile. The order of the pages in that variable also defines the order that the pages will have in the Starter Guide.
Page, followed by the library name and a name that describes the contents of the page, e.g PageSystemMaterial. Note that page names have to be unique, as every page is turned into a separate file by doxygen. The same naming convention applies to sections, subsections etc.
Per default every page is a chapter in the Doxygen LaTeX? documentation. This either turns into very few, very large pages, which are hard to read and modify, or into a large of number of small chapters in the Starter Guide. Both of which are not desirable.
Thus per default the pages in the OpenSG documenation are just turned into sections. To create a new chapter you need to add \latexonly Starter:NewChapter \endlatexonly in the page's comment, preferredly right at the top.
/*!) is used, because it allows separating the brief from the full comment.
Classes
Only the brief comment should be in the header, the full comment should be in the source. Every class should have a brief comment, as they are useful to jump to the documentation from the top of the page, and they are shown on the Compound List.
Classes should be added to their respective group(s). Groups are an important aid for useful structuring, use them and add new ones when it makes sense.
Parts
The public, protected and private parts should be marked with a line like this:
/*========================== PUBLIC =================================*/before the keyword. In general comments like this can be used to differentiate different parts, e.g. forwards from the main class or classes from each other. Methods Method shouldn't be documented in the header, good method and parameter names should speak for themselves. Instead use doxygen
\name to group them.
Example:
/*---------------------------------------------------------------------*/
/*! \name Destructors */
/*! \{ */
virtual ~BoxVolume(void);
/*! \} */
You can give a detailed documentation in the .cpp file. Note that this is not necessary for derived methods whose behaviour differs from the base classes' method, as Doxygen's "Reimplemented from" link is a very quick way to get to the documentation. Documentation should be in base classes.
Code
The ordering in the .cpp files should be:
/*! get foo value */ int getFoo(void);Don't use the
\brief comments, though. This keeps the member list at the top of the page short and concise. Just use free text for documentation, forget the structured comments like \param, they just make the documentation longer and only very rarely add important information. If there are things to know about specific parameters, especially legal and iilegal value ranges and
Do use \warning to talk about unintuitive side-effects or constraints of a method.
| Topic DocumentationStyle . { Edit | Attach | Ref-By | Printable | Diffs | r1.8 | > | r1.7 | > | r1.6 | More } |
|
Revision r1.8 - 28 Oct 2002 - 15:18 GMT - DirkReiners
Parents: DocumentationTopics |
Copyright © 2000 by the contributing authors.
All material on this collaboration tool is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |