fc::enum_type -> string
This commit is contained in:
parent
f5fa11bc36
commit
61f84777c4
1 changed files with 3 additions and 3 deletions
|
|
@ -3,7 +3,6 @@
|
||||||
#include <fc/io/raw_fwd.hpp>
|
#include <fc/io/raw_fwd.hpp>
|
||||||
#include <fc/variant.hpp>
|
#include <fc/variant.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace fc
|
namespace fc
|
||||||
{
|
{
|
||||||
template<typename IntType, typename EnumType>
|
template<typename IntType, typename EnumType>
|
||||||
|
|
@ -18,8 +17,9 @@ namespace fc
|
||||||
|
|
||||||
enum_type(){}
|
enum_type(){}
|
||||||
|
|
||||||
operator IntType()const { return static_cast<IntType>(value); }
|
operator IntType()const { return static_cast<IntType>(value); }
|
||||||
operator EnumType()const { return value; }
|
operator EnumType()const { return value; }
|
||||||
|
operator std::string()const { return fc::reflector<EnumType>::to_string(value); }
|
||||||
|
|
||||||
enum_type& operator=( IntType i ) { value = (EnumType)i; return *this;}
|
enum_type& operator=( IntType i ) { value = (EnumType)i; return *this;}
|
||||||
enum_type& operator=( EnumType i ) { value = i; return *this;}
|
enum_type& operator=( EnumType i ) { value = i; return *this;}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue