RSC  0.16.0
Registry.h File Reference
#include <iostream>
#include <map>
#include <set>
#include <stdexcept>
#include <string>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/static_assert.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include "rsc/config.h"
#include "rsc/rscexports.h"
#include "../misc/langutils.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.

Namespaces

 rsc
 
 rsc::misc
 

Macros

#define CREATE_GLOBAL_REGISTREE(registry, registree, uniqueName)
 A templatized global registry. More...
 
#define CREATE_GLOBAL_REGISTREE_MSG(registry, registree, uniqueName, msg)
 Creates an object that globally registers in the Registry. More...
 

Macro Definition Documentation

#define CREATE_GLOBAL_REGISTREE (   registry,
  registree,
  uniqueName 
)
Value:
class Starter##uniqueName { \
public: \
Starter##uniqueName() { \
(registry)->addRegistree(registree); \
} \
}; \
Starter##uniqueName uniqueName##Starter;

A templatized global registry.

To create a registree, that will be registered on application startup before main use the provided macros. This will work on every supported compiler.

This class is reentrant.

Author
jwienke
Template Parameters
Rtype to register called registree.
Deprecated:
If possible, use rsc::patterns::Factory instead.

Creates an object that globally registers in the Registry. This method only works directly in binaries or shared libraries, no static libraries.

Class names for this macro must be given without namespaces and templates. Create typedefs as required to match these restrictions.

Note
be aware of the static initialization order fiasco and do not return static members for the registry key
Parameters
registryregistry to register in
registreeregistree to register
uniqueNamea unique name to generate a register function

Definition at line 182 of file Registry.h.

#define CREATE_GLOBAL_REGISTREE_MSG (   registry,
  registree,
  uniqueName,
  msg 
)
Value:
class Starter##uniqueName { \
public: \
Starter##uniqueName() { \
(registry)->addRegistree(registree, msg); \
} \
}; \
Starter##uniqueName uniqueName##Starter;

Creates an object that globally registers in the Registry.

This method only works directly in binaries or shared libraries, no static libraries.

Class names for this macro must be given without namespaces and templates. Create typedefs as required to match these restrictions.

Note
be aware of the static initialization order fiasco and do not return static members for the registry key
Parameters
registryregistry to register in
registreeregistree to register
msgerror message to display on registration failure
uniqueNamea unique name to generate a register function

Definition at line 205 of file Registry.h.

Referenced by rsc::logging::ConsoleLoggingSystem::createLogger().