


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.
#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.
