A property is a light-weight container for a non-node type, and is a leaf node in the graph.
More...
#include <property.h>
A property is a light-weight container for a non-node type, and is a leaf node in the graph.
A property provides the means for storing unrelated types in homogeneous property containers.
Class Diagram
◆ create_clone()
Returns a handle to a copy of this property.
- Returns
- A handle to a copy of this property.
◆ data() [1/2]
template<typename T , typename U >
Returns a const pointer to this property's data.
- Template Parameters
-
- Parameters
-
| error_action_type | Specifies whether or not to assert if T is not the type of this property. |
- Returns
- A const pointer to this property's data or
nullptr if T is not the type of this property.
- Exceptions
-
◆ data() [2/2]
template<typename T , typename >
Returns a pointer to this property's data.
- Template Parameters
-
- Parameters
-
| error_action_type | Specifies whether or not to assert if T is not the type of this property. |
- Returns
- A pointer to this property's data or
nullptr if T is not the type of this property.
- Exceptions
-
◆ get_id()
Returns this property's ID.
- Returns
- This property's ID, a guid.
◆ get_type()
| property_type_enum cppgraph::property::get_type |
( |
| ) |
const |
Returns the property_type_enum of the underlying type.
- Returns
- The type of this property's data.
◆ operator!=()
| bool cppgraph::property::operator!= |
( |
property const & |
property | ) |
const |
Returns true if a specified property's type or data value do not match those of this property.
- Parameters
-
| property | property whose data and type to compare with those of this property. |
- Returns
true if a specified property's type or data value do not match those of this property.
◆ operator=() [1/2]
template<typename T , typename U >
| property & cppgraph::property::operator= |
( |
T |
value | ) |
|
|
inlinenoexcept |
Assignment from an instance of a supported type.
- Template Parameters
-
| T | One of the supported property types. See property_types. A compile error results if T is not one of the supported types. |
- Parameters
-
| value | A value to assign to this property. |
- Returns
- A reference to this node.
◆ operator=() [2/2]
Assignment from another Value.
Performs a deep copy.
- Parameters
-
| property | A property to copy. This property's current data is destroyed. A copy of the specified property's data type is created on the heap using the copy constructor of its data type. |
- Returns
- A reference to this node.
◆ operator==()
| bool cppgraph::property::operator== |
( |
property const & |
property | ) |
const |
Returns true if a specified property's type and data value match those of this property.
- Parameters
-
| property | property whose data and type to compare with those of this property. |
- Returns
true if a specified property's type and data value match those of this property.
◆ to_string()
Returns a string representation of this property.
- Returns
- A string representation of this property.
◆ operator<< [1/2]
| std::ostream& operator<< |
( |
std::ostream & |
stream, |
|
|
property_handle const & |
h_property |
|
) |
| |
|
friend |
Serializes a property handle, as a CML member, to an output stream.
- Parameters
-
| stream | Output stream to which to send the formatted data. |
| h_property | This handle, its property, and the property's type and value are written to stream. |
- Returns
- A reference to
stream.
- Exceptions
-
| exception | h_property is nullptr. |
◆ operator<< [2/2]
| std::ostream& operator<< |
( |
std::ostream & |
stream, |
|
|
property const & |
property |
|
) |
| |
|
friend |
Serializes a property, as a CML member, to an output stream.
- Parameters
-
| stream | Output stream to which to send the formatted data. |
| property | This property, its type, and its value are written to stream. |
- Returns
- A reference to
stream.
The documentation for this struct was generated from the following files:
- c:/cppgraph/lib/cppgraph/graph/properties/property.h
- c:/cppgraph/lib/cppgraph/graph/database/property_database.h
- c:/cppgraph/lib/cppgraph/graph/properties/property.cpp