doc: clarify doxygen grouping
This commit is contained in:
committed by
Tommaso Pecorella
parent
e70c07547d
commit
edbcba3cca
@@ -798,6 +798,70 @@ that usage is consistent within a file.
|
||||
MyClass(int n);
|
||||
};
|
||||
|
||||
All the functions and variables must be documented, with the exception of
|
||||
member functions inherited from parent classes (the documentaion is copied
|
||||
automatically from the parent class), and default constructor/destructor.
|
||||
|
||||
It is strongly suggested to use grouping to bind together logically related
|
||||
classes (e.g., all the classes in a module). E.g.;
|
||||
|
||||
.. sourcecode:: cpp
|
||||
|
||||
/**
|
||||
* \defgroup mynewmodule This is a new module
|
||||
*/
|
||||
|
||||
/**
|
||||
* \ingroup mynewmodule
|
||||
*
|
||||
* MyClassOne description.
|
||||
*/
|
||||
class MyClassOne
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* \ingroup mynewmodule
|
||||
*
|
||||
* MyClassTwo description.
|
||||
*/
|
||||
class MyClassTwo
|
||||
{
|
||||
};
|
||||
|
||||
In the tests for the module, it is suggested to add an ancillary group:
|
||||
|
||||
.. sourcecode:: cpp
|
||||
|
||||
/**
|
||||
* \defgroup mynewmodule-test Tests for new module
|
||||
* \ingroup mynewmodule
|
||||
* \ingroup tests
|
||||
*/
|
||||
|
||||
/**
|
||||
* \ingroup mynewmodule-tests
|
||||
* \brief MyNewModule Test
|
||||
*/
|
||||
class MyNewModuleTest : public TestCase
|
||||
{
|
||||
};
|
||||
|
||||
/**
|
||||
* \ingroup mynewmodule-tests
|
||||
* \brief MyNewModule TestSuite
|
||||
*/
|
||||
class MyNewModuleTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
MyNewModuleTestSuite();
|
||||
};
|
||||
|
||||
/**
|
||||
* \ingroup mynewmodule-tests
|
||||
* Static variable for test initialization
|
||||
*/
|
||||
static MyNewModuleTestSuite g_myNewModuleTestSuite;
|
||||
|
||||
As for comments within the code, comments should be used to describe intention
|
||||
or algorithmic overview where is it not immediately obvious from reading the
|
||||
|
||||
Reference in New Issue
Block a user