Подтвердить что ты не робот

Как заставить doxygen создавать полные диаграммы наследования для нескольких проектов?

При использовании doxygen для генерации диаграмм наследования С++ я заметил, что диаграммы могут быть неполными.

Если несколько проектов документированы с помощью файлов тегов, чтобы разрешить перекрестные ссылки, doxygen будет успешно показывать все базовые классы, которые существуют в других файлах тегов, но они будут не показывать производные классы, если они находятся в других файлах тегов. Показанные производные классы всегда являются только классами, которые существуют в текущем проекте.

Пример кода проекта 1:

class A {};

class B : public A {};

class C : public A {};

Пример кода проекта 2:

#include <proj1.h>

class D : public A {};

class E : public A {};

class F : public E {};

Диаграмма наследования A из проекта 1, используя файл тега из проекта 2 - , где D, E и F?

введите описание изображения здесь

Наследование диаграммы E из проекта 2 с использованием файла тега из проекта 1 - родительского класса A показано.

введите описание изображения здесь

Есть ли параметр, указывающий doxygen для генерации полных графиков наследования по проектам при использовании файлов тегов?

4b9b3361

Ответ 1

с использованием этих настроек doxyfile, сгенерированных с помощью модуля eclox в eclipse, нет проблем, сравните с вашими:

    # Doxyfile 1.6.3

    # This file describes the settings to be used by the documentation system
    # doxygen (www.doxygen.org) for a project
    #
    # All text after a hash (#) is considered a comment and will be ignored
    # The format is:
    #       TAG = value [value, ...]
    # For lists items can also be appended using:
    #       TAG += value [value, ...]
    # Values that contain spaces should be placed between quotes (" ")

    #---------------------------------------------------------------------------
    # Project related configuration options
    DOXYFILE_ENCODING      = UTF-8

    PROJECT_NAME           =

    PROJECT_NUMBER         =


    OUTPUT_DIRECTORY       =


    CREATE_SUBDIRS         = NO

    OUTPUT_LANGUAGE        = English

    BRIEF_MEMBER_DESC      = YES
    REPEAT_BRIEF           = YES


    ALWAYS_DETAILED_SEC    = NO
    INLINE_INHERITED_MEMB  = NO

    FULL_PATH_NAMES        = YES
    STRIP_FROM_PATH        =

    STRIP_FROM_INC_PATH    =

    SHORT_NAMES            = NO
    JAVADOC_AUTOBRIEF      = NO

    QT_AUTOBRIEF           = NO

    MULTILINE_CPP_IS_BRIEF = NO


    INHERIT_DOCS           = YES


    SEPARATE_MEMBER_PAGES  = NO

    TAB_SIZE               = 8
    ALIASES                =


    OPTIMIZE_OUTPUT_FOR_C  = NO

    OPTIMIZE_OUTPUT_JAVA   = NO

    OPTIMIZE_FOR_FORTRAN   = NO


    OPTIMIZE_OUTPUT_VHDL   = NO
    EXTENSION_MAPPING      =


    BUILTIN_STL_SUPPORT    = NO


    CPP_CLI_SUPPORT        = NO

    SIP_SUPPORT            = NO


    IDL_PROPERTY_SUPPORT   = YES

    DISTRIBUTE_GROUP_DOC   = NO


    SUBGROUPING            = YES

    TYPEDEF_HIDES_STRUCT   = NO

    SYMBOL_CACHE_SIZE      = 0

    #---------------------------------------------------------------------------
    # Build related configuration options
    #---------------------------------------------------------------------------


    EXTRACT_ALL            = NO


    EXTRACT_PRIVATE        = NO


    EXTRACT_STATIC         = NO


    EXTRACT_LOCAL_CLASSES  = YES

    EXTRACT_LOCAL_METHODS  = NO


    EXTRACT_ANON_NSPACES   = NO

    HIDE_UNDOC_MEMBERS     = NO

    HIDE_UNDOC_CLASSES     = NO


    HIDE_FRIEND_COMPOUNDS  = NO

    HIDE_IN_BODY_DOCS      = NO



    INTERNAL_DOCS          = NO

    CASE_SENSE_NAMES       = YES
    HIDE_SCOPE_NAMES       = NO   
    SHOW_INCLUDE_FILES     = YES


    FORCE_LOCAL_INCLUDES   = NO

    INLINE_INFO            = YES


    SORT_MEMBER_DOCS       = YES


    SORT_BRIEF_DOCS        = NO


    SORT_MEMBERS_CTORS_1ST = NO


    SORT_GROUP_NAMES       = NO


    SORT_BY_SCOPE_NAME     = NO


    GENERATE_TODOLIST      = YES


    GENERATE_TESTLIST      = YES


    GENERATE_BUGLIST       = YES


    GENERATE_DEPRECATEDLIST= YES



    ENABLED_SECTIONS       =

    # The MAX_INITIALIZER_LINES tag determines the maximum number of lines
    # the initial value of a variable or define consists of for it to appear in
    # the documentation. If the initializer consists of more lines than specified
    # here it will be hidden. Use a value of 0 to hide initializers completely.
    # The appearance of the initializer of individual variables and defines in the
    # documentation can be controlled using \showinitializer or \hideinitializer
    # command in the documentation regardless of this setting.

    MAX_INITIALIZER_LINES  = 30

    # Set the SHOW_USED_FILES tag to NO to disable the list of files generated
    # at the bottom of the documentation of classes and structs. If set to YES the
    # list will mention the files that were used to generate the documentation.

    SHOW_USED_FILES        = YES

    # If the sources in your project are distributed over multiple directories
    # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
    # in the documentation. The default is NO.

    SHOW_DIRECTORIES       = NO

    # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
    # This will remove the Files entry from the Quick Index and from the
    # Folder Tree View (if specified). The default is YES.

    SHOW_FILES             = YES

    # Set the SHOW_NAMESPACES tag to NO to disable the generation of the
    # Namespaces page.
    # This will remove the Namespaces entry from the Quick Index
    # and from the Folder Tree View (if specified). The default is YES.

    SHOW_NAMESPACES        = YES

    # The FILE_VERSION_FILTER tag can be used to specify a program or script that
    # doxygen should invoke to get the current version for each file (typically from
    # the version control system). Doxygen will invoke the program by executing (via
    # popen()) the command  , where  is the value of
    # the FILE_VERSION_FILTER tag, and  is the name of an input file
    # provided by doxygen. Whatever the program writes to standard output
    # is used as the file version. See the manual for examples.

    FILE_VERSION_FILTER    =

    # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
    # doxygen. The layout file controls the global structure of the generated output files
    # in an output format independent way. The create the layout file that represents
    # doxygen defaults, run doxygen with the -l option. You can optionally specify a
    # file name after the option, if omitted DoxygenLayout.xml will be used as the name
    # of the layout file.

    LAYOUT_FILE            =

    #---------------------------------------------------------------------------
    # configuration options related to warning and progress messages
    #---------------------------------------------------------------------------

    # The QUIET tag can be used to turn on/off the messages that are generated
    # by doxygen. Possible values are YES and NO. If left blank NO is used.

    QUIET                  = NO

    # The WARNINGS tag can be used to turn on/off the warning messages that are
    # generated by doxygen. Possible values are YES and NO. If left blank
    # NO is used.

    WARNINGS               = YES

    # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
    # for undocumented members. If EXTRACT_ALL is set to YES then this flag will
    # automatically be disabled.

    WARN_IF_UNDOCUMENTED   = YES

    # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
    # potential errors in the documentation, such as not documenting some
    # parameters in a documented function, or documenting parameters that
    # don't exist or using markup commands wrongly.

    WARN_IF_DOC_ERROR      = YES

    # This WARN_NO_PARAMDOC option can be abled to get warnings for
    # functions that are documented, but have no documentation for their parameters
    # or return value. If set to NO (the default) doxygen will only warn about
    # wrong or incomplete parameter documentation, but not about the absence of
    # documentation.

    WARN_NO_PARAMDOC       = NO

    # The WARN_FORMAT tag determines the format of the warning messages that
    # doxygen can produce. The string should contain the $file, $line, and $text
    # tags, which will be replaced by the file and line number from which the
    # warning originated and the warning text. Optionally the format may contain
    # $version, which will be replaced by the version of the file (if it could
    # be obtained via FILE_VERSION_FILTER)

    WARN_FORMAT            = "$file:$line: $text"

    # The WARN_LOGFILE tag can be used to specify a file to which warning
    # and error messages should be written. If left blank the output is written
    # to stderr.

    WARN_LOGFILE           =

    #---------------------------------------------------------------------------
    # configuration options related to the input files
    #---------------------------------------------------------------------------

    # The INPUT tag can be 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.

    INPUT                  =

    # This tag can be used to specify the character encoding of the source files
    # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
    # also the default input encoding. Doxygen uses libiconv (or the iconv built
    # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
    # the list of possible encodings.

    INPUT_ENCODING         = UTF-8

    # If the value of the INPUT tag contains directories, you can use the
    # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
    # and *.h) to filter out the source-files in the directories. If left
    # blank the following patterns are tested:
    # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
    # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90

    FILE_PATTERNS          =

    # The RECURSIVE tag can be used to turn specify whether or not subdirectories
    # should be searched for input files as well. Possible values are YES and NO.
    # If left blank NO is used.

    RECURSIVE              = NO

    # The EXCLUDE tag can be used to specify files and/or directories that should
    # excluded from the INPUT source files. This way you can easily exclude a
    # subdirectory from a directory tree whose root is specified with the INPUT tag.

    EXCLUDE                =

    # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
    # directories that are symbolic links (a Unix filesystem feature) are excluded
    # from the input.

    EXCLUDE_SYMLINKS       = NO

    # If the value of the INPUT tag contains directories, you can use the
    # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
    # certain files from those directories. Note that the wildcards are matched
    # against the file with absolute path, so to exclude all test directories
    # for example use the pattern */test/*

    EXCLUDE_PATTERNS       =

    # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
    # (namespaces, classes, functions, etc.) that should be excluded from the
    # output. The symbol name can be a fully qualified name, a word, or if the
    # wildcard * is used, a substring. Examples: ANamespace, AClass,
    # AClass::ANamespace, ANamespace::*Test

    EXCLUDE_SYMBOLS        =

    # The EXAMPLE_PATH tag can be used to specify one or more files or
    # directories that contain example code fragments that are included (see
    # the \include command).

    EXAMPLE_PATH           =

    # If the value of the EXAMPLE_PATH tag contains directories, you can use the
    # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
    # and *.h) to filter out the source-files in the directories. If left
    # blank all files are included.

    EXAMPLE_PATTERNS       =

    # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
    # searched for input files to be used with the \include or \dontinclude
    # commands irrespective of the value of the RECURSIVE tag.
    # Possible values are YES and NO. If left blank NO is used.

    EXAMPLE_RECURSIVE      = NO

    # The IMAGE_PATH tag can be used to specify one or more files or
    # directories that contain image that are included in the documentation (see
    # the \image command).

    IMAGE_PATH             =

    # The INPUT_FILTER tag can be used to specify a program that doxygen should
    # invoke to filter for each input file. Doxygen will invoke the filter program
    # by executing (via popen()) the command  , where 
    # is the value of the INPUT_FILTER tag, and  is the name of an
    # input file. Doxygen will then use the output that the filter program writes
    # to standard output.
    # If FILTER_PATTERNS is specified, this tag will be
    # ignored.

    INPUT_FILTER           =

    # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
    # basis.
    # Doxygen will compare the file name with each pattern and apply the
    # filter if there is a match.
    # The filters are a list of the form:
    # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
    # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
    # is applied to all files.

    FILTER_PATTERNS        =

    # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
    # INPUT_FILTER) will be used to filter the input files when producing source
    # files to browse (i.e. when SOURCE_BROWSER is set to YES).

    FILTER_SOURCE_FILES    = NO

    #---------------------------------------------------------------------------
    # configuration options related to source browsing
    #---------------------------------------------------------------------------

    # If the SOURCE_BROWSER tag is set to YES then a list of source files will
    # be generated. Documented entities will be cross-referenced with these sources.
    # Note: To get rid of all source code in the generated output, make sure also
    # VERBATIM_HEADERS is set to NO.

    SOURCE_BROWSER         = NO

    # Setting the INLINE_SOURCES tag to YES will include the body
    # of functions and classes directly in the documentation.

    INLINE_SOURCES         = NO

    # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
    # doxygen to hide any special comment blocks from generated source code
    # fragments. Normal C and C++ comments will always remain visible.

    STRIP_CODE_COMMENTS    = YES

    # If the REFERENCED_BY_RELATION tag is set to YES
    # then for each documented function all documented
    # functions referencing it will be listed.

    REFERENCED_BY_RELATION = NO

    # If the REFERENCES_RELATION tag is set to YES
    # then for each documented function all documented entities
    # called/used by that function will be listed.

    REFERENCES_RELATION    = NO

    # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
    # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
    # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
    # link to the source code.
    # Otherwise they will link to the documentation.

    REFERENCES_LINK_SOURCE = YES

    # If the USE_HTAGS tag is set to YES then the references to source code
    # will point to the HTML generated by the htags(1) tool instead of doxygen
    # built-in source browser. The htags tool is part of GNU global source
    # tagging system (see http://www.gnu.org/software/global/global.html). You
    # will need version 4.8.6 or higher.

    USE_HTAGS              = NO

    # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
    # will generate a verbatim copy of the header file for each class for
    # which an include is specified. Set to NO to disable this.

    VERBATIM_HEADERS       = YES

    #---------------------------------------------------------------------------
    # configuration options related to the alphabetical class index
    #---------------------------------------------------------------------------

    # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
    # of all compounds will be generated. Enable this if the project
    # contains a lot of classes, structs, unions or interfaces.

    ALPHABETICAL_INDEX     = NO

    # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
    # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
    # in which this list will be split (can be a number in the range [1..20])

    COLS_IN_ALPHA_INDEX    = 5

    # In case all classes in a project start with a common prefix, all
    # classes will be put under the same header in the alphabetical index.
    # The IGNORE_PREFIX tag can be used to specify one or more prefixes that
    # should be ignored while generating the index headers.

    IGNORE_PREFIX          =

    #---------------------------------------------------------------------------
    # configuration options related to the HTML output
    #---------------------------------------------------------------------------

    # If the GENERATE_HTML tag is set to YES (the default) Doxygen will
    # generate HTML output.

    GENERATE_HTML          = YES

    # The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
    # If a relative path is entered the value of OUTPUT_DIRECTORY will be
    # put in front of it. If left blank `html' will be used as the default path.

    HTML_OUTPUT            = html

    # The HTML_FILE_EXTENSION tag can be used to specify the file extension for
    # each generated HTML page (for example: .htm,.php,.asp). If it is left blank
    # doxygen will generate files with .html extension.

    HTML_FILE_EXTENSION    = .html

    # The HTML_HEADER tag can be used to specify a personal HTML header for
    # each generated HTML page. If it is left blank doxygen will generate a
    # standard header.

    HTML_HEADER            =

    # The HTML_FOOTER tag can be used to specify a personal HTML footer for
    # each generated HTML page. If it is left blank doxygen will generate a
    # standard footer.

    HTML_FOOTER            =

    # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
    # style sheet that is used by each HTML page. It can be used to
    # fine-tune the look of the HTML output. If the tag is left blank doxygen
    # will generate a default style sheet. Note that doxygen will try to copy
    # the style sheet file to the HTML output directory, so don't put your own
    # stylesheet in the HTML output directory as well, or it will be erased!

    HTML_STYLESHEET        =

    # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
    # page will contain the date and time when the page was generated. Setting
    # this to NO can help when comparing the output of multiple runs.

    HTML_TIMESTAMP         = YES

    # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
    # files or namespaces will be aligned in HTML using tables. If set to
    # NO a bullet list will be used.

    HTML_ALIGN_MEMBERS     = YES

    # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
    # documentation will contain sections that can be hidden and shown after the
    # page has loaded. For this to work a browser that supports
    # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
    # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).

    HTML_DYNAMIC_SECTIONS  = NO


    GENERATE_DOCSET        = NO

    DOCSET_FEEDNAME        = "Doxygen generated docs"


    DOCSET_BUNDLE_ID       = org.doxygen.Project


    GENERATE_HTMLHELP      = NO

    CHM_FILE               =

    HHC_LOCATION           =


    GENERATE_CHI           = NO


    CHM_INDEX_ENCODING     =

    BINARY_TOC             = NO

    TOC_EXPAND             = NO

    GENERATE_QHP           = NO


    QCH_FILE               =

    QHP_NAMESPACE          = org.doxygen.Project

    QHP_VIRTUAL_FOLDER     = doc

    QHP_CUST_FILTER_NAME   =


    QHP_CUST_FILTER_ATTRS  =

    QHP_SECT_FILTER_ATTRS  =


    QHG_LOCATION           =

    GENERATE_ECLIPSEHELP   = NO


    ECLIPSE_DOC_ID         = org.doxygen.Project


    DISABLE_INDEX          = NO

    ENUM_VALUES_PER_LINE   = 4

    GENERATE_TREEVIEW      = NO


    USE_INLINE_TREES       = NO
    TREEVIEW_WIDTH         = 250
    FORMULA_FONTSIZE       = 10

    SEARCHENGINE           = YES


    SERVER_BASED_SEARCH    = NO


    GENERATE_LATEX         = YES
    LATEX_OUTPUT           = latex

    LATEX_CMD_NAME         = latex

    MAKEINDEX_CMD_NAME     = makeindex


    COMPACT_LATEX          = NO

    PAPER_TYPE             = a4wide


    EXTRA_PACKAGES         =

    LATEX_HEADER           =

    PDF_HYPERLINKS         = YES


    USE_PDFLATEX           = YES
    LATEX_BATCHMODE        = NO



    LATEX_HIDE_INDICES     = NO

    LATEX_SOURCE_CODE      = NO

    #---------------------------------------------------------------------------
    # configuration options related to the RTF output
    #---------------------------------------------------------------------------


    GENERATE_RTF           = NO



    RTF_OUTPUT             = rtf



    COMPACT_RTF            = NO


    RTF_HYPERLINKS         = NO


    RTF_STYLESHEET_FILE    =

    RTF_EXTENSIONS_FILE    =

    #---------------------------------------------------------------------------
    # configuration options related to the man page output
    #---------------------------------------------------------------------------

    GENERATE_MAN           = NO

    MAN_OUTPUT             = man

    MAN_EXTENSION          = .3

    MAN_LINKS              = NO

    #---------------------------------------------------------------------------
    # configuration options related to the XML output
    #---------------------------------------------------------------------------


    GENERATE_XML           = NO


    XML_OUTPUT             = xml


    XML_SCHEMA             =

    XML_DTD                =

    XML_PROGRAMLISTING     = YES

    #---------------------------------------------------------------------------
    # configuration options for the AutoGen Definitions output
    #---------------------------------------------------------------------------
    GENERATE_AUTOGEN_DEF   = NO

    #---------------------------------------------------------------------------
    # configuration options related to the Perl module output
    #---------------------------------------------------------------------------

    GENERATE_PERLMOD       = NO


    PERLMOD_LATEX          = NO


    PERLMOD_PRETTY         = YES


    PERLMOD_MAKEVAR_PREFIX =

    #---------------------------------------------------------------------------
    # Configuration options related to the preprocessor
    #---------------------------------------------------------------------------
    ENABLE_PREPROCESSING   = YES


    MACRO_EXPANSION        = NO

    EXPAND_ONLY_PREDEF     = NO

    SEARCH_INCLUDES        = YES
    INCLUDE_PATH           =


    INCLUDE_FILE_PATTERNS  =
    PREDEFINED             =


    EXPAND_AS_DEFINED      =

    SKIP_FUNCTION_MACROS   = YES

    #---------------------------------------------------------------------------
    # Configuration::additions related to external references
    #---------------------------------------------------------------------------

    TAGFILES               =

    GENERATE_TAGFILE       =


    ALLEXTERNALS           = NO

    EXTERNAL_GROUPS        = YES



    PERL_PATH              = /usr/bin/perl

    #---------------------------------------------------------------------------
    # Configuration options related to the dot tool
    #---------------------------------------------------------------------------

    # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
    # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
    # or super classes. Setting the tag to NO turns the diagrams off. Note that
    # this option is superseded by the HAVE_DOT option below. This is only a
    # fallback. It is recommended to install and use dot, since it yields more
    # powerful graphs.

    CLASS_DIAGRAMS         = YES

    # You can define message sequence charts within doxygen comments using the \msc
    # command. Doxygen will then run the mscgen tool (see
    # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
    # documentation. The MSCGEN_PATH tag allows you to specify the directory where
    # the mscgen tool resides. If left empty the tool is assumed to be found in the
    # default search path.

    MSCGEN_PATH            =


    HIDE_UNDOC_RELATIONS   = YES

    HAVE_DOT               = NO

    DOT_FONTNAME           = FreeSans

    DOT_FONTSIZE           = 10
    DOT_FONTPATH           =


    CLASS_GRAPH            = YES



    COLLABORATION_GRAPH    = YES



    GROUP_GRAPHS           = YES

    UML_LOOK               = NO


    TEMPLATE_RELATIONS     = NO


    INCLUDE_GRAPH          = YES


    INCLUDED_BY_GRAPH      = YES


    CALL_GRAPH             = NO



    CALLER_GRAPH           = NO



    GRAPHICAL_HIERARCHY    = YES



    DIRECTORY_GRAPH        = YES


    DOT_IMAGE_FORMAT       = png



    DOT_PATH               =



    DOTFILE_DIRS           =


    DOT_GRAPH_MAX_NODES    = 50



    MAX_DOT_GRAPH_DEPTH    = 0


    DOT_TRANSPARENT        = NO



    DOT_MULTI_TARGETS      = YES



    GENERATE_LEGEND        = YES


    DOT_CLEANUP            = YES