C ++ doxygen document class templates
I'm trying to document the following:
template <class T, int NDim>
class myClass {
public:
.
.
here doxygen
/*!
* \class myClass<T, NDim>
* \brief Defines a class for stuff.
*/
Spawning gives:
MyClass class reference
Defines the class for the material.
So I am missing information about templates, but this is not the end of the world as I know doxygen does not deal with templates. The main problems are warning during generation:
myClass.h: 2: warning: name `T 'supplied as argument \ class, \ struct, \ union or \ include is not an input file
How can I resolve this warning?
source to share
AFAIK you don't need to explicitly specify \class
, doxygen should auto-detect the class name as you put the documentation just before the template class declaration
/** << NOTE
* \brief Defines a class for stuff.
* \tparam T Type to work with.
* \tparam NDim Number of dimensions.
*/
template <class T, int NDim>
class myClass {
public:
.
.
};
To specify documentation for template parameters, use \tparam
.
Also note: use <
and >
will be interpreted as inline HTML tags by doxygen. Use \<
and instead \>
.
source to share