clang-uml
provides a set of in-comment directives, called decorators, which allow custom control over generation of UML diagrams from C++ and overriding default inference rules for relationships.
clang-uml
decorators are specified in the following format:
or
The optional :<diagram_name>
suffix will apply this decorator only to a specific diagram.
Currently, the following decorators are supported.
This decorator allows to specify directly in the code comments that should be included in the generated diagrams.
The following code:
results in the following class diagram:
This decorator allows to skip the specific classes or methods from the diagrams, for instance the following code:
results in the following diagram:
These decorators allow to specify explicitly the type of relationship within a class diagram that should be generated for a given class member. For instance the following code:
results in the following diagram:
This decorator allows to specify in the code specific styles for diagram elements, for instance:
results in the following diagram: