neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::basic_enum< Enum > Class Template Reference

#include <enum.hpp>

Inheritance diagram for neolib::basic_enum< Enum >:
neolib::reference_counted< i_basic_enum< std::underlying_type_t< Enum > > > neolib::i_basic_enum< std::underlying_type_t< Enum > > neolib::i_reference_counted

Public Types

typedef i_basic_enum< std::underlying_type_t< Enum > > abstract_type
 
typedef Enum enum_type
 
typedef std::underlying_type_t< Enumunderlying_type
 
- Public Types inherited from neolib::i_basic_enum< std::underlying_type_t< Enum > >
typedef self_type abstract_type
 
typedef std::underlying_type_t< Enum > underlying_type
 
typedef i_multimap< underlying_type, i_stringenumerators_t
 

Public Member Functions

 basic_enum ()
 
 basic_enum (enum_type aValue)
 
 basic_enum (const abstract_type &aOther)
 
underlying_type value () const final
 
void set_value (underlying_type aValue) final
 
underlying_type set_value (const i_string &aValue) final
 
underlying_type constdata () const final
 
underlying_typedata () final
 
void to_string (i_string &aString) const final
 
const base_type::enumerators_tenumerators () const final
 
- Public Member Functions inherited from neolib::reference_counted< i_basic_enum< std::underlying_type_t< Enum > > >
 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_basic_enum< std::underlying_type_t< Enum > >
ref_ptr< self_typeclone () const
 
self_typeoperator= (const self_type &aRhs)
 
bool operator== (const self_type &that) const
 
std::strong_ordering operator<=> (const self_type &that) const
 
Enum value () const
 
void set_value (Enum aValue)
 
Enum set_value (const std::string &aValue)
 
string to_string () const
 
std::string to_std_string () const
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 

Detailed Description

template<typename Enum>
class neolib::basic_enum< Enum >

Definition at line 47 of file enum.hpp.

Member Typedef Documentation

◆ abstract_type

template<typename Enum >
typedef i_basic_enum<std::underlying_type_t<Enum> > neolib::basic_enum< Enum >::abstract_type

Definition at line 56 of file enum.hpp.

◆ enum_type

template<typename Enum >
typedef Enum neolib::basic_enum< Enum >::enum_type

Definition at line 57 of file enum.hpp.

◆ underlying_type

template<typename Enum >
typedef std::underlying_type_t<Enum> neolib::basic_enum< Enum >::underlying_type

Definition at line 58 of file enum.hpp.

Constructor & Destructor Documentation

◆ basic_enum() [1/3]

template<typename Enum >
neolib::basic_enum< Enum >::basic_enum ( )
inline

Definition at line 61 of file enum.hpp.

◆ basic_enum() [2/3]

template<typename Enum >
neolib::basic_enum< Enum >::basic_enum ( enum_type  aValue)
inline

Definition at line 65 of file enum.hpp.

◆ basic_enum() [3/3]

template<typename Enum >
neolib::basic_enum< Enum >::basic_enum ( const abstract_type aOther)
inline

Definition at line 69 of file enum.hpp.

Member Function Documentation

◆ data() [1/2]

template<typename Enum >
underlying_type const * neolib::basic_enum< Enum >::data ( ) const
inlinefinalvirtual

Implements neolib::i_basic_enum< std::underlying_type_t< Enum > >.

Definition at line 93 of file enum.hpp.

◆ data() [2/2]

template<typename Enum >
underlying_type * neolib::basic_enum< Enum >::data ( )
inlinefinalvirtual

Implements neolib::i_basic_enum< std::underlying_type_t< Enum > >.

Definition at line 97 of file enum.hpp.

◆ enumerators()

template<typename Enum >
const base_type::enumerators_t & neolib::basic_enum< Enum >::enumerators ( ) const
inlinefinalvirtual

Implements neolib::i_basic_enum< std::underlying_type_t< Enum > >.

Definition at line 107 of file enum.hpp.

◆ set_value() [1/2]

template<typename Enum >
underlying_type neolib::basic_enum< Enum >::set_value ( const i_string aValue)
inlinefinalvirtual

Implements neolib::i_basic_enum< std::underlying_type_t< Enum > >.

Definition at line 83 of file enum.hpp.

◆ set_value() [2/2]

template<typename Enum >
void neolib::basic_enum< Enum >::set_value ( underlying_type  aValue)
inlinefinalvirtual

Implements neolib::i_basic_enum< std::underlying_type_t< Enum > >.

Definition at line 79 of file enum.hpp.

◆ to_string()

template<typename Enum >
void neolib::basic_enum< Enum >::to_string ( i_string aString) const
inlinefinalvirtual

Implements neolib::i_basic_enum< std::underlying_type_t< Enum > >.

Definition at line 103 of file enum.hpp.

◆ value()

template<typename Enum >
underlying_type neolib::basic_enum< Enum >::value ( ) const
inlinefinalvirtual

Implements neolib::i_basic_enum< std::underlying_type_t< Enum > >.

Definition at line 75 of file enum.hpp.


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