Ares
Public Types | Public Member Functions | Protected Attributes

ValueableEnum< T > Class Template Reference

#include <src/Utilities/Template.h>

List of all members.

Public Types

typedef T::Value V

Public Member Functions

 ValueableEnum (V Default=V())
 operator V () const
 operator V * ()
Voperator& ()
bool operator!= (T other) const
bool operator! () const
virtual V Get () const
virtual VGetEx ()
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

template<typename T>
class ValueableEnum< T >


Member Typedef Documentation

template<typename T>
typedef T::Value ValueableEnum< T >::V

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename T>
virtual V ValueableEnum< T >::Get ( ) const [inline, virtual]
                              {
                return this->Value;
        }
template<typename T>
virtual V* ValueableEnum< T >::GetEx ( ) [inline, virtual]
                            {
                return &this->Value;
        }
template<typename T>
ValueableEnum< T >::operator V ( ) const [inline]
                            {
                return this->Get();
        }
template<typename T>
ValueableEnum< T >::operator V * ( ) [inline]
                       {
                return this->GetEx();
        }
template<typename T>
bool ValueableEnum< T >::operator! ( ) const [inline]
                                 {
                return this->Get() == 0;
        };
template<typename T>
bool ValueableEnum< T >::operator!= ( other) const [inline]
                                         {
                return this->Get() != other;
        };
template<typename T>
V* ValueableEnum< T >::operator& ( ) [inline]
                         {
                return this->GetEx();
        }
template<typename T>
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);
                        }
                }
        };
template<typename T>
virtual void ValueableEnum< T >::Set ( V  val) [inline, virtual]
                                {
                this->Value = val;
        }
template<typename T>
virtual void ValueableEnum< T >::SetEx ( V val) [inline, virtual]
                                   {
                this->Value = *val;
        }

Member Data Documentation

template<typename T>
V ValueableEnum< T >::Value [protected]

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