VIPRA Documentation
Loading...
Searching...
No Matches
VIPRA::Behaviors::CAttributeValue Struct Reference

Holds an immutable attribute value and its type. More...

#include <attributes.hpp>

Public Member Functions

 CAttributeValue (Type aType, void const *aVal)
 
void type_check (Type check) const
 
template<typename value_t>
auto as () const -> value_t const &
 Returns a refernce to the value as a given type.
 
template<typename value_t>
auto as_ptr () const -> value_t const *
 Returns a pointer to the value as a given type.
 

Public Attributes

Type type
 
void const * value
 

Detailed Description

Holds an immutable attribute value and its type.

Member Function Documentation

◆ as()

template<typename value_t>
auto VIPRA::Behaviors::CAttributeValue::as ( ) const -> value_t const&
inlinenodiscard

Returns a refernce to the value as a given type.

Template Parameters
value_t
Returns
const value_t&

◆ as_ptr()

template<typename value_t>
auto VIPRA::Behaviors::CAttributeValue::as_ptr ( ) const -> value_t const*
inlinenodiscard

Returns a pointer to the value as a given type.

Template Parameters
value_t
Returns
const value_t*

The documentation for this struct was generated from the following file: