28 #ifndef SPLA_TSCALAR_HPP
29 #define SPLA_TSCALAR_HPP
64 void set_label(std::string label)
override;
65 const std::string&
get_label()
const override;
81 return get_ttype<T>().template as<Type>();
86 m_value =
static_cast<T
>(value);
91 m_value =
static_cast<T
>(value);
96 m_value =
static_cast<T
>(value);
102 value =
static_cast<std::int32_t
>(m_value);
107 value =
static_cast<std::uint32_t
>(m_value);
112 value =
static_cast<float>(m_value);
118 m_label = std::move(label);
Status of library operation execution.
Box for a single typed scalar value.
Definition: scalar.hpp:45
Definition: tscalar.hpp:47
~TScalar() override=default
T_INT as_int() override
Definition: tscalar.hpp:60
T_FLOAT as_float() override
Definition: tscalar.hpp:62
T_UINT as_uint() override
Definition: tscalar.hpp:61
Automates reference counting and behaves as shared smart pointer.
Definition: ref.hpp:117
const std::string & get_label() const override
Definition: tscalar.hpp:122
void set_label(std::string label) override
Definition: tscalar.hpp:117
Status set_uint(std::uint32_t value) override
Definition: tscalar.hpp:90
Status get_float(float &value) override
Definition: tscalar.hpp:111
Status set_float(float value) override
Definition: tscalar.hpp:95
Status get_uint(std::uint32_t &value) override
Definition: tscalar.hpp:106
T & get_value()
Definition: tscalar.hpp:127
Status get_int(std::int32_t &value) override
Definition: tscalar.hpp:101
ref_ptr< Type > get_type() override
Definition: tscalar.hpp:80
Status set_int(std::int32_t value) override
Definition: tscalar.hpp:85
std::int32_t T_INT
Definition: type.hpp:58
std::uint32_t T_UINT
Definition: type.hpp:59
float T_FLOAT
Definition: type.hpp:60
Definition: algorithm.hpp:37