Document Object Model Reference
The Document Object Model (DOM) is a tree structure that represents the symbols extracted from the source code. The DOM is used by the generator to render the documentation.
Top-Level Fields
The top-level object in the DOM is the context for a template. The top-level object has the following properties:
| Property | Type | Description |
|---|---|---|
|
The symbol being rendered. |
|
|
The configuration object. |
Symbol
The Symbol object represents a symbol extracted from the source code. The symbol being rendered is available in the symbol object in the Handlebars context. The symbol object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
A unique identifier for the symbol. |
|
|
The nonqualified name of the symbol. |
|
|
The kind of symbol. (e.g., |
|
|
The access level of the symbol. (e.g., |
|
|
The extraction mode of the symbol according to the specified filters. (e.g., |
|
|
Whether the symbol extraction mode is |
|
|
Whether the symbol extraction mode is |
|
|
Whether the symbol extraction mode is |
|
|
Whether the symbol extraction mode is |
|
The parent contexts (namespaces or records) of the symbol. |
|
|
The parent context (namespace or record) of the symbol. |
|
|
|
The documentation for the symbol. |
Handlebars generators extend each symbol with the following fields:
| Property | Type | Description |
|---|---|---|
|
|
The URL of the symbol. If the documentation is a single page, this is the anchor link to the symbol starting with |
|
|
The anchor link to the symbol. This is used for section IDs in the documentation. |
The Symbol object has additional properties based on the kind of symbol.
The following table lists the additional properties for symbols that contain information about their scope (such as Namespaces and Classes):
| Property | Type | Description |
|---|---|---|
|
The members of that scope (e.g., member functions, namespace symbols). |
|
|
Same as |
Symbol objects that contain information about the location include the following properties:
| Property | Type | Description |
|---|---|---|
|
The location of the symbol in the source code. |
When the symbol kind is namespace, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
The interface of the namespace. |
|
|
The using directives of the namespace. |
When the symbol kind is record (e.g., class, struct, union), the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
|
The type of record (e.g., |
|
|
The default access level of the record members (e.g., |
|
|
Whether the record is final. |
|
|
Whether the record is a typedef. |
|
The base classes of the record. |
|
|
The interface of the record. |
|
|
The template information of the record. |
When the symbol kind is enum, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
The type information of the enum. |
|
|
|
Whether the enum is scoped. |
When the symbol kind is function, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
|
Whether the function is variadic. |
|
|
Whether the function is virtual. |
|
|
Whether the function is virtual as written. |
|
|
Whether the function is pure. |
|
|
Whether the function is defaulted. |
|
|
Whether the function is explicitly defaulted. |
|
|
Whether the function is deleted. |
|
|
Whether the function is deleted as written. |
|
|
Whether the function is noreturn. |
|
|
Whether the function has the override attribute. |
|
|
Whether the function has a trailing return type. |
|
|
Whether the function is const. |
|
|
Whether the function is volatile. |
|
|
Whether the function is final. |
|
|
Whether the function is nodiscard. |
|
|
Whether the function is an explicit object member function. |
|
|
The constexpr kind of the function (e.g., |
|
|
The storage class of the function (e.g., |
|
|
The reference qualifier of the function (e.g., |
|
|
The function class (e.g., |
|
The parameters of the function. |
|
|
The return type of the function. |
|
|
The template information of the function. |
|
|
|
The overloaded operator of the function. |
|
|
The exception specification of the function. |
|
|
The explicit specification of the function. |
|
|
The |
|
|
The attributes of the function. |
When the symbol kind is typedef, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
The type information of the typedef. |
|
|
The template information of the typedef. |
|
|
|
Whether the typedef is a |
When the symbol kind is variable, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
The type information of the variable. |
|
|
The template information of the variable. |
|
|
|
The storage class of the variable (e.g., |
|
|
Whether the variable is |
|
|
Whether the variable is |
|
|
Whether the variable is |
|
|
Whether the variable is thread-local. |
|
|
The initializer of the variable. |
|
|
The attributes of the variable. |
When the symbol kind is field (i.e. non-static data members), the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
The type information of the field. |
|
|
|
The default value of the field. |
|
|
Whether the field is maybe unused. |
|
|
Whether the field is deprecated. |
|
|
Whether the field is a variant. |
|
|
Whether the field is mutable. |
|
|
Whether the field is a bitfield. |
|
|
|
|
|
The width of the bitfield. |
|
|
The attributes of the field. |
When the symbol kind is friend, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
|
The name of the friend symbol or type. |
|
The friend symbol. |
|
|
The friend type. |
When the symbol kind is namespace-alias, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
The aliased symbol. |
When the symbol kind is using, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
|
The class of the using declaration (e.g., |
|
The symbols being used. |
|
|
The qualifier of the using declaration. |
When the symbol kind is enum-constant, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
|
The initializer of the enum-constant. |
When the symbol kind is guide, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
The parameters of the guide. |
|
|
The deduced type of the guide. |
|
|
The template information of the guide. |
|
|
|
The explicit specification of the guide. |
When the symbol kind is concept, the symbol object has the following additional properties:
| Property | Type | Description |
|---|---|---|
|
The template information of the concept. |
|
|
|
The constraint of the concept. |
Source Fields
The Source object represents the location of the symbol in the source code.
The source info object has the following properties:
| Property | Type | Description |
|---|---|---|
|
Location where the entity was defined. |
|
|
Locations where the entity was declared. |
Tranche Object Fields
The Tranche object represents the symbols in a scope (e.g., namespace).
The tranche object has the following properties:
| Property | Type | Description |
|---|---|---|
(symbol kind in plural form: e.g., |
The symbols of that kind in the scope. |
|
|
The types in the scope. |
|
|
The static functions in the scope. |
|
|
The overloads in the scope. |
|
|
The static overloads in the scope. |
Interface Object Fields
The Interface object represents the interface of a record (e.g., class, struct, union).
The interface object has the following properties:
| Property | Type | Description |
|---|---|---|
|
The public interface of the record. |
|
|
The protected interface of the record. |
|
|
The private interface of the record. |
Base Info Fields
The Base Info object represents a base class of a record.
The base info object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
The access level of the base class. |
|
|
Whether the base class is virtual. |
|
The type information of the base class. |
Template Fields
The Template object represents the template information of a record, function, or typedef.
The template info object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
The kind of template (e.g., |
|
The primary template. |
|
|
The template parameters. |
|
|
The template arguments. |
|
|
|
The |
Type Fields
The Type object represents the type information of a symbol.
The type info object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
The kind of type (e.g., |
|
|
Whether the type is a pack expansion. |
|
|
The name of the type. |
|
|
The operand of the type. |
|
|
The keyword of the type. |
|
|
The constraint of the type. |
|
|
The cv qualifier of the type (e.g., |
|
The parent type of the type. |
|
|
The pointee type of the type. |
|
|
The element type of the type. |
|
|
|
The bounds value of the type. |
|
|
The bounds expression of the type. |
|
The return type of the type. |
|
|
The parameter types of the type. |
|
|
|
The exception specification of the type. |
|
|
The reference qualifier of the type. |
|
|
Whether the type is variadic. |
Param Fields
The Param object represents the parameter of a function.
The param object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
The name of the parameter. |
|
The type information of the parameter. |
|
|
|
The default value of the parameter. |
Name Fields
The Name object represents the name of a symbol.
The name info object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
The name of the symbol. |
|
|
The unique identifier of the symbol. |
|
The template arguments of the symbol. |
|
|
|
The prefix of the symbol. |
Location Fields
The Location object represents the location of a symbol in the source code.
The location object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
The full path of the source file. |
|
|
The path of the source file relative to the search directories. |
|
|
The path of the source file relative to the |
|
|
The line number of the symbol at this location. |
|
|
Whether the symbol is documented at this location. |
TParam Fields
The TParam object represents a template parameter of a record, function, or typedef.
The tparam object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
The kind of template parameter (e.g., |
|
|
The name of the template parameter. |
|
|
Whether the template parameter is a pack expansion. |
|
|
The default value of the template parameter. |
|
|
The key kind of the template parameter. |
|
|
The constraint of the template parameter. |
|
The type information of the template parameter. |
|
|
The template parameters of the template parameter. |
Targ Fields
The Targ object represents a template argument of a record, function, or typedef.
The targ object has the following properties:
| Property | Type | Description |
|---|---|---|
|
|
The kind of template argument (e.g., |
|
|
Whether the template argument is a pack expansion. |
|
The type information of the template argument. |
|
|
|
The value of the template argument. |
|
|
The name of the template argument. |
|
The template information of the template argument. |
Config Fields
The Config object represents the configuration object.
It includes all values provided to Mr.Docs in the configuration file or via the command line.
Please refer to the configuration options reference for more information.