Ares
|
#include <src/Utilities/Template.h>
Public Types | |
typedef T::Value | V |
Public Member Functions | |
ValueableEnum (V Default=V()) | |
operator V () const | |
operator V * () | |
V * | operator& () |
bool | operator!= (T other) const |
bool | operator! () const |
virtual V | Get () const |
virtual V * | GetEx () |
virtual void | Set (V val) |
virtual void | SetEx (V *val) |
void | Read (INI_EX *parser, const char *pSection, const char *pKey) |
Protected Attributes | |
V | Value |
typedef T::Value ValueableEnum< T >::V |
ValueableEnum< T >::ValueableEnum | ( | V | Default = V() | ) | [inline] |
: Value(Default) {};
virtual V ValueableEnum< T >::Get | ( | ) | const [inline, virtual] |
{ return this->Value; }
virtual V* ValueableEnum< T >::GetEx | ( | ) | [inline, virtual] |
{ return &this->Value; }
ValueableEnum< T >::operator V | ( | ) | const [inline] |
{ return this->Get(); }
ValueableEnum< T >::operator V * | ( | ) | [inline] |
{ return this->GetEx(); }
bool ValueableEnum< T >::operator! | ( | ) | const [inline] |
{ return this->Get() == 0; };
bool ValueableEnum< T >::operator!= | ( | T | other | ) | const [inline] |
{ return this->Get() != other; };
V* ValueableEnum< T >::operator& | ( | ) | [inline] |
{ return this->GetEx(); }
void ValueableEnum< T >::Read | ( | INI_EX * | parser, |
const char * | pSection, | ||
const char * | pKey | ||
) | [inline] |
{ if(parser->ReadString(pSection, pKey)) { V buffer = this->Get(); if(T::Parse(Ares::readBuffer, &buffer)) { this->Set(buffer); } } };
virtual void ValueableEnum< T >::Set | ( | V | val | ) | [inline, virtual] |
{ this->Value = val; }
virtual void ValueableEnum< T >::SetEx | ( | V * | val | ) | [inline, virtual] |
{ this->Value = *val; }
V ValueableEnum< T >::Value [protected] |