neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::i_variant< Types > Class Template Referenceabstract

#include <i_variant.hpp>

Inheritance diagram for neolib::i_variant< Types >:
neolib::i_reference_counted

Public Types

typedef self_type abstract_type
 

Public Member Functions

virtual ~i_variant ()=default
 
virtual std::size_t index () const =0
 
template<typename T >
bool holds_alternative () const
 
template<typename T >
T constget_if () const
 
template<typename T >
Tget_if ()
 
template<typename T >
T constget () const
 
template<typename T >
Tget ()
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 
virtual void add_ref () const noexcept=0
 
virtual void release () const =0
 
virtual int32_t use_count () const noexcept=0
 
virtual const i_reference_countedrelease_and_take_ownership () const =0
 
virtual i_reference_countedrelease_and_take_ownership ()=0
 
virtual void pin () const noexcept=0
 
virtual void unpin () const =0
 
virtual i_ref_control_blockcontrol_block ()=0
 

Detailed Description

template<typename... Types>
class neolib::i_variant< Types >

Definition at line 48 of file i_variant.hpp.

Member Typedef Documentation

◆ abstract_type

template<typename... Types>
typedef self_type neolib::i_variant< Types >::abstract_type

Definition at line 52 of file i_variant.hpp.

Constructor & Destructor Documentation

◆ ~i_variant()

template<typename... Types>
virtual neolib::i_variant< Types >::~i_variant ( )
virtualdefault

Member Function Documentation

◆ get() [1/2]

template<typename... Types>
template<typename T >
T & neolib::i_variant< Types >::get ( )
inline

Definition at line 88 of file i_variant.hpp.

◆ get() [2/2]

template<typename... Types>
template<typename T >
T const & neolib::i_variant< Types >::get ( ) const
inline

Definition at line 81 of file i_variant.hpp.

◆ get_if() [1/2]

template<typename... Types>
template<typename T >
T * neolib::i_variant< Types >::get_if ( )
inline

Definition at line 74 of file i_variant.hpp.

◆ get_if() [2/2]

template<typename... Types>
template<typename T >
T const * neolib::i_variant< Types >::get_if ( ) const
inline

Definition at line 67 of file i_variant.hpp.

◆ holds_alternative()

template<typename... Types>
template<typename T >
bool neolib::i_variant< Types >::holds_alternative ( ) const
inline

Definition at line 62 of file i_variant.hpp.

◆ index()


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