Loading...
Searching...
No Matches
caf::detail::type_erased_value_impl< T > Class Template Reference

Default implementation for single type-erased values. More...

`#include <type_erased_value_impl.hpp>`

Inheritance diagram for caf::detail::type_erased_value_impl< T >:

## Public Types

using | value_type = typename detail::strip_reference_wrapper<T>::type

## Public Member Functions

template<class... Ts>
| type_erased_value_impl (Ts &&... xs)
template<class U, size_t N, class = typename std::enable_if<std::is_same<T, U[N]>::value>::type>
| type_erased_value_impl (const U(&ys)[N])
template<class U, size_t N, class = typename std::enable_if<std::is_same<T, U[N]>::value>::type>
| type_erased_value_impl (const U(&&ys)[N])
| type_erased_value_impl (type_erased_value_impl &&other)
| type_erased_value_impl (const type_erased_value_impl &other)
void * | get_mutable () override
| Returns a mutable pointer to the stored value.
error | load (deserializer &source) override
| Load the content for the stored value from source.
rtti_pair | type () const override
| Returns the type number and type information object for the stored value.
const void * | get () const override
| Returns a pointer to the stored value.
error | save (serializer &sink) const override
| Saves the content of the stored value to sink.
std::string | stringify () const override
| Converts the stored value to a string.
type_erased_value_ptr | copy () const override
| Returns a copy of the stored value.
| operator value_type & ()
| operator const value_type & () const
Public Member Functions inherited from caf::type_erased_value
bool | matches (uint16_t nr, const std::type_info *ptr) const
| Checks whether the type of the stored value matches the type nr and type info object.
uint16_t | type_nr () const
| Returns the type number for the stored value.
bool | matches (const rtti_pair &rtti) const
| Checks whether the type of the stored value matches rtti.
template<class T>
const T & | get_as () const
| Convenience function for reinterpret_cast<const T*>(get()).
template<class T>
T & | get_mutable_as ()
| Convenience function for reinterpret_cast<T*>(get_mutable()).

## Static Public Member Functions

static rtti_pair | type (std::integral_constant< uint16_t, 0 >)
template<uint16_t V>
static rtti_pair | type (std::integral_constant< uint16_t, V >)

## Additional Inherited Members

Related Symbols inherited from caf::type_erased_value
template<class T, class... Ts>
type_erased_value_ptr | make_type_erased_value (Ts &&... xs)
| Creates a type-erased value of type T from xs.
template<class T>
detail::type_erased_value_impl< std::reference_wrapper< T > > | make_type_erased_view (T &x)
| Creates a type-erased view for x.

## Detailed Description

template<class T>
class caf::detail::type_erased_value_impl< T >

Default implementation for single type-erased values.

## Member Function Documentation

## copy()

template<class T>

type_erased_value_ptr caf::detail::type_erased_value_impl< T >::copy | ( |  | ) | const

override virtual

Returns a copy of the stored value.

Implements caf::type_erased_value.

## get()

template<class T>

const void * caf::detail::type_erased_value_impl< T >::get | ( |  | ) | const

override virtual

Returns a pointer to the stored value.

Implements caf::type_erased_value.

## get_mutable()

template<class T>

void * caf::detail::type_erased_value_impl< T >::get_mutable | ( |  | ) |

override virtual

Returns a mutable pointer to the stored value.

Implements caf::type_erased_value.

## load()

template<class T>

error caf::detail::type_erased_value_impl< T >::load | ( | deserializer & | source | ) |

override virtual

Load the content for the stored value from source.

Implements caf::type_erased_value.

## save()

template<class T>

error caf::detail::type_erased_value_impl< T >::save | ( | serializer & | sink | ) | const

override virtual

Saves the content of the stored value to sink.

Implements caf::type_erased_value.

## stringify()

template<class T>

std::string caf::detail::type_erased_value_impl< T >::stringify | ( |  | ) | const

override virtual

Converts the stored value to a string.

Implements caf::type_erased_value.

## type()

template<class T>

rtti_pair caf::detail::type_erased_value_impl< T >::type | ( |  | ) | const

override virtual

Returns the type number and type information object for the stored value.

Implements caf::type_erased_value.

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

- /build/actor-framework-Z9pIPl/actor-framework-0.17.6/libcaf_core/caf/detail/type_erased_value_impl.hpp