RSC  0.7.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 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  rsc::misc::Registry< R >
 A templatized global registry. More...
 

Namespaces

 rsc
 
 rsc::misc
 

Macros

#define CREATE_GLOBAL_REGISTREE(registry, registree, uniqueName)
 Creates an object that globally registers in the 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;

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 173 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 196 of file Registry.h.