我正在写从哪个文件已经在通过标签文件中提供外部一个抽象类,继承了我的C ++类的文档。
我不希望重写的几个继承功能的文件,因为这将只是抽象父者的复制粘贴。但是,指定自己的广告代码文件中的Doxygen的配置和启用INHERIT_DOCS
后,继承的文件仍然不存在...
我失去了一些其他的参数,或者会是这样的Doxygen的限制?
直接处理与Doxygen的工作正常父抽象类的头文件(该文件包含在子类)。此外,在我的子类中删除继承函数的声明将添加功能-group了“从ParentAbstractClass
继承功能”(但显然不再编译)。
这是我的工作树:
<root>
+- ParentAbstractClass/
| +- html/
| |- ParentAbstractClass.tag
| |- ParentAbstractClass.hpp
+- ChildClass/
| +- html/
| |- ChildClass.hpp
|- Doxyfile_child
ParentAbstractClass.hpp
的内容
/**
* @brief Parent class
*/
class ParentAbstractClass{
public:
/**
* Inherited function
* @param[in] arg: input argument
*/
virtual void inheritedFunction(const int arg)=0;
};
ChildClass.hpp
的内容
#include "ParentAbstractClass.hpp"
/**
* @brief Child class
*/
class ChildClass : public ParentAbstractClass
{
public:
// Following function should inherit the documentation from its parent
virtual void inheritedFunction(const int arg);
};
和一些相关的(我认为)在Doxyfile_child
选项:
OUTPUT_DIRECTORY = ChildClass
INHERIT_DOCS = YES
INLINE_INHERITED_MEMB = NO
TAGFILES = ParentAbstractClass/ParentAbstractClass.tag=../../ParentAbstractClass/html
我跑的Doxygen 1.8.14。
该INHERIT_DOCS
一个工作项目中。在标签文件,标志着一个外部项目,没有关于“父”功能的信息。只要你加入:
/// \copydoc ParentAbstractClass::inheritedFunction(const int arg)
如文档中ChildClass
的功能,你会得到“器具ParentAbstractClass。”与在一个ParentAbstractClass
参照的功能的功能。