rili::SiblingVariant< Base, Types > Class Template Reference
Inheritance diagram for rili::SiblingVariant< Base, Types >:
[legend]
Collaboration diagram for rili::SiblingVariant< Base, Types >:
[legend]

Public Member Functions

template<typename T >
T & base () noexcept
 
template<typename T >
T const & base () const noexcept
 
template<typename T >
T & get ()
 
template<typename T >
T const & get () const
 
- Public Member Functions inherited from rili::Variant< Types... >
 Variant ()
 
 Variant (const Variant< Types... > &other)
 
 Variant (Variant< Types... > &&other)
 
Variant< Types... > & operator= (Variant< Types... > &&other)
 
Variant< Types... > & operator= (Variant< Types... > const &other)
 
bool is () const
 
bool valid ()
 
void set (Args &&...args)
 
T & get ()
 
T const & get () const
 

Member Function Documentation

template<typename Base , typename... Types>
template<typename T >
T& rili::SiblingVariant< Base, Types >::base ( )
inlinenoexcept

base used to get reference to base class of all possibly holded types

Returns
base class reference
template<typename Base , typename... Types>
template<typename T >
T const& rili::SiblingVariant< Base, Types >::base ( ) const
inlinenoexcept

base used to get reference to base class of all possibly holded types

Returns
base class reference
template<typename Base , typename... Types>
template<typename T >
T& rili::SiblingVariant< Base, Types >::get ( )
inline

used to get value of Variant

Warning
if type T is not equal to currently stored type in Variant or not base of allpossible types std::bad_cast will be thrown
Returns
current Variant value
template<typename Base , typename... Types>
template<typename T >
T const& rili::SiblingVariant< Base, Types >::get ( ) const
inline

used to get value of Variant

Warning
if type T is not equal to currently stored type in Variant or not base of allpossible types std::bad_cast will be thrown
Returns
current Variant value

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