Doxygen
Jump to navigation
Jump to search
Doxygen is a tool that generates documentation from code comment respecting a certain format.
Project Documentation
Bohemia Interactive Guidelines
Documentation is important:
- Document what is public (protected methods go second - people should use public methods anyway)
- Document what is important (features, concepts, specifics like variables or constants, etc)
- Document what is dangerous (performance-wise, crash-wise)
Class
Method
A method documentation goes below the
class Example
{
//------------------------------------------------------------------------------------------------
/*!
doc goes here
*/
int GetIntMethod1(bool returnPositive)
{
// method content
}
//------------------------------------------------------------------------------------------------
//! Alternative syntax
int GetIntMethod2(bool returnPositive)
{
// method content
}
}
Various parameter formats:
//! \param myParam parameter description
//! \param myParam[out] parameter description
//! \param myParam[inout] parameter description
Only one return format:
//! \return return value description
Variable
See Also
- https://www.doxygen.nl/ - the official Doxygen website
- https://www.doxygen.nl/manual/ - the official documentation