Registry< T > Class Template Reference

#include <Registry.h>

Inherits RegistryBase.

Inheritance diagram for Registry< T >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef int(Object::*) Getter (const String &, T &)
typedef int(Object::*) Setter (const String &, const T &)
typedef int(*) StaticGetter (const String &, T &)
typedef int(*) StaticSetter (const String &, const T &)

Public Member Functions

 Registry (const String &aName, const T &defaultValue=T(), const String &manual="", const RegistryFlags flags=REG_FLAGS_DEFAULT, Validator< T > *validator=NULL)
virtual ~Registry ()
virtual bool hasGetter () const
int setGetter (Getter getter)
int setGetter (StaticGetter getter)
virtual bool hasSetter () const
int setSetter (Setter setter)
int setSetter (StaticSetter setter)
int set (const T &value)
int get (T &value)
virtual int toString (String &str)
virtual int fromString (const String &str)
 SIGNAL (set, const T &)
 SIGNAL (got, const T &)

Static Public Member Functions

static int set (const String &name, const T &value, Object *owner=NULL)
static int get (const String &name, T &value, Object *owner=NULL)

Private Attributes

Value< T > _value
Getter _getter
Setter _setter
StaticGetter _staticGetter
StaticSetter _staticSetter

Detailed Description

template<class T>
class Registry< T >

Definition at line 30 of file Registry.h.


Member Typedef Documentation

template<class T>
typedef int(Object::*) Registry< T >::Getter(const String &, T &)

Definition at line 37 of file Registry.h.

template<class T>
typedef int(Object::*) Registry< T >::Setter(const String &, const T &)

Definition at line 38 of file Registry.h.

template<class T>
typedef int(*) Registry< T >::StaticGetter(const String &, T &)

Definition at line 40 of file Registry.h.

template<class T>
typedef int(*) Registry< T >::StaticSetter(const String &, const T &)

Definition at line 41 of file Registry.h.


Constructor & Destructor Documentation

template<class T>
Registry< T >::Registry ( const String aName,
const T &  defaultValue = T(),
const String manual = "",
const RegistryFlags  flags = REG_FLAGS_DEFAULT,
Validator< T > *  validator = NULL 
)

Definition at line 84 of file Registry.h.

References Registry< T >::_value, CONFIG(), ERROR_BACKTRACE(), FAILED(), Support::failure(), NamedObject::name(), RegistryBase::persistency(), and REG_PERSISTENCY_YES.

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

Definition at line 118 of file Registry.h.


Member Function Documentation

template<class T>
bool Registry< T >::hasGetter (  )  const [inline, virtual]

Implements RegistryBase.

Definition at line 123 of file Registry.h.

References Registry< T >::_getter, Registry< T >::_staticGetter, and RegistryBase::owner().

template<class T>
int Registry< T >::setGetter ( Getter  getter  ) 

Definition at line 129 of file Registry.h.

References Registry< T >::_getter, Registry< T >::_staticGetter, CSTRING(), MSG_REGISTRY_HAS_STATIC_GETTER, NamedObject::name(), OK, and WARNING.

template<class T>
int Registry< T >::setGetter ( StaticGetter  getter  ) 

Definition at line 139 of file Registry.h.

References Registry< T >::_getter, Registry< T >::_staticGetter, CSTRING(), MSG_REGISTRY_HAS_GETTER, NamedObject::name(), OK, and WARNING.

template<class T>
bool Registry< T >::hasSetter (  )  const [inline, virtual]

Implements RegistryBase.

Definition at line 149 of file Registry.h.

References Registry< T >::_setter, Registry< T >::_staticSetter, and RegistryBase::owner().

template<class T>
int Registry< T >::setSetter ( Setter  setter  ) 

Definition at line 155 of file Registry.h.

References Registry< T >::_setter, Registry< T >::_staticSetter, CSTRING(), MSG_REGISTRY_HAS_STATIC_SETTER, NamedObject::name(), OK, and WARNING.

template<class T>
int Registry< T >::setSetter ( StaticSetter  setter  ) 

Definition at line 165 of file Registry.h.

References Registry< T >::_setter, Registry< T >::_staticSetter, CSTRING(), MSG_REGISTRY_HAS_SETTER, NamedObject::name(), OK, and WARNING.

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

Definition at line 175 of file Registry.h.

References Registry< T >::_setter, Registry< T >::_staticSetter, Registry< T >::_value, CONFIG(), EMIT, ERROR_BACKTRACE(), FAILED(), NamedObject::name(), OK, RegistryBase::owner(), RegistryBase::persistency(), and REG_PERSISTENCY_YES.

Referenced by Registry< T >::fromString(), and Registry< T >::set().

template<class T>
int Registry< T >::get ( T &  value  ) 

Definition at line 197 of file Registry.h.

References Registry< T >::_getter, Registry< T >::_staticGetter, Registry< T >::_value, CONFIG(), EMIT, ERROR_BACKTRACE(), FAILED(), NamedObject::name(), OK, RegistryBase::owner(), RegistryBase::persistency(), and REG_PERSISTENCY_YES.

Referenced by Registry< T >::get(), and Registry< T >::toString().

template<class T>
int Registry< T >::set ( const String name,
const T &  value,
Object owner = NULL 
) [static]

Definition at line 227 of file Registry.h.

References ERROR, ERROR_BACKTRACE(), FAILED(), RegistryBase::get(), MSG_REGISTRY_TYPE_MISMATCH, NamedObject::name(), OK, RegistryBase::owner(), and Registry< T >::set().

template<class T>
int Registry< T >::get ( const String name,
T &  value,
Object owner = NULL 
) [static]

Definition at line 246 of file Registry.h.

References ERROR, ERROR_BACKTRACE(), FAILED(), Registry< T >::get(), RegistryBase::get(), MSG_REGISTRY_TYPE_MISMATCH, NamedObject::name(), OK, and RegistryBase::owner().

template<class T>
int Registry< T >::toString ( String str  )  [virtual]

Implements RegistryBase.

Definition at line 265 of file Registry.h.

References ERROR_BACKTRACE(), FAILED(), Registry< T >::get(), and OK.

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

Implements RegistryBase.

Definition at line 279 of file Registry.h.

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

template<class T>
Registry< T >::SIGNAL ( set  ,
const T &   
)

template<class T>
Registry< T >::SIGNAL ( got  ,
const T &   
)


Member Data Documentation

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

Definition at line 71 of file Registry.h.

Referenced by Registry< T >::get(), Registry< T >::Registry(), and Registry< T >::set().

template<class T>
Getter Registry< T >::_getter [private]

Definition at line 73 of file Registry.h.

Referenced by Registry< T >::get(), Registry< T >::hasGetter(), and Registry< T >::setGetter().

template<class T>
Setter Registry< T >::_setter [private]

Definition at line 74 of file Registry.h.

Referenced by Registry< T >::hasSetter(), Registry< T >::set(), and Registry< T >::setSetter().

template<class T>
StaticGetter Registry< T >::_staticGetter [private]

Definition at line 75 of file Registry.h.

Referenced by Registry< T >::get(), Registry< T >::hasGetter(), and Registry< T >::setGetter().

template<class T>
StaticSetter Registry< T >::_staticSetter [private]

Definition at line 76 of file Registry.h.

Referenced by Registry< T >::hasSetter(), Registry< T >::set(), and Registry< T >::setSetter().


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