neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::plugin_variant< Id, Types > Class Template Reference

#include <plugin_variant.hpp>

Inheritance diagram for neolib::plugin_variant< Id, Types >:
neolib::reference_counted< i_plugin_variant< Id, abstract_t< Types >... > > neolib::i_plugin_variant< Id, abstract_t< Types >... > neolib::i_reference_counted

Public Types

typedef i_plugin_variant< Id, abstract_t< Types >... > abstract_type
 
typedef std::variant< std::monostate, Types... > variant_type
 
- Public Types inherited from neolib::i_plugin_variant< Id, abstract_t< Types >... >
typedef self_type abstract_type
 
typedef Id id_t
 
typedef std::size_t index_type
 

Public Member Functions

 plugin_variant (const self_type &aOther)
 
 plugin_variant (self_type &&aOther) noexcept
 
 plugin_variant (const abstract_type &aOther)
 
 plugin_variant (abstract_type &&aOther) noexcept
 
self_typeoperator= (const self_type &aOther)
 
self_typeoperator= (self_type &&aOther) noexcept
 
self_typeoperator= (none_t)
 
bool operator== (none_t) const
 
bool operator== (const abstract_type &that) const final
 
bool operator< (const abstract_type &that) const final
 
std::partial_ordering operator<=> (const self_type &that) const
 
void clear () final
 
id_t which () const final
 
bool empty () const final
 
const variant_typeas_std_variant () const
 
variant_typeas_std_variant ()
 
const i_enum_t< Id >::enumerators_t & ids () const final
 
std::string which_as_string () const
 
- Public Member Functions inherited from neolib::reference_counted< i_plugin_variant< Id, abstract_t< Types >... > >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_typerelease_and_take_ownership () const override
 
base_typerelease_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 
- Public Member Functions inherited from neolib::i_plugin_variant< Id, abstract_t< Types >... >
ref_ptr< self_typeclone () const
 
self_typeoperator= (const self_type &aOther)
 
self_typeoperator= (self_type &&aOther)
 
std::enable_if_t<!std::is_base_of_v< self_type, T >, self_type > & operator= (const T &aArgument)
 
std::enable_if_t<!std::is_base_of_v< self_type, std::remove_reference_t< T > >, self_type > & operator= (T &&aArgument)
 
self_typeoperator= (const none_t)
 
virtual bool operator== (const self_type &that) const=0
 
bool operator== (const none_t) const
 
virtual bool operator< (const self_type &that) const=0
 
std::partial_ordering operator<=> (const self_type &that) const
 
bool operator!= (const none_t) const
 
const T & get () const
 
T & get ()
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 

Detailed Description

template<typename Id, typename... Types>
class neolib::plugin_variant< Id, Types >

Definition at line 98 of file plugin_variant.hpp.

Member Typedef Documentation

◆ abstract_type

template<typename Id , typename... Types>
typedef i_plugin_variant<Id, abstract_t<Types>...> neolib::plugin_variant< Id, Types >::abstract_type

Definition at line 106 of file plugin_variant.hpp.

◆ variant_type

template<typename Id , typename... Types>
typedef std::variant<std::monostate, Types...> neolib::plugin_variant< Id, Types >::variant_type

Definition at line 109 of file plugin_variant.hpp.

Constructor & Destructor Documentation

◆ plugin_variant() [1/4]

template<typename Id , typename... Types>
neolib::plugin_variant< Id, Types >::plugin_variant ( const self_type aOther)
inline

Definition at line 113 of file plugin_variant.hpp.

◆ plugin_variant() [2/4]

template<typename Id , typename... Types>
neolib::plugin_variant< Id, Types >::plugin_variant ( self_type &&  aOther)
inlinenoexcept

Definition at line 118 of file plugin_variant.hpp.

◆ plugin_variant() [3/4]

template<typename Id , typename... Types>
neolib::plugin_variant< Id, Types >::plugin_variant ( const abstract_type aOther)
inline

Definition at line 123 of file plugin_variant.hpp.

◆ plugin_variant() [4/4]

template<typename Id , typename... Types>
neolib::plugin_variant< Id, Types >::plugin_variant ( abstract_type &&  aOther)
inlinenoexcept

Definition at line 128 of file plugin_variant.hpp.

Member Function Documentation

◆ as_std_variant() [1/2]

template<typename Id , typename... Types>
variant_type & neolib::plugin_variant< Id, Types >::as_std_variant ( )
inline

Definition at line 220 of file plugin_variant.hpp.

◆ as_std_variant() [2/2]

template<typename Id , typename... Types>
const variant_type & neolib::plugin_variant< Id, Types >::as_std_variant ( ) const
inline

Definition at line 216 of file plugin_variant.hpp.

◆ clear()

template<typename Id , typename... Types>
void neolib::plugin_variant< Id, Types >::clear ( )
inlinefinalvirtual

◆ empty()

template<typename Id , typename... Types>
bool neolib::plugin_variant< Id, Types >::empty ( ) const
inlinefinalvirtual

◆ ids()

template<typename Id , typename... Types>
const i_enum_t< Id >::enumerators_t & neolib::plugin_variant< Id, Types >::ids ( ) const
inlinefinalvirtual

◆ operator<()

template<typename Id , typename... Types>
bool neolib::plugin_variant< Id, Types >::operator< ( const abstract_type that) const
inlinefinal

Definition at line 171 of file plugin_variant.hpp.

◆ operator<=>()

template<typename Id , typename... Types>
std::partial_ordering neolib::plugin_variant< Id, Types >::operator<=> ( const self_type that) const
inline

Definition at line 189 of file plugin_variant.hpp.

◆ operator=() [1/3]

template<typename Id , typename... Types>
self_type & neolib::plugin_variant< Id, Types >::operator= ( const self_type aOther)
inline

Definition at line 133 of file plugin_variant.hpp.

◆ operator=() [2/3]

template<typename Id , typename... Types>
self_type & neolib::plugin_variant< Id, Types >::operator= ( none_t  )
inline

Definition at line 143 of file plugin_variant.hpp.

◆ operator=() [3/3]

template<typename Id , typename... Types>
self_type & neolib::plugin_variant< Id, Types >::operator= ( self_type &&  aOther)
inlinenoexcept

Definition at line 138 of file plugin_variant.hpp.

◆ operator==() [1/2]

template<typename Id , typename... Types>
bool neolib::plugin_variant< Id, Types >::operator== ( const abstract_type that) const
inlinefinal

Definition at line 155 of file plugin_variant.hpp.

◆ operator==() [2/2]

template<typename Id , typename... Types>
bool neolib::plugin_variant< Id, Types >::operator== ( none_t  ) const
inline

Definition at line 151 of file plugin_variant.hpp.

◆ which()

template<typename Id , typename... Types>
id_t neolib::plugin_variant< Id, Types >::which ( ) const
inlinefinalvirtual

◆ which_as_string()

template<typename Id , typename... Types>
std::string neolib::plugin_variant< Id, Types >::which_as_string ( ) const
inline

Definition at line 228 of file plugin_variant.hpp.


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