Registry.h File Reference

#include "Error.h"
#include "RegistryBase.h"
#include "Singleton.h"
#include "Signal.h"
#include "Value.h"
#include "Config.h"
#include "S11n.h"

Include dependency graph for Registry.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Registry< T >

Defines

#define _REGISTRY(isPriv, valueType, entryName, defaultValue,...)
#define REGISTRY(valueType, entryName, defaultValue,...)
#define REGISTRY_PRIVATE(valueType, entryName, defaultValue,...)
#define REGISTRY_TYPE(className, entryName)   className::Registry_##entryName
#define BIND(entryName)
#define REGISTRY_SET(className, entryName, value,...)   className::Registry_##entryName::set(#className "." #entryName, value, ##__VA_ARGS__)
#define REGISTRY_GET(className, entryName, value,...)   className::Registry_##entryName::get(#className "." #entryName, value, ##__VA_ARGS__)
#define SET_GETTER(entryName, ptr)   entryName()->setGetter(static_cast<Registry_##entryName::Getter>(&ptr))
#define SET_STATIC_GETTER(entryName, ptr)   entryName()->setGetter(static_cast<Registry_##entryName::StaticGetter>(&ptr))
#define SET_SETTER(entryName, ptr)   entryName()->setSetter(static_cast<Registry_##entryName::Setter>(&ptr))
#define SET_STATIC_SETTER(entryName, ptr)   entryName()->setSetter(static_cast<Registry_##entryName::StaticSetter>(&ptr))

Variables

static const char *const MSG_REGISTRY_TYPE_MISMATCH = "Registry type mismatch."
static const char *const MSG_REGISTRY_HAS_STATIC_GETTER = "Registry entry '%s' already has a static getter. You set a regular one. That static getter will be removed."
static const char *const MSG_REGISTRY_HAS_GETTER = "Registry entry '%s' already has a regular getter. You set a static one. That regular getter will be removed."
static const char *const MSG_REGISTRY_HAS_STATIC_SETTER = "Registry entry '%s' already has a static setter. You set a regular one. That static setter will be removed."
static const char *const MSG_REGISTRY_HAS_SETTER = "Registry entry '%s' already has a regular setter. You set a static one. That regular setter will be removed."


Define Documentation

#define _REGISTRY ( isPriv,
valueType,
entryName,
defaultValue,
...   ) 

Value:

static String registry_##entryName##_ownerClassName() \
{ \
  return CLASS_NAME(); \
} \
class Registry_##entryName : public Registry<valueType> \
{ \
  PYLON_OBJECT \
public: \
  Registry_##entryName() : Registry<valueType>(registry_##entryName##_ownerClassName() + "." #entryName, defaultValue, ##__VA_ARGS__) {} \
  virtual ~Registry_##entryName() {}; \
  bool isPrivate() const \
  { \
    return isPriv; \
  } \
};

Definition at line 292 of file Registry.h.

#define BIND ( entryName   ) 

Value:

{ \
  int res; \
  if (FAILED(res = entryName()->isPrivate() ? entryName()->bind(this) : entryName()->bind())) { \
    failure(ERROR_BACKTRACE(res)); \
    return; \
  } \
}

Definition at line 337 of file Registry.h.

Referenced by Browser::Browser(), FSh::FSh(), Inetd::Inetd(), Init::Init(), Syslog::Syslog(), and Test::Test().

#define REGISTRY ( valueType,
entryName,
defaultValue,
...   ) 

Value:

_REGISTRY(false, valueType, entryName, defaultValue, ##__VA_ARGS__) \
class Registry_##entryName##_Singleton : public Object, \
                                         public Singleton<Registry_##entryName> \
{ \
  PYLON_OBJECT \
  friend class Singleton<Registry_##entryName>; \
private: \
  Registry_##entryName##_Singleton() : Object(), Singleton<Registry_##entryName>() {} \
  virtual ~Registry_##entryName##_Singleton() {} \
}; \
inline \
Registry_##entryName *entryName() \
{ \
  return Registry_##entryName##_Singleton::instance(); \
}

Definition at line 309 of file Registry.h.

#define REGISTRY_GET ( className,
entryName,
value,
...   )     className::Registry_##entryName::get(#className "." #entryName, value, ##__VA_ARGS__)

Definition at line 347 of file Registry.h.

Referenced by Inetd::Inetd(), Init::Init(), FSh::start(), Browser::start(), Syslog::Syslog(), and Test::Test().

#define REGISTRY_PRIVATE ( valueType,
entryName,
defaultValue,
...   ) 

Value:

_REGISTRY(true, valueType, entryName, defaultValue, ##__VA_ARGS__) \
Registry_##entryName _registry_##entryName; \
inline \
Registry_##entryName *entryName() \
{ \
  return &_registry_##entryName; \
}

Definition at line 326 of file Registry.h.

#define REGISTRY_SET ( className,
entryName,
value,
...   )     className::Registry_##entryName::set(#className "." #entryName, value, ##__VA_ARGS__)

Definition at line 346 of file Registry.h.

#define REGISTRY_TYPE ( className,
entryName   )     className::Registry_##entryName

Definition at line 335 of file Registry.h.

#define SET_GETTER ( entryName,
ptr   )     entryName()->setGetter(static_cast<Registry_##entryName::Getter>(&ptr))

Definition at line 349 of file Registry.h.

#define SET_SETTER ( entryName,
ptr   )     entryName()->setSetter(static_cast<Registry_##entryName::Setter>(&ptr))

Definition at line 355 of file Registry.h.

Referenced by Browser::start().

#define SET_STATIC_GETTER ( entryName,
ptr   )     entryName()->setGetter(static_cast<Registry_##entryName::StaticGetter>(&ptr))

Definition at line 352 of file Registry.h.

#define SET_STATIC_SETTER ( entryName,
ptr   )     entryName()->setSetter(static_cast<Registry_##entryName::StaticSetter>(&ptr))

Definition at line 358 of file Registry.h.


Variable Documentation

const char* const MSG_REGISTRY_HAS_GETTER = "Registry entry '%s' already has a regular getter. You set a static one. That regular getter will be removed." [static]

Definition at line 21 of file Registry.h.

Referenced by Registry< T >::setGetter().

const char* const MSG_REGISTRY_HAS_SETTER = "Registry entry '%s' already has a regular setter. You set a static one. That regular setter will be removed." [static]

Definition at line 23 of file Registry.h.

Referenced by Registry< T >::setSetter().

const char* const MSG_REGISTRY_HAS_STATIC_GETTER = "Registry entry '%s' already has a static getter. You set a regular one. That static getter will be removed." [static]

Definition at line 20 of file Registry.h.

Referenced by Registry< T >::setGetter().

const char* const MSG_REGISTRY_HAS_STATIC_SETTER = "Registry entry '%s' already has a static setter. You set a regular one. That static setter will be removed." [static]

Definition at line 22 of file Registry.h.

Referenced by Registry< T >::setSetter().

const char* const MSG_REGISTRY_TYPE_MISMATCH = "Registry type mismatch." [static]

Definition at line 19 of file Registry.h.

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


Generated on Thu Sep 6 20:12:07 2007 for Pylon Application Platform by  doxygen 1.5.1