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

APIs using strings will be deprecated in later versions. Use APIs supporting non-string data instead.

template<typename T, typename DT>

graphStatus GetValue(DT &val) const

graphStatus GetValue(AscendString &val)

Parameters

Parameter

Input/Output

Description

val

Output

Parameter of the DT type.

Returns

graphStatus type. GRAPH_SUCCESS on success; GRAPH_FAILED on failure.

Exception Handling

None

Restrictions

None