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

问题描述 投票:-2回答:1

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

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

c++ codeblocks doxygen
1个回答
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

© www.soinside.com 2019 - 2024. All rights reserved.