如何获取doxygen来记录.tcc文件中定义的模板类?

时间:2017-03-25 18:00:53

标签: c++ codeblocks doxygen

我使用Code::Blocks创建了一个C++项目。我有三个项目文件:一个.hxx文件,其中包含类模板的声明;一个.tcc文件,其中定义并记录了类模板的成员函数;和.cxx文件,其中包含测试类实例的程序。我使用doxygen中的Code::Blocks接口来记录所有文件。但是,当我使用doxygen接口生成项目的文档时,doxygen生成的文档不包含.tcc文件中的实现代码和文档。

有人知道我应该怎样做才能doxygen.tcc文件中生成文档?任何有关解决这个问题的帮助都将受到高度赞赏。

1 个答案:

答案 0 :(得分:2)

来自标准的Doxyfile

#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
# The INPUT tag is used to specify the files and/or directories that contain
# documented source files. You may enter file names like myfile.cpp or
# directories like /usr/src/myproject. Separate the files or directories with
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = path/to/src/dir

# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
# *.h) to filter out the source-files in the directories.
#
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# read by doxygen.
#
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,
# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.

FILE_PATTERNS          = *.tcc *.cxx *.hxx

另见:

Doxygen input file documentation

Doxygen file pattern documentation