ug4
|
The following Coding Style is recommended for ug.
m_
followed by a lower camel case style m_p
_
I
T
Files are named by using lower case letters and separating each word by an underscore _
. Please try to separate declaration and definition (implementation) into separate files:
*.h
— files contain the declaration of functions and classes *_impl.h
— files contain the implementation of inline and template functions/classes *.cpp
— files contain the rest of the implementation Example:
domain_util.h
domain_util_impl.h
domain_util.cpp
In ug4 Doxygen is used to document the code (see http://www.doxygen.org). The JavaDoc style is the preferred documentation style.
Documentation of functions should be placed at their declaration not implementation respectively defintion (if split up into different files).
See the Doxygen Quick Reference for the most important commands and how to use them.
/** * \brief A brief documentation * * A long description of the class. * * \tparam TParam The docu of the template Parameter */ template <typename TParam> class SomeClass { public: /** * \brief short docu of member function * * long docu of the member function * * \param[out] firstParam docu of outgoing parameter * \param[in] secondParam docu of ingoing parameter * \return \c true docu of return value */ bool some_member_function(int& firstParam, const int secondParam); }