Doxygen

From Bohemia Interactive Community
Revision as of 18:00, 24 May 2023 by Lou Montana (talk | contribs) (Page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
🏗
This article is a work in progress!


Doxygen is a tool that generates documentation from code comment respecting a certain format.

What is not documented does not exist!


Project Documentation

Arma Reforger
Arma Reforger's Doxygen documentation can be found here.


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 //--- separator and must ideally document the method's purpose, its parameters, and its return value.

Always amend the documentation when changing a method's signature!

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

//! a member variable can be documented like this protected float m_fVar1; protected float m_fVar2; //!< or like this - the '<' symbol states "document what just precedes"


See Also