Ares
|
#include <src/Utilities/Template.h>
Public Member Functions | |
CustomizableIdx (T *alias=NULL) | |
void | Bind (T *to) |
void | BindEx (T to) |
virtual T | Get () const |
virtual void | Set (T val) |
virtual T * | GetEx () |
virtual void | SetEx (T *val) |
void | Lock () |
bool | operator== (T other) const |
bool | operator!= (T other) const |
bool | operator! () const |
Private Attributes | |
bool | Customized |
T * | Default |
CustomizableIdx< T, Lookuper >::CustomizableIdx | ( | T * | alias = NULL | ) | [inline] |
: ValueableIdx<T, Lookuper>(T()), Customized(false), Default(alias) {};
void CustomizableIdx< T, Lookuper >::Bind | ( | T * | to | ) | [inline] |
{ if(!this->Customized) { this->Default = to; } }
void CustomizableIdx< T, Lookuper >::BindEx | ( | T | to | ) | [inline] |
{ if(!this->Customized) { this->Value = to; this->Default = &this->Value; } }
virtual T CustomizableIdx< T, Lookuper >::Get | ( | ) | const [inline, virtual] |
Reimplemented from ValueableIdx< T, Lookuper >.
{ return this->Customized ? this->Value : this->Default ? *this->Default : T() ; }
virtual T* CustomizableIdx< T, Lookuper >::GetEx | ( | ) | [inline, virtual] |
Reimplemented from ValueableIdx< T, Lookuper >.
{ return this->Customized ? &this->Value : this->Default ; }
void CustomizableIdx< T, Lookuper >::Lock | ( | ) | [inline] |
{ if(!this->Customized) { if(this->Default) { this->Value = *this->Default; } this->Customized = true; } }
bool CustomizableIdx< T, Lookuper >::operator! | ( | ) | const [inline] |
{ return this->Get() == 0; };
bool CustomizableIdx< T, Lookuper >::operator!= | ( | T | other | ) | const [inline] |
{ return this->Get() != other; };
bool CustomizableIdx< T, Lookuper >::operator== | ( | T | other | ) | const [inline] |
{ return this->Get() == other; };
virtual void CustomizableIdx< T, Lookuper >::Set | ( | T | val | ) | [inline, virtual] |
Reimplemented from ValueableIdx< T, Lookuper >.
{ this->Customized = true; this->Value = val; }
virtual void CustomizableIdx< T, Lookuper >::SetEx | ( | T * | val | ) | [inline, virtual] |
Reimplemented from ValueableIdx< T, Lookuper >.
{ this->Customized = true; this->Value = *val; }
bool CustomizableIdx< T, Lookuper >::Customized [private] |
T* CustomizableIdx< T, Lookuper >::Default [private] |