I have a class that does not actually exist, but is defined using a macro:
#define DEFCLASS(name,datatype) Class name { \
public: \
void clear(); \
datatype obj; \
};
DEFMETHOD(StringContainer, const char*)
...
StringContainer foo("hi!");
Of course, this should have been implemented using templates, but I did not write it, I can’t change it, and its large base is based on it.
Now the question is, what would I like to document StringContainer in doxygen. However, this is not a class that really exists, so if I do this:
/*!
\class StringContainer
\brief A string container
\fn void StringContainer::clear()
\brief Clears the container
*/
I get warnings from oxygen:
warning: documented function `StringContainer::clear' was not declared or defined.
And the documentation does not contain this function. I know this is a bit complicated, but is there a way to get doxygen to have “faith” and create documentation for StringContainer, although it is not defined in the source code?
Decision
.h, doxygen , , . .dox. , .dox, :
class StringContainer {
public:
void clear();
const char *obj;
};
, StringContainer.