Holds a mutable attribute value and its type.
More...
#include <attributes.hpp>
|
void | type_check (Type check) const |
| Checks that the value is a given type, throws exception if not correct type.
|
|
template<typename value_t> |
auto | as () -> value_t & |
| Returns a refernce to the value as a given type.
|
|
template<typename value_t> |
auto | as_ptr () const -> value_t * |
| Returns a pointer to the value as a given type.
|
|
Holds a mutable attribute value and its type.
◆ as()
template<typename value_t>
auto VIPRA::Behaviors::AttributeValue::as |
( |
| ) |
-> value_t&
|
|
inlinenodiscard |
Returns a refernce to the value as a given type.
- Template Parameters
-
- Returns
- value_t&
◆ as_ptr()
template<typename value_t>
auto VIPRA::Behaviors::AttributeValue::as_ptr |
( |
| ) |
const -> value_t*
|
|
inlinenodiscard |
Returns a pointer to the value as a given type.
- Template Parameters
-
- Returns
- value_t*
◆ type_check()
void VIPRA::Behaviors::AttributeValue::type_check |
( |
Type | check | ) |
const |
|
inline |
Checks that the value is a given type, throws exception if not correct type.
- Parameters
-
check | : type value should be |
The documentation for this struct was generated from the following file: