Euphoria
eu::EnumToStringImplementation< T > Struct Template Reference

#include <enumtostring.h>

Public Member Functions

EnumToStringImplementation< T > & add (const std::string &name, T t)
 
std::string to_string (T t) const
 
MatchedEnum< T > match (const std::string &input, size_t max_size) const
 
std::vector< std::string > get_list_of_names () const
 
std::vector< T > get_list_of_values () const
 

Public Attributes

std::map< T, std::string > enum_to_string
 
std::map< std::string, T > string_to_enum
 
int size = 0
 

Detailed Description

template<typename T>
struct eu::EnumToStringImplementation< T >

Definition at line 27 of file enumtostring.h.

Member Function Documentation

◆ add()

template<typename T >
EnumToStringImplementation<T>& eu::EnumToStringImplementation< T >::add ( const std::string &  name,
t 
)
inline

Definition at line 35 of file enumtostring.h.

◆ get_list_of_names()

template<typename T >
std::vector<std::string> eu::EnumToStringImplementation< T >::get_list_of_names ( ) const
inline

Definition at line 93 of file enumtostring.h.

◆ get_list_of_values()

template<typename T >
std::vector<T> eu::EnumToStringImplementation< T >::get_list_of_values ( ) const
inline

Definition at line 104 of file enumtostring.h.

◆ match()

template<typename T >
MatchedEnum<T> eu::EnumToStringImplementation< T >::match ( const std::string &  input,
size_t  max_size 
) const
inline

Definition at line 55 of file enumtostring.h.

◆ to_string()

template<typename T >
std::string eu::EnumToStringImplementation< T >::to_string ( t) const
inline

Definition at line 43 of file enumtostring.h.

Member Data Documentation

◆ enum_to_string

template<typename T >
std::map<T, std::string> eu::EnumToStringImplementation< T >::enum_to_string

Definition at line 29 of file enumtostring.h.

◆ size

template<typename T >
int eu::EnumToStringImplementation< T >::size = 0

Definition at line 31 of file enumtostring.h.

◆ string_to_enum

template<typename T >
std::map<std::string, T> eu::EnumToStringImplementation< T >::string_to_enum

Definition at line 30 of file enumtostring.h.


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