Warren Young wrote:
> I've got a project converted over to Doxygen, and for the most part it's
> working fine. But there are two instances where I want Doxygen to
> ignore something, unconditionally, no questions asked.
>
> The first problem instance is that I have some macros that are used
> internally only, and Doxygen warns that they're undocumented. I don't
> really want to document them, but to placate Doxygen I've tried anyway,
> and nothing makes the warnings go away. I'd prefer to just tell
> Doxygen, "ignore this bit, please". I've tried \if, but the macros
> still generate warnings; other undocumented declarations (not macros)
> within that \if block do get ignored, however. Here's one example of
> the code, in case it matters:
>
> #define oprsw(opr, other, conv) \
> template<class Str> \
> inline other operator opr (ColData_Tmpl<Str> x, other y) \
> {return static_cast<conv>(x) opr y;} \
> template<class Str> \
> inline other operator opr (other x, ColData_Tmpl<Str> y) \
> {return x opr static_cast<conv>(y);}
>
> The warning is, "Member oprsw(opr, other, conv) of file coldata.h is not
> documented." If anything, I'd want to document instantiations of this
> macro, not the macro itself.
>
> The second instance I'd like Doxygen to ignore is the guts of a legacy
> header file. I want to have a \file comment to document why the file
> exists, but I don't want it to try and parse anything in the file. This
> legacy file exists to preserve source compatibility for a library, and I
> really don't want to document its internals. All I want is a page in
> the Doxygen output explaining that this is an obsolete file and that new
> code should use its replacement. The problem is, Doxygen still tries to
> generate the #include graph, which takes time, for no good purpose. I
> can leave out the \file comment, which solves the processing time
> problem and the wish to not have the file's internals documented, but
> then I end up with an entry in the File List with no explanation of why
> the file exists.
>
> Both of these problems could be solved if I can find a way to make
> Doxygen ignore a section of code completely.
I think PREDEFINED is your keyword. This defines macros for Doxygen C++
parser. Therefore, adding the following line to your configuration file :
PREDEFINED = DOXYGEN_IGNORE
and adding
#ifndef DOXYGEN_IGNORE
// all this is ignored by doxygen, put whatever you want here
#endif
will help you much :)
Regards,
Yann
|