Class HandleDataType

Class Documentation

class HandleDataType

Public Types

enum Value

Values:

enumerator UNKNOWN
enumerator DOUBLE
enumerator FLOAT32
enumerator BOOL
enumerator UINT8
enumerator INT8
enumerator UINT16
enumerator INT16
enumerator UINT32
enumerator INT32

Public Functions

HandleDataType() = default
inline constexpr HandleDataType(Value value)
inline explicit HandleDataType(const std::string &data_type)
inline operator Value() const
explicit operator bool() const = delete
inline constexpr bool operator==(HandleDataType other) const
inline constexpr bool operator!=(HandleDataType other) const
inline constexpr bool operator==(Value other) const
inline constexpr bool operator!=(Value other) const
inline std::string to_string() const
inline bool is_castable_to_double() const

Check if the HandleDataType can be casted to double.

Note

Once we add support for more data types, this function should be updated

Returns:

True if the HandleDataType can be casted to double, false otherwise.

inline double cast_to_double(const HANDLE_DATATYPE &value) const

Cast the given value to double.

Note

Once we add support for more data types, this function should be updated

Parameters:

value – The value to be casted.

Throws:

std::runtime_error – if the HandleDataType cannot be casted to double.

Returns:

The casted value.

inline HandleDataType from_string(const std::string &data_type)