COPASI API  4.40.278
CEnumAnnotation< Type, Enum > Class Template Reference

#include <CEnumAnnotation.h>

Inheritance diagram for CEnumAnnotation< Type, Enum >:
[legend]

Public Types

typedef std::array< Type, static_cast< size_t >Enum::__SIZE) > base
 

Public Member Functions

std::vector< Type > annotations () const
 
 CEnumAnnotation ()
 
 CEnumAnnotation (const CEnumAnnotation &src)
 
 CEnumAnnotation (typename std::enable_if< !(std::is_same< Type, const char * >::value||std::is_const< Type >::value), const base & >::type src)
 
base::const_reference operator[] (Enum e) const
 
base::const_reference operator[] (size_t i) const
 
Enum toEnum (const char *pAnnotation, Enum enumDefault=Enum::__SIZE) const
 
Enum toEnum (const Type &annotation, Enum enumDefault=Enum::__SIZE) const
 

Private Attributes

std::map< Type, Enum > mMap
 

Member Typedef Documentation

◆ base

template<class Type , class Enum >
typedef std::array< Type, static_cast< size_t >Enum::__SIZE) > CEnumAnnotation< Type, Enum >::base

typedef for the base class

Constructor & Destructor Documentation

◆ CEnumAnnotation() [1/3]

template<class Type , class Enum >
CEnumAnnotation< Type, Enum >::CEnumAnnotation ( )
inline

Default constructor

◆ CEnumAnnotation() [2/3]

template<class Type , class Enum >
CEnumAnnotation< Type, Enum >::CEnumAnnotation ( const CEnumAnnotation< Type, Enum > &  src)
inline

Disable the copy constructor

◆ CEnumAnnotation() [3/3]

template<class Type , class Enum >
CEnumAnnotation< Type, Enum >::CEnumAnnotation ( typename std::enable_if< !(std::is_same< Type, const char * >::value||std::is_const< Type >::value), const base & >::type  src)
inline

Specific constructor from the base class

Parameters
constbase & src

References CEnumAnnotation< Type, Enum >::mMap.

Member Function Documentation

◆ annotations()

template<class Type , class Enum >
std::vector< Type > CEnumAnnotation< Type, Enum >::annotations ( ) const
inline

◆ operator[]() [1/2]

template<class Type , class Enum >
base::const_reference CEnumAnnotation< Type, Enum >::operator[] ( Enum  e) const
inline

Operator []

Parameters
Enume
Returns
const Type & annotation

◆ operator[]() [2/2]

template<class Type , class Enum >
base::const_reference CEnumAnnotation< Type, Enum >::operator[] ( size_t  i) const
inline

Operator []

Parameters
size_ti
Returns
const Type & annotation

◆ toEnum() [1/2]

template<class Type , class Enum >
Enum CEnumAnnotation< Type, Enum >::toEnum ( const char *  pAnnotation,
Enum  enumDefault = Enum::__SIZE 
) const
inline

Conversion from annotation to enum

Parameters
constchar * pAnnotation
EnumenumDefault (default: Enum::__SIZE)

References CEnumAnnotation< Type, Enum >::toEnum().

◆ toEnum() [2/2]

Member Data Documentation

◆ mMap

template<class Type , class Enum >
std::map< Type, Enum > CEnumAnnotation< Type, Enum >::mMap
private

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