开发者

how to document generated constructors in doxygen

We use doxygen to document our classes. I would like to explicitly document that a class has generated constructors and/or destructors, to indicate that I've thought about it and decided that e.g. copying using the generated copy constructor is safe. However, the constructor/destructor is not declared and hence doxygen does not know to which function the documentation belongs. Are there ways to make doxygen include function comments even if the function is never declared?

//! The Foo class documentation
class Foo {
    //! @fn Foo(const Foo&) 
    //! Generated copy constructor OK开发者_如何学JAVA to use

    //! method documentation
    void method();
}

Also I wouldn't want to write the signature of the generated files at all.

I guess my other option is to just describe it in the class header. Are there any other approaches?


If you use the = default notion introduced in C++0x for your default generated constructors, doxygen should pick them up

http://www2.research.att.com/~bs/C++0xFAQ.html#default

I don't know if doxygen has implemented the C++0x new keywords and patterns yet though

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜