Class HandleDataType
Defined in File hardware_info.hpp
Class Documentation
-
class HandleDataType
Public Types
Public Functions
-
HandleDataType() = default
-
inline explicit HandleDataType(const std::string &data_type)
-
explicit operator bool() const = delete
-
inline constexpr bool operator==(HandleDataType other) const
-
inline constexpr bool operator!=(HandleDataType 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)
-
HandleDataType() = default