3#include <Core/CoreMacros.hpp>
5#include <Core/Utils/BijectiveAssociation.hpp>
7#include <initializer_list>
23template <
typename EnumBaseType>
33 m_valueToString { pairs } {}
35 std::string getEnumerator( EnumBaseType v )
const {
return m_valueToString( v ); }
36 EnumBaseType getEnumerator(
const std::string& v )
const {
return m_valueToString.
key( v ); }
40 for (
const auto& p : m_valueToString ) {
47 Core::Utils::BijectiveAssociation<EnumBaseType, std::string> m_valueToString;
size_t size() const
Gets the size of the association, i.e. the numer of <Key, Value> pairs.
key_type key(const value_type &value) const
Gets the key associated to a value.
This class manage the bijective association between string and integral representation of an enumerat...
EnumConverter(std::initializer_list< std::pair< EnumBaseType, std::string > > pairs)
hepler function to manage enum as underlying types in VariableSet