2017-03-25 59 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

相關問題