doxygen_manual-1.8.1 (1035109), страница 18
Текст из файла (страница 18)
By dividing the sources into several "packages", the sources of one package can be parsed bydoxygen, while all other packages that this package depends on, are linked in externally. This saves a lot ofmemory.Availability: For some projects that are documented with doxygen, the sources may just not be available.Copyright issues: If the external package and its documentation are copyright someone else, it may be better - oreven necessary - to reference it rather than include a copy of it with your project’s documentation.
When theauthor forbids redistribution, this is necessary. If the author requires compliance with some license conditionas a precondition of redistribution, and you do not want to be bound by those conditions, referring to theircopy of their documentation is preferable to including a copy.If any of the above apply, you can use doxygen’s tag file mechanism. A tag file is basically a compact representationof the entities found in the external sources. Doxygen can both generate and read tag files.To generate a tag file for your project, simply put the name of the tag file after the GENERATE_TAGFILE option inthe configuration file.To combine the output of one or more external projects with your own project you should specify the name of thetag files after the TAGFILES option in the configuration file.A tag file typically only contains a relative location of the documentation from the point where doxygen was run.So when you include a tag file in other project you have to specify where the external documentation is locatedin relation this project.
You can do this in the configuration file by assigning the (relative) location to the tag filesspecified after the TAGFILES configuration option. If you use a relative path it should be relative with respect to thedirectory where the HTML output of your project is generated; so a relative path from the HTML output directory ofa project to the HTML output of the other project that is linked to.Example:Suppose you have a project proj that uses two external projects called ext1 and ext2.
The directorystructure looks as follows:76Link to external documentation<root>+- proj|+- html|+- src||- proj.cpp+- ext1|+- html||- ext1.tag+- ext2|+- html||- ext2.tag|- proj.cfg|- ext1.cfg|- ext2.cfgHTML output directory for projsources for projHTML output directory for ext1tag file for ext1HTML output directorytag file for ext2doxygen configurationdoxygen configurationdoxygen configurationfor ext2file for projfile for ext1file for ext2Then the relevant parts of the configuration files look as follows:proj.cfg:OUTPUT_DIRECTORYINPUTTAGFILES= proj= proj/src= ext1/ext1.tag=../../ext1/html \ext2/ext2.tag=../../ext2/htmlext1.cfg:OUTPUT_DIRECTORYGENERATE_TAGFILE= ext1= ext1/ext1.tagext2.cfg:OUTPUT_DIRECTORYGENERATE_TAGFILE= ext2= ext2/ext2.tagGenerated by DoxygenChapter 15Frequently Asked Questions1.
How to get information on the index page in HTML?You should use the \mainpage command inside a comment block like this:/*! \mainpage My Personal Index Page** \section intro_sec Introduction** This is the introduction.** \section install_sec Installation** \subsection step1 Step 1: Opening the box** etc...*/2. Help, some/all of the members of my class / file / namespace are not documented?Check the following:(a) Is your class / file / namespace documented? If not, it will not be extracted from the sources unlessEXTRACT_ALL is set to YES in the config file.(b) Are the members private? If so, you must set EXTRACT_PRIVATE to YES to make them appear inthe documentation.(c) Is there a function macro in your class that does not end with a semicolon (e.g.
MY_MACRO())? If sothen you have to instruct doxygen’s preprocessor to remove it.This typically boils down to the following settings in the config file:ENABLE_PREPROCESSINGMACRO_EXPANSIONEXPAND_ONLY_PREDEFPREDEFINED====YESYESYESMY_MACRO()=Please read the preprocessing section of the manual for more information.3.
When I set EXTRACT_ALL to NO none of my functions are shown in the documentation.In order for global functions, variables, enums, typedefs, and defines to be documented you should documentthe file in which these commands are located using a comment block containing a \file (or @file) command.Alternatively, you can put all members in a group (or module) using the \ingroup command and then documentthe group using a comment block containing the \defgroup command.For member functions or functions that are part of a namespace you should document either the class ornamespace.4. How can I make doxygen ignore some code fragment?The new and easiest way is to add one comment block with a \cond command at the start and one commentblock with a \endcond command at the end of the piece of code that should be ignored.
This should be withinthe same file of course.But you can also use Doxygen’s preprocessor for this: If you put78Frequently Asked Questions#ifndef DOXYGEN_SHOULD_SKIP_THIS/* code that must be skipped by Doxygen */#endif /* DOXYGEN_SHOULD_SKIP_THIS */around the blocks that should be hidden and put:PREDEFINED = DOXYGEN_SHOULD_SKIP_THISin the config file then all blocks should be skipped by Doxygen as long as PREPROCESSING = YES.5. How can I change what is after the #include in the class documentation?In most cases you can use STRIP_FROM_INC_PATH to strip a user defined part of a path.You can also document your class as follows/*! \class MyClassName include.h path/include.h** Docs for MyClassName*/To make doxygen put#include <path/include.h>in the documentation of the class MyClassName regardless of the name of the actual header file in which thedefinition of MyClassName is contained.If you want doxygen to show that the include file should be included using quotes instead of angle bracketsyou should type:/*! \class MyClassName myhdr.h "path/myhdr.h"** Docs for MyClassName*/6.
How can I use tag files in combination with compressed HTML?If you want to refer from one compressed HTML file a.chm to another compressed HTML file called b.chm,the link in a.chm must have the following format:<a href="b.chm::/file.html">Unfortunately this only works if both compressed HTML files are in the same directory.As a result you must rename the generated index.chm files for all projects into something unique and putall .chm files in one directory.Suppose you have a project a referring to a project b using tag file b.tag, then you could rename theindex.chm for project a into a.chm and the index.chm for project b into b.chm.
In the configurationfile for project a you write:TAGFILES = b.tag=b.chm::or you can use installdox to set the links as follows:installdox -lb.tag@b.chm::7. I don’t like the quick index that is put above each HTML page, what do I do?You can disable the index by setting DISABLE_INDEX to YES. Then you can put in your own header file bywriting your own header and feed that to HTML_HEADER.8. The overall HTML output looks different, while I only wanted to use my own html header fileYou probably forgot to include the stylesheet doxygen.css that doxygen generates. You can include thisby putting<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">Generated by Doxygen79in the HEAD section of the HTML page.9.
Why does doxygen use Qt?The most important reason is to have a platform abstraction for most Unices and Windows by means of theQFile, QFileInfo, QDir, QDate, QTime and QIODevice classes. Another reason is for the nice and bug freeutility classes, like QList, QDict, QString, QArray, QTextStream, QRegExp, QXML etc.The GUI front-end doxywizard uses Qt for... well... the GUI!10. How can I exclude all test directories from my directory tree?Simply put an exclude pattern like this in the configuration file:EXCLUDE_PATTERNS = */test/*11. Doxygen automatically generates a link to the class MyClass somewhere in the running text. How doI prevent that at a certain place?Put a % in front of the class name. Like this: %MyClass.
Doxygen will then remove the % and keep the wordunlinked.12. My favorite programming language is X. Can I still use doxygen?No, not as such; doxygen needs to understand the structure of what it reads. If you don’t mind spending sometime on it, there are several options:• If the grammar of X is close to C or C++, then it is probably not too hard to tweak src/scanner.l a bitso the language is supported. This is done for all other languages directly supported by doxygen (i.e.Java, IDL, C#, PHP).• If the grammar of X is somewhat different than you can write an input filter that translates X intosomething similar enough to C/C++ for doxygen to understand (this approach is taken for VB, ObjectPascal, and Javascript, see http://www.stack.nl/∼dimitri/doxygen/download.html#helpers).• If the grammar is completely different one could write a parser for X and write a backend that producesa similar syntax tree as is done by src/scanner.l (and also by src/tagreader.cpp while reading tag files).13.
Help! I get the cryptic message "input buffer overflow, can’t enlarge buffer because scanner usesREJECT"This error happens when doxygen’s lexical scanner has a rule that matches more than 256K of input characters in one go. I’ve seen this happening on a very large generated file (>256K lines), where the built-inpreprocessor converted it into an empty file (with >256K of newlines). Another case where this might happenis if you have lines in your code with more than 256K characters.If you have run into such a case and want me to fix it, you should send me a code fragment that triggers themessage.
To work around the problem, put some line-breaks into your file, split it up into smaller parts, orexclude it from the input using EXCLUDE.14. When running make in the latex dir I get "TeX capacity exceeded". Now what?You can edit the texmf.cfg file to increase the default values of the various buffers and then run "texconfig init".15. Why are dependencies via STL classes not shown in the dot graphs?Doxygen is unaware of the STL classes, unless the option BUILTIN_STL_SUPPORT is turned on.16.