class
ValueContents
A value is a wrapper class that represent data on a fixed number of bits. The data can be either concrete, or abstract. The underlying implementation uses the Expr
and Number
classes to represent abstract and concrete values.
❱ Base classes
- class Serializable
- Virtual interface that serializable classes must implement.
❱ Constructors, destructors, conversion operators
❱ Public functions
- auto operator=(const Value& other) -> Value& defaulted
- Copy assignment.
- auto operator=(Value&& other) -> Value& defaulted
- Move assignment.
- auto operator=(const Expr& e) -> Value&
- Build Value from expression.
- auto operator=(Expr&& e) -> Value&
- Build Value from expression.
- auto operator=(const Number& n) -> Value&
- Build Value from number.
- auto operator=(Number&& n) -> Value&
- Build Value from number.
-
void set_cst(size_t size,
cst_
t val) - Build Value from constant and size in bits.
- auto as_expr() const -> Expr
- Return the value as an abstract expression.
-
auto as_int() const -> cst_
t - Return the value as a concrete signed value.
-
auto as_uint() const -> ucst_
t - Return the value as a concrete unsigned value.
-
auto as_float() const -> fcst_
t - Return the value as a concrete floating point value.
-
auto as_int(const VarContext&) const -> cst_
t - Return the value as a concrete signed value.
-
auto as_float(const VarContext&) const -> fcst_
t - Return the value as a concrete unsigned value.
- auto as_number() const -> const Number&
- Return the value as a concrete number.
- auto as_number(const VarContext&) const -> const Number&
- Return the value as a concrete number.
- auto class_uid() const -> uid_t virtual
- Return the class uid (see ClassId enum)
-
void dump(serial::
Serializer&) const virtual - Dump the object contents in a serializer stream.
-
void load(serial::
Deserializer&) virtual - Restore an object from a deserializer stream.