Blame doc/faq.doc

Packit 1c1d7e
/******************************************************************************
Packit 1c1d7e
 *
Packit 1c1d7e
 * 
Packit 1c1d7e
 *
Packit 1c1d7e
 * Copyright (C) 1997-2015 by Dimitri van Heesch.
Packit 1c1d7e
 *
Packit 1c1d7e
 * Permission to use, copy, modify, and distribute this software and its
Packit 1c1d7e
 * documentation under the terms of the GNU General Public License is hereby 
Packit 1c1d7e
 * granted. No representations are made about the suitability of this software 
Packit 1c1d7e
 * for any purpose. It is provided "as is" without express or implied warranty.
Packit 1c1d7e
 * See the GNU General Public License for more details.
Packit 1c1d7e
 *
Packit 1c1d7e
 * Documents produced by Doxygen are derivative works derived from the
Packit 1c1d7e
 * input used in their production; they are not affected by this license.
Packit 1c1d7e
 *
Packit 1c1d7e
 */
Packit 1c1d7e
/*! \page faq Frequently Asked Questions
Packit 1c1d7e
Packit 1c1d7e
\tableofcontents
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
\section faq_index How to get information on the index page in HTML?
Packit 1c1d7e

Packit 1c1d7e
You should use the \ref cmdmainpage "\\mainpage" command inside a comment block like this:
Packit 1c1d7e
\verbatim
Packit 1c1d7e
/*! \mainpage My Personal Index Page
Packit 1c1d7e
 *
Packit 1c1d7e
 * \section intro_sec Introduction
Packit 1c1d7e
 *
Packit 1c1d7e
 * This is the introduction.
Packit 1c1d7e
 *
Packit 1c1d7e
 * \section install_sec Installation
Packit 1c1d7e
 *
Packit 1c1d7e
 * \subsection step1 Step 1: Opening the box
Packit 1c1d7e
 *  
Packit 1c1d7e
 * etc...
Packit 1c1d7e
 */
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
\section fac_al Help, some/all of the members of my class / file / namespace are not documented?
Packit 1c1d7e
Packit 1c1d7e
  Check the following:
Packit 1c1d7e
  
    Packit 1c1d7e
      
  1. Is your class / file / namespace documented? If not, it will not
  2. Packit 1c1d7e
          be extracted from the sources unless \ref cfg_extract_all "EXTRACT_ALL" is set to \c YES
    Packit 1c1d7e
          in the config file.
    Packit 1c1d7e
      
  3. Are the members private? If so, you must set \ref cfg_extract_private "EXTRACT_PRIVATE" to \c YES
  4. Packit 1c1d7e
          to make them appear in the documentation.
    Packit 1c1d7e
      
  5. Is there a function macro in your class that does not end with a
  6. Packit 1c1d7e
          semicolon (e.g. MY_MACRO())? If so then you have to instruct 
    Packit 1c1d7e
          doxygen's preprocessor to remove it.
    Packit 1c1d7e
    Packit 1c1d7e
          This typically boils down to the following settings in the config file:
    Packit 1c1d7e
    Packit 1c1d7e
          \verbatim
    Packit 1c1d7e
    ENABLE_PREPROCESSING   = YES
    Packit 1c1d7e
    MACRO_EXPANSION        = YES
    Packit 1c1d7e
    EXPAND_ONLY_PREDEF     = YES
    Packit 1c1d7e
    PREDEFINED             = MY_MACRO()=
    Packit 1c1d7e
          \endverbatim
    Packit 1c1d7e
    Packit 1c1d7e
          Please read the \ref preprocessing "preprocessing" section of the
    Packit 1c1d7e
          manual for more information.
    Packit 1c1d7e
       
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_extract_all When I set EXTRACT_ALL to NO none of my functions are shown in the documentation.
    Packit 1c1d7e
    Packit 1c1d7e
    In order for global functions, variables, enums, typedefs, and defines 
    Packit 1c1d7e
    to be documented you should document the file in which these commands are
    Packit 1c1d7e
    located using a comment block containing a \ref cmdfile "\\file" (or \ref cmdfile "\@file") 
    Packit 1c1d7e
    command. 
    Packit 1c1d7e
    Packit 1c1d7e
    Alternatively, you can put all members in a group (or module)
    Packit 1c1d7e
    using the \ref cmdingroup "\\ingroup" command and then document the group using a comment
    Packit 1c1d7e
    block containing the \ref cmddefgroup "\\defgroup" command.
    Packit 1c1d7e
    Packit 1c1d7e
    For member functions or functions that are part of a namespace you should
    Packit 1c1d7e
    document either the class or namespace.
    Packit 1c1d7e
     
    Packit 1c1d7e
    \section faq_ext_mapping My file with a custom extension is not parsed (properly) (anymore).
    Packit 1c1d7e
    Packit 1c1d7e
    Doxygen only parses files that are specified as input (via the \ref cfg_input "INPUT" tag)
    Packit 1c1d7e
    and that match a specified extension (mentioned in \ref cfg_file_patterns "FILE_PATTERNS")
    Packit 1c1d7e
    The list of files is then reduced by excluding files listed as \ref cfg_exclude "EXCLUDE" or 
    Packit 1c1d7e
    files that match the patterns set by \ref cfg_exclude_patterns "EXCLUDE_PATTERNS".
    Packit 1c1d7e
    Packit 1c1d7e
    In the past doxygen parsed all files with an unknown extension as C files which could lead to
    Packit 1c1d7e
    undesired results. Since version 1.8.8, doxygen requires that you specify a mapping that tells
    Packit 1c1d7e
    for a certain file extension, which parser to use. 
    Packit 1c1d7e
    This mapping is specified using the \ref cfg_extension_mapping "EXTENSION_MAPPING" tag.
    Packit 1c1d7e
    If no mapping is specified the file's contents will be ignored.
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_code How can I make doxygen ignore some code fragment?
    Packit 1c1d7e
    Packit 1c1d7e
    The new and easiest way is to add one comment block 
    Packit 1c1d7e
    with a \ref cmdcond "\\cond" command at the start and one comment block 
    Packit 1c1d7e
    with a \ref cmdendcond "\\endcond" command at the end of the piece of
    Packit 1c1d7e
    code that should be ignored. This should be within the same file of course.
    Packit 1c1d7e
    Packit 1c1d7e
    But you can also use doxygen's preprocessor for this: 
    Packit 1c1d7e
    If you put
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    #ifndef DOXYGEN_SHOULD_SKIP_THIS
    Packit 1c1d7e
    Packit 1c1d7e
     /* code that must be skipped by doxygen */
    Packit 1c1d7e
    Packit 1c1d7e
    #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    around the blocks that should be hidden and put:
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
      PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    in the config file then all blocks should be skipped by doxygen as long
    Packit 1c1d7e
    as \ref cfg_enable_preprocessing "ENABLE_PREPROCESSING" is set to `YES`.
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_code_inc How can I change what is after the \#include in the class documentation?
    Packit 1c1d7e
    Packit 1c1d7e
    In most cases you can use \ref cfg_strip_from_inc_path "STRIP_FROM_INC_PATH" 
    Packit 1c1d7e
    to strip a user defined part of a path.
    Packit 1c1d7e
    Packit 1c1d7e
    You can also document your class as follows
    Packit 1c1d7e
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    /*! \class MyClassName include.h path/include.h
    Packit 1c1d7e
     *
    Packit 1c1d7e
     *  Docs for MyClassName
    Packit 1c1d7e
     */
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    Packit 1c1d7e
    To make doxygen put 

    Packit 1c1d7e
    Packit 1c1d7e
    \#include \<path/include.h\>
    Packit 1c1d7e
    Packit 1c1d7e
    Packit 1c1d7e
    in the documentation of the class MyClassName regardless of the name of the actual 
    Packit 1c1d7e
    header file in which the definition of MyClassName is contained.
    Packit 1c1d7e
    Packit 1c1d7e
    If you want doxygen to show that the include file should be included using
    Packit 1c1d7e
    quotes instead of angle brackets you should type:
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    /*! \class MyClassName myhdr.h "path/myhdr.h"
    Packit 1c1d7e
     *
    Packit 1c1d7e
     *  Docs for MyClassName
    Packit 1c1d7e
     */
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_chm How can I use tag files in combination with compressed HTML?
    Packit 1c1d7e
    Packit 1c1d7e
    If you want to refer from one compressed HTML file 
    Packit 1c1d7e
    \c a.chm to another compressed HTML file 
    Packit 1c1d7e
    called \c b.chm, the
    Packit 1c1d7e
    link in \c a.chm must have the following format:
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    Unfortunately this only works if both compressed HTML files are in the same 
    Packit 1c1d7e
    directory.
    Packit 1c1d7e
    Packit 1c1d7e
    As a result you must rename the generated \c index.chm files for all projects
    Packit 1c1d7e
    into something unique and put all .chm files in one directory.
    Packit 1c1d7e
    Packit 1c1d7e
    Suppose you have a project \e a referring to a project \e b using tag file
    Packit 1c1d7e
    \c b.tag, then you could rename the \c index.chm for project \e a into
    Packit 1c1d7e
    \c a.chm and the \c index.chm for project \e b into \c b.chm. In the 
    Packit 1c1d7e
    configuration file for project \e a you write:
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    TAGFILES = b.tag=b.chm::
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_html I don't like the quick index that is put above each HTML page, what do I do?
    Packit 1c1d7e
    Packit 1c1d7e
    You can disable the index by setting \ref cfg_disable_index "DISABLE_INDEX" to `YES`. Then you can
    Packit 1c1d7e
    put in your own header file by writing your own header and feed that to
    Packit 1c1d7e
    \ref cfg_html_header "HTML_HEADER".
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_html_header The overall HTML output looks different, while I only wanted to use my own html header file
    Packit 1c1d7e
    Packit 1c1d7e
    You probably forgot to include the stylesheet doxygen.css that 
    Packit 1c1d7e
    doxygen generates. You can include this by putting
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    <LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    in the HEAD section of the HTML page.
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_use_qt Why does doxygen use Qt?
    Packit 1c1d7e
    Packit 1c1d7e
    The most important reason is to have a platform abstraction for most 
    Packit 1c1d7e
    Unices and Windows by means of the QFile, QFileInfo, QDir, QDate, 
    Packit 1c1d7e
    QTime and QIODevice classes. 
    Packit 1c1d7e
    Another reason is for the nice and bug free utility classes, like QList, 
    Packit 1c1d7e
    QDict, QString, QArray, QTextStream, QRegExp, QXML etc. 
    Packit 1c1d7e
    Packit 1c1d7e
    The GUI front-end doxywizard uses Qt for... well... the GUI!
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_excl_dir How can I exclude all test directories from my directory tree?
    Packit 1c1d7e
    Packit 1c1d7e
    Simply put an exclude pattern like this in the configuration file:
    Packit 1c1d7e
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    EXCLUDE_PATTERNS = */test/*
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_class Doxygen automatically generates a link to the class MyClass somewhere in the running text.  How do I prevent that at a certain place?
    Packit 1c1d7e
    Packit 1c1d7e
    Put a \% in front of the class name. Like this: \%MyClass. Doxygen will then
    Packit 1c1d7e
    remove the % and keep the word unlinked.
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_pgm_X My favorite programming language is X. Can I still use doxygen?
    Packit 1c1d7e
    Packit 1c1d7e
    No, not as such; doxygen needs to understand the structure of what it reads. 
    Packit 1c1d7e
    If you don't mind spending some time on it, there are several options:
    Packit 1c1d7e
    - If the grammar of X is close to C or C++, then it is probably not too hard to
    Packit 1c1d7e
      tweak src/scanner.l a bit so the language is supported. This is done
    Packit 1c1d7e
      for all other languages directly supported by doxygen 
    Packit 1c1d7e
      (i.e. Java, IDL, C#, PHP).
    Packit 1c1d7e
    - If the grammar of X is somewhat different than you can write an input
    Packit 1c1d7e
      filter that translates X into something similar enough to C/C++ for
    Packit 1c1d7e
      doxygen to understand (this approach is taken for VB, Object Pascal, and
    Packit 1c1d7e
      Javascript, see http://www.stack.nl/~dimitri/doxygen/download.html#helpers).
    Packit 1c1d7e
    - If the grammar is completely different one could write a parser for X and 
    Packit 1c1d7e
      write a backend that produces a similar syntax tree as is done by 
    Packit 1c1d7e
      src/scanner.l (and also by src/tagreader.cpp while reading tag files).
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_lex Help! I get the cryptic message "input buffer overflow, can't enlarge buffer because scanner uses REJECT"
    Packit 1c1d7e
    Packit 1c1d7e
    This error happens when doxygen's lexical scanner has a rule that matches
    Packit 1c1d7e
    more than 256K of input characters in one go. I've seen this happening 
    Packit 1c1d7e
    on a very large generated file (\>256K lines), where the built-in preprocessor 
    Packit 1c1d7e
    converted it into an empty file (with \>256K of newlines). Another case
    Packit 1c1d7e
    where this might happen is if you have lines in your code with more than
    Packit 1c1d7e
    256K characters. 
    Packit 1c1d7e
    Packit 1c1d7e
    If you have run into such a case and want me to fix it, you
    Packit 1c1d7e
    should send me a code fragment that triggers the message. To work around
    Packit 1c1d7e
    the problem, put some line-breaks into your file, split it up into smaller 
    Packit 1c1d7e
    parts, or exclude it from the input using EXCLUDE.
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_latex When running make in the latex dir I get "TeX capacity exceeded". Now what?
    Packit 1c1d7e
    Packit 1c1d7e
    You can edit the texmf.cfg file to increase the default values of the 
    Packit 1c1d7e
    various buffers and then run "texconfig init".
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_stl Why are dependencies via STL classes not shown in the dot graphs?
    Packit 1c1d7e
    Packit 1c1d7e
    Doxygen is unaware of the STL classes, unless the 
    Packit 1c1d7e
    option \ref cfg_builtin_stl_support "BUILTIN_STL_SUPPORT" is turned on.
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_search I have problems getting the search engine to work with PHP5 and/or windows
    Packit 1c1d7e
    Packit 1c1d7e
    Please read this for hints on where to look. 
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_cmdline Can I configure doxygen from the command line?
    Packit 1c1d7e
    Packit 1c1d7e
    Not via command line options, but doxygen can read from stdin,
    Packit 1c1d7e
    so you can pipe things through it. Here's an example how to override an option
    Packit 1c1d7e
    in a configuration file from the command line (assuming a UNIX like environment):
    Packit 1c1d7e
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    ( cat Doxyfile ; echo "PROJECT_NUMBER=1.0" ) | doxygen -
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    Packit 1c1d7e
    For Windows the following would do the same:
    Packit 1c1d7e
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    ( type Doxyfile & echo PROJECT_NUMBER=1.0 ) | doxygen.exe -
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    Packit 1c1d7e
    If multiple options with the same name are specified then doxygen will use 
    Packit 1c1d7e
    the last one. To append to an existing option you can use the += operator.
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_name How did doxygen get its name?
    Packit 1c1d7e
    Packit 1c1d7e
    Doxygen got its name from playing with the words 
    Packit 1c1d7e
    documentation and generator.
    Packit 1c1d7e
    Packit 1c1d7e
    \verbatim
    Packit 1c1d7e
    documentation -> docs -> dox
    Packit 1c1d7e
    generator -> gen
    Packit 1c1d7e
    \endverbatim
    Packit 1c1d7e
    Packit 1c1d7e
    At the time I was looking into \c lex and \c yacc, where a lot of things start with
    Packit 1c1d7e
    "yy", so the "y" slipped in and made things pronounceable 
    Packit 1c1d7e
    (the proper pronouncement is Docs-ee-gen, so with a long "e").
    Packit 1c1d7e
    Packit 1c1d7e
    \section faq_why What was the reason to develop doxygen?
    Packit 1c1d7e
    Packit 1c1d7e
    I once wrote a GUI widget based on the Qt library (it is still available at
    Packit 1c1d7e
    https://sourceforge.net/projects/qdbttabular/ but hasn't been updated since 2002). 
    Packit 1c1d7e
    Qt had nicely generated documentation (using an internal tool which 
    Packit 1c1d7e
    they didn't want to release) 
    Packit 1c1d7e
    and I wrote similar docs by hand. 
    Packit 1c1d7e
    This was a nightmare to maintain, so I wanted a similar tool. I looked at
    Packit 1c1d7e
    Doc++ but that just wasn't good enough (it didn't support signals and
    Packit 1c1d7e
    slots and did not have the Qt look and feel I had grown to like), 
    Packit 1c1d7e
    so I started to write my own tool...
    Packit 1c1d7e
    Packit 1c1d7e
    \htmlonly
    Packit 1c1d7e
    Go to the next section or return to the
    Packit 1c1d7e
     index.
    Packit 1c1d7e
    \endhtmlonly
    Packit 1c1d7e
    Packit 1c1d7e
    */
    Packit 1c1d7e