Entity¶
struct Entity
Entity in a C++ source file, e.g. variable, function, class, etc.
Type Aliases¶
| Name | Description | 
|---|---|
| list_type | Child entities are stored in a list, rather than map by name, to preserve declaration order. | 
Variables¶
| Name | Description | 
|---|---|
| namespaces | Child namespaces. | 
| groups | Child groups. | 
| types | Child types. | 
| typedefs | Child typedefs and type aliases. | 
| concepts | Child concepts. | 
| variables | Child variables. | 
| functions | Child functions. | 
| operators | Child operators. | 
| enums | Child enumerators. | 
| macros | Child macros. | 
| dirs | Child directories. | 
| files | Child files. | 
| name | Entity name (e.g. name of variable, function, class). For a file or directory this is the full path. | 
| decl | Entity declaration (e.g. function signature). For a file this is its full contents. | 
| docs | Entity documentation. | 
| title | Entity title. | 
| brief | Alternative brief description. | 
| ingroup | Group to which this belongs. | 
| path | Path of source file. | 
| start_line | Starting line in the source file. | 
| end_line | Ending line in the source file. | 
| line_counts | For a file only, execution counts for lines. | 
| lines_included | Number of lines included in coverage counts. | 
| lines_covered | Number of lines covered in coverage counts. | 
| type | Entity type. | 
| visible | Is this node visible? | 
| hide | Hide this node? | 
Functions¶
| Name | Description | 
|---|---|
| Entity | Constructor. | 
| add | Add child entity. | 
| merge | Merge the children of another entity into this one. | 
| exists | Does a file exist of the given name? | 
| get | Get a file of the given name. | 
| clear | Clear the entity. | 
| delete_by_predicate | Recursively delete all child entities that satisfy the predicate. | 
| addToGroup | Add child entity to a group. | 
| addToThis | Add child entity. | 
Type Alias Details¶
list_type¶
using list_type = std::list<Entity>
Child entities are stored in a list, rather than map by name, to preserve declaration order. They may be sorted by name on output.
Variable Details¶
brief¶
std::string brief
Alternative brief description.
concepts¶
list_type concepts
Child concepts.
decl¶
std::string decl
Entity declaration (e.g. function signature). For a file this is its full contents.
dirs¶
list_type dirs
Child directories.
docs¶
std::string docs
Entity documentation.
end_line¶
uint32_t end_line
Ending line in the source file.
enums¶
list_type enums
Child enumerators.
files¶
list_type files
Child files.
functions¶
list_type functions
Child functions.
groups¶
list_type groups
Child groups.
hide¶
bool hide
Hide this node?
ingroup¶
std::string ingroup
Group to which this belongs.
line_counts¶
std::vector<int> line_counts
For a file only, execution counts for lines. -1 for a line indicates that it is excluded.
lines_covered¶
int lines_covered
Number of lines covered in coverage counts.
lines_included¶
int lines_included
Number of lines included in coverage counts.
macros¶
list_type macros
Child macros.
name¶
std::string name
Entity name (e.g. name of variable, function, class). For a file or directory this is the full path.
namespaces¶
list_type namespaces
Child namespaces.
operators¶
list_type operators
Child operators.
path¶
std::filesystem::path path
Path of source file.
start_line¶
uint32_t start_line
Starting line in the source file.
title¶
std::string title
Entity title. This is used for the title of the page.
type¶
EntityType type
Entity type.
typedefs¶
list_type typedefs
Child typedefs and type aliases.
types¶
list_type types
Child types.
variables¶
list_type variables
Child variables.
visible¶
bool visible
Is this node visible? This is a computed quantity, that may be overridden
    explicitly with hide.
Function Details¶
Entity¶
Entity()
Constructor.
add¶
void add(Entity&& o)
Add child entity.
-  o
- Child entity.
If the child has ingroup set, then will search for and add to that
group instead.
addToGroup¶
bool addToGroup(Entity&& o)
Add child entity to a group.
-  o
- Child entity with ingroupset.
- Return
- True if a group of the given name was found, in which case owill have been added to it, false otherwise.
addToThis¶
void addToThis(Entity&& o)
Add child entity.
-  o
- Child entity.
If the child has ingroup set, it is ignored.
clear¶
void clear()
Clear the entity.
delete_by_predicate¶
void delete_by_predicate(std::function<bool(const Entity&)> p)
Recursively delete all child entities that satisfy the predicate.
-  p
- Predicate.
exists¶
bool exists(std::filesystem::path& path) const
Does a file exist of the given name?
-  path
- File path.
get¶
std::list<Entity*> get(std::filesystem::path& path)
Get a file of the given name. The file must exist (use exists()).
-  path
- File path.
- Return
- List of entities giving the full path to the file. The last entity represents the file itself, the preceding entities its subdirectories.
merge¶
void merge(Entity&& o)
Merge the children of another entity into this one.
-  o
- Other entity.