简体   繁体   English

如何在doxygen中记录生成的构造函数

[英]how to document generated constructors in doxygen

We use doxygen to document our classes. 我们使用doxygen来记录我们的课程。 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 eg 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. 但是,没有声明构造函数/析构函数,因此doxygen不知道文档属于哪个函数。 Are there ways to make doxygen include function comments even if the function is never declared? 有没有办法让doxygen包括函数注释,即使函数从未被声明?

//! The Foo class documentation
class Foo {
    //! @fn Foo(const Foo&) 
    //! Generated copy constructor OK 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 如果你使用C ++ 0x中引入的= default概念作为默认生成的构造函数,doxygen应该选择它们

http://www2.research.att.com/~bs/C++0xFAQ.html#default 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 我不知道doxygen是否实现了C ++ 0x新的关键字和模式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM