Reputation: 1661
Im trying to document the following:
template <class T, int NDim>
class myClass {
public:
.
.
here's the doxygen
/*!
* \class myClass<T, NDim>
* \brief Defines a class for stuff.
*/
Generation yields:
myClass Class Reference
Defines a class for stuff.
So i'm missing the template information, but thats not the end of the world since i know that doxygen doesn't deal with templates well. The main problems is the warning during generation:
myClass.h:2: warning: the name `T' supplied as the argument of the \class, \struct, \union, or \include command is not an input file
How can i resolve this warning?
Upvotes: 9
Views: 13455
Reputation: 1
AFAIK it's not necessary to specify \class
explicitly, doxygen should detect the class name automatically, as long you put the documentation immediately 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: Usage of <
and >
will be interpreted as inline HTML tags by doxygen. Use \<
and \>
instead.
Upvotes: 12