Ares
Public Types | Public Member Functions | Protected Attributes

Valueable< T > Class Template Reference

#include <src/Utilities/Template.h>

Inheritance diagram for Valueable< T >:
Customizable< T >

List of all members.

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

Value

Detailed Description

template<typename T>
class Valueable< T >

More fancy templates! This one is just a nicer-looking INI Parser... the fun starts with the next one


Member Typedef Documentation

template<typename T>
typedef CompoundT<T>::BaseT Valueable< T >::MyBase
template<typename T>
typedef T Valueable< T >::MyType

Constructor & Destructor Documentation

template<typename T>
Valueable< T >::Valueable ( Default = T()) [inline]
: Value(Default) {};

Member Function Documentation

template<typename T>
virtual T Valueable< T >::Get ( ) const [inline, virtual]
template<typename T>
virtual T* Valueable< T >::GetEx ( ) [inline, virtual]
template<typename T>
Valueable< T >::operator T ( ) const [inline]
                            {
                return this->Get();
        }
template<typename T>
Valueable< T >::operator T * ( ) [inline]
                       {
                return this->GetEx();
        }
template<typename T>
bool Valueable< T >::operator! ( ) const [inline]
template<typename T>
bool Valueable< T >::operator!= ( other) const [inline]
template<typename T>
T* Valueable< T >::operator& ( ) [inline]
                         {
                return this->GetEx();
        }
template<typename T>
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);
                        }
                }
        }
template<typename T>
void Valueable< T >::Read ( INI_EX parser,
const char *  pSection,
const char *  pKey 
) [inline]
                                                                          {
                ImplementThisFunction();
        };
template<typename T>
virtual void Valueable< T >::Set ( val) [inline, virtual]
template<typename T>
virtual void Valueable< T >::SetEx ( T *  val) [inline, virtual]

Member Data Documentation

template<typename T>
T Valueable< T >::Value [protected]

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines