Ares
|
#include <src/Utilities/Template.h>
Public Types | |
typedef T | MyType |
typedef CompoundT< T >::BaseT | MyBase |
Public Member Functions | |
Valueable (T Default=T()) | |
operator T () const | |
operator T * () | |
T * | operator& () |
bool | operator!= (T other) const |
bool | operator! () const |
virtual T | Get () const |
virtual T * | GetEx () |
virtual void | Set (T val) |
virtual void | SetEx (T *val) |
void | Read (INI_EX *parser, const char *pSection, const char *pKey) |
void | Parse (INI_EX *parser, const char *pSection, const char *pKey, bool Allocate=0) |
Protected Attributes | |
T | Value |
More fancy templates! This one is just a nicer-looking INI Parser... the fun starts with the next one
virtual T Valueable< T >::Get | ( | ) | const [inline, virtual] |
Reimplemented in Customizable< T >, Customizable< AnimTypeClass * >, Customizable< signed int >, Customizable< WarheadTypeClass * >, Customizable< double >, Customizable< InfantryTypeClass * >, Customizable< SHPStruct * >, Customizable< int >, Customizable< UnitTypeClass * >, Customizable< ColorStruct >, and Customizable< bool >.
{ return this->Value; }
virtual T* Valueable< T >::GetEx | ( | ) | [inline, virtual] |
Reimplemented in Customizable< T >, Customizable< AnimTypeClass * >, Customizable< signed int >, Customizable< WarheadTypeClass * >, Customizable< double >, Customizable< InfantryTypeClass * >, Customizable< SHPStruct * >, Customizable< int >, Customizable< UnitTypeClass * >, Customizable< ColorStruct >, and Customizable< bool >.
{ return &this->Value; }
bool Valueable< T >::operator! | ( | ) | const [inline] |
Reimplemented in Customizable< T >, Customizable< AnimTypeClass * >, Customizable< signed int >, Customizable< WarheadTypeClass * >, Customizable< double >, Customizable< InfantryTypeClass * >, Customizable< SHPStruct * >, Customizable< int >, Customizable< UnitTypeClass * >, Customizable< ColorStruct >, and Customizable< bool >.
{ return this->Get() == 0; };
bool Valueable< T >::operator!= | ( | T | other | ) | const [inline] |
Reimplemented in Customizable< T >, Customizable< AnimTypeClass * >, Customizable< signed int >, Customizable< WarheadTypeClass * >, Customizable< double >, Customizable< InfantryTypeClass * >, Customizable< SHPStruct * >, Customizable< int >, Customizable< UnitTypeClass * >, Customizable< ColorStruct >, and Customizable< bool >.
{ return this->Get() != other; };
void Valueable< T >::Parse | ( | INI_EX * | parser, |
const char * | pSection, | ||
const char * | pKey, | ||
bool | Allocate = 0 |
||
) | [inline] |
{ if(parser->ReadString(pSection, pKey)) { const char * val = parser->value(); if(auto parsed = (Allocate ? MyBase::FindOrAllocate : MyBase::Find)(val)) { this->Set(parsed); } else { Debug::INIParseFailed(pSection, pKey, val); } } }
void Valueable< T >::Read | ( | INI_EX * | parser, |
const char * | pSection, | ||
const char * | pKey | ||
) | [inline] |
{ ImplementThisFunction(); };
virtual void Valueable< T >::Set | ( | T | val | ) | [inline, virtual] |
Reimplemented in Customizable< T >, Customizable< AnimTypeClass * >, Customizable< signed int >, Customizable< WarheadTypeClass * >, Customizable< double >, Customizable< InfantryTypeClass * >, Customizable< SHPStruct * >, Customizable< int >, Customizable< UnitTypeClass * >, Customizable< ColorStruct >, and Customizable< bool >.
{ this->Value = val; }
virtual void Valueable< T >::SetEx | ( | T * | val | ) | [inline, virtual] |
Reimplemented in Customizable< T >, Customizable< AnimTypeClass * >, Customizable< signed int >, Customizable< WarheadTypeClass * >, Customizable< double >, Customizable< InfantryTypeClass * >, Customizable< SHPStruct * >, Customizable< int >, Customizable< UnitTypeClass * >, Customizable< ColorStruct >, and Customizable< bool >.
{ this->Value = *val; }