2017-03-25 28 views
-2

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

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

回答

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

+0

非常感谢您@tike。您建议的解决方案对我来说非常合适。干杯! – user24098

相关问题