Entity¶
struct Entity
Entity in a C++ source file, e.g. variable, function, class, etc.
Types¶
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. |
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. |
addToGroup | Add child entity to a group. |
addToThis | Add child entity. |
Variable Details¶
namespaces¶
list_type namespaces
Child namespaces.
groups¶
list_type groups
Child groups.
types¶
list_type types
Child types.
concepts¶
list_type concepts
Child concepts.
variables¶
list_type variables
Child variables.
functions¶
list_type functions
Child functions.
operators¶
list_type operators
Child operators.
enums¶
list_type enums
Child enumerators.
macros¶
list_type macros
Child macros.
dirs¶
list_type dirs
Child directories.
files¶
list_type files
Child files.
name¶
std::string name
Entity name (e.g. name of variable, function, class). For a file or directory this is the full path.
decl¶
std::string decl
Entity declaration (e.g. function signature). For a file this is its full contents.
docs¶
std::string docs
Entity documentation.
title¶
std::string title
Entity title. This is used for the title of the page.
brief¶
std::string brief
Alternative brief description.
ingroup¶
std::string ingroup
Group to which this belongs.
path¶
std::filesystem::path path
Path of source file.
start_line¶
uint32_t start_line
Starting line in the source file.
end_line¶
uint32_t end_line
Ending line in the source file.
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_included¶
int lines_included
Number of lines included in coverage counts.
lines_covered¶
int lines_covered
Number of lines covered in coverage counts.
type¶
EntityType type
Entity type.
visible¶
bool visible
Is this node visible? This is a computed quantity, that may be overridden
explicitly with hide.
hide¶
bool hide
Hide this node?
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.
merge¶
void merge(Entity&& o)
Merge the children of another entity into this one.
-
o
- Other entity.
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.
clear¶
void clear()
Clear the entity.
addToGroup¶
bool addToGroup(Entity&& o)
Add child entity to a group.
-
o
- Child entity with
ingroup
set. - Return
- True if a group of the given name was found, in which case
o
will 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.