
The command is on a line by itself, with nothing following.Keeping the rest to subsequent lines aids legibility and revision tracking. The opening doc comment is merely " /**" on a line by itself.* Logarithmic time traveling salesman solver. Any documented entities in namespaces, of local classes, etc., will be processed even if a command is not present in the source file.Īn example of a legacy source file using the command:.If feasible, moving statics to anonymous namespaces instead is preferable to adding a command.Legacy files that contain a mix of functions probably warrant use of a command.As our codebase moves to the more modern C++ practices, use of these will be reduced and removed. Note that the command will only be required for files that have non-class non-namespaced globals or statics.
#DOXYGEN FILE HEADER EXAMPLE CODE#
Legacy code migrated from C may still contain these, so will require the use of a command. Modern C++ code should avoid global and static variables, functions, enums, etc.* Released under GNU GPL, read the file 'COPYING' for more informationĪgain, note that the comment does not start with " /**". Doxygen itself normally will address file-specific needs. The comments need to document individual classes, subsystems, etc., and not be focused on file structure. Using a Doxygen comments with at the top should no longer be the normal case.Author emails can be obfuscated, but should be real addresses. The author information is in a regular multiline comment so that it is omitted in the generated documentation. The comment at the top of each file should have the following format.Source files should use four spaces as indentation and no tabs.

#DOXYGEN FILE HEADER EXAMPLE HOW TO#
(BPF) The C++ FAQ Sheet explains how to code forward declarations (classes that both need to know about each other) To fully understand why, you should study the Pimpl idiom. #include "foo.h" /*, due to heavy use of templates in the 2Geom library.

You can prune this by using a 'forward declaration', whenever the Foo entity is not itself used, only pointers and/or references to it:

For example, the header "bar.h" might have a class Bar with a member of type Foo*, thus it includes "foo.h" to get the definition of that type. Find a header that includes several other headers.This becomes a problem when a given header file is included by other header files, as it leads to a vast header include tree, wherein a small change to a seemingly minor header file causes massive rebuilds of much of the codebase.įortunately for us, there are recognized techniques to mitigate this! Here's what to do: When a header file changes, any file that includes it is recompiled. 1 Improving headers for compilation speed.
