Value< T > Class Template Reference

#include <Value.h>

Inherits ValueBase.

Inheritance diagram for Value< T >:

Inheritance graph
[legend]
Collaboration diagram for Value< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Value (Validator< T > *validator=NULL)
 Value (const T &value, Validator< T > *validator=NULL)
virtual ~Value ()
virtual int set (const ValueBase *value)
int set (const T &value)
get () const
int setValidator (Validator< T > *validator)
virtual int toString (String &) const
virtual int fromString (const String &)

Protected Member Functions

const T & value () const

Private Attributes

_value
Validator< T > * _validator

Detailed Description

template<class T>
class Value< T >

Definition at line 26 of file Value.h.


Constructor & Destructor Documentation

template<class T>
Value< T >::Value ( Validator< T > *  validator = NULL  ) 

Definition at line 68 of file Value.h.

template<class T>
Value< T >::Value ( const T &  value,
Validator< T > *  validator = NULL 
)

Definition at line 74 of file Value.h.

References Value< T >::_validator, Value< T >::_value, ERROR, Support::failure(), and MSG_VALUE_INVALID.

template<class T>
Value< T >::~Value (  )  [virtual]

Definition at line 87 of file Value.h.


Member Function Documentation

template<class T>
int Value< T >::set ( const ValueBase value  )  [virtual]

Implements ValueBase.

Definition at line 92 of file Value.h.

References Value< T >::_validator, Value< T >::_value, ERROR, Value< T >::get(), MSG_VALUE_INVALID, MSG_VALUE_TYPE_MISMATCH, OK, and Value< T >::value().

Referenced by Value< T >::fromString().

template<class T>
int Value< T >::set ( const T &  value  ) 

Definition at line 110 of file Value.h.

References Value< T >::_validator, Value< T >::_value, ERROR, MSG_VALUE_INVALID, and OK.

template<class T>
T Value< T >::get (  )  const

Definition at line 121 of file Value.h.

References Value< T >::_value.

Referenced by FSh::FSh(), ValueList::scanf(), and Value< T >::set().

template<class T>
int Value< T >::setValidator ( Validator< T > *  validator  ) 

Definition at line 127 of file Value.h.

References Value< T >::_validator, and OK.

template<class T>
int Value< T >::toString ( String  )  const [virtual]

Implements ValueBase.

Definition at line 134 of file Value.h.

References Value< T >::_value, ERROR_BACKTRACE(), FAILED(), and OK.

template<class T>
int Value< T >::fromString ( const String  )  [virtual]

Implements ValueBase.

Definition at line 145 of file Value.h.

References ERROR_BACKTRACE(), FAILED(), OK, and Value< T >::set().

template<class T>
const T & Value< T >::value (  )  const [inline, protected]

Definition at line 161 of file Value.h.

References Value< T >::_value.

Referenced by Value< T >::set().


Member Data Documentation

template<class T>
T Value< T >::_value [private]

Definition at line 50 of file Value.h.

Referenced by Value< T >::get(), Value< T >::set(), Value< T >::toString(), Value< T >::value(), and Value< T >::Value().

template<class T>
Validator<T>* Value< T >::_validator [private]

Definition at line 51 of file Value.h.

Referenced by Value< T >::set(), Value< T >::setValidator(), and Value< T >::Value().


The documentation for this class was generated from the following file:
Generated on Thu Sep 6 20:14:09 2007 for Pylon Application Platform by  doxygen 1.5.1