Class AttrValue
Constructor and Destructor
Description
Constructs or destructs an object of class AttrValue.
Prototype
AttrValue();
~AttrValue()
Parameters
None
Returns
An AttrValue object.
Exception Handling
None
Restrictions
None
CreateFrom
Description
Converts DT-type data types (int64_t, float, and std::string) to T-type data types (INT, FLOAT, and STR). The supported conversion options are as follows:
- Converting int64_t type to INT
- Converting float to FLOAT
- Converting std::string to STR
Prototype
template<typename T, typename DT>
static T CreateFrom(DT&& val)
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
val |
Input |
Parameter of the DT type. |
Returns
Parameter |
Type |
Description |
---|---|---|
- |
|
Parameter of the T type. |
Exception Handling
None
Restrictions
None
GetValue
Description
Obtains the value of value in the key-value pair and converts the obtained value from the T type to the DT type. The supported conversion options are as follows:
- Converting INT to int64_t
- Converting FLOAT to float
- Converting STR to std::string
Prototype
template<typename T, typename DT>
graphStatus GetValue(DT& val) const
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
val |
Output |
Parameter of the DT type. |
Returns
Parameter |
Type |
Description |
---|---|---|
- |
graphStatus |
GRAPH_SUCCESS on success; GRAPH_FAILED on failure. |
Exception Handling
None
Restrictions
None