Vertex is designed for constructing vertices builder.
More...
#include <vertices_builder.h>
|
| Vertex (IdType id) |
| Initialize the vertex with a given id. More...
|
|
IdType | GetId () const noexcept |
| Get id of the vertex. More...
|
|
void | SetId (IdType id) |
| Set id of the vertex. More...
|
|
bool | Empty () const noexcept |
| Check if the vertex is empty. More...
|
|
void | AddProperty (const std::string &name, const std::any &val) |
| Add a property to the vertex. More...
|
|
const std::any & | GetProperty (const std::string &property) const |
| Get a property of the vertex. More...
|
|
const std::unordered_map< std::string, std::any > & | GetProperties () const |
| Get all properties of the vertex. More...
|
|
bool | ContainProperty (const std::string &property) |
| Check if the vertex contains a property. More...
|
|
Vertex is designed for constructing vertices builder.
Definition at line 45 of file vertices_builder.h.
◆ Vertex()
graphar::builder::Vertex::Vertex |
( |
IdType |
id | ) |
|
|
inlineexplicit |
◆ AddProperty()
void graphar::builder::Vertex::AddProperty |
( |
const std::string & |
name, |
|
|
const std::any & |
val |
|
) |
| |
|
inline |
Add a property to the vertex.
- Parameters
-
name | The name of the property. |
val | The value of the property. |
Definition at line 84 of file vertices_builder.h.
◆ ContainProperty()
bool graphar::builder::Vertex::ContainProperty |
( |
const std::string & |
property | ) |
|
|
inline |
Check if the vertex contains a property.
- Parameters
-
property | The name of the property. |
- Returns
- true/false.
Definition at line 115 of file vertices_builder.h.
◆ Empty()
bool graphar::builder::Vertex::Empty |
( |
| ) |
const |
|
inlinenoexcept |
◆ GetId()
IdType graphar::builder::Vertex::GetId |
( |
| ) |
const |
|
inlinenoexcept |
Get id of the vertex.
- Returns
- The id of the vertex.
Definition at line 61 of file vertices_builder.h.
◆ GetProperties()
const std::unordered_map<std::string, std::any>& graphar::builder::Vertex::GetProperties |
( |
| ) |
const |
|
inline |
Get all properties of the vertex.
- Returns
- The map containing all properties of the vertex.
Definition at line 104 of file vertices_builder.h.
◆ GetProperty()
const std::any& graphar::builder::Vertex::GetProperty |
( |
const std::string & |
property | ) |
const |
|
inline |
Get a property of the vertex.
- Parameters
-
property | The name of the property. |
- Returns
- The value of the property.
Definition at line 95 of file vertices_builder.h.
◆ SetId()
void graphar::builder::Vertex::SetId |
( |
IdType |
id | ) |
|
|
inline |
The documentation for this class was generated from the following file: