ot::Configurator Class Reference

#include <Configurator.h>

Collaboration diagram for ot::Configurator:

Collaboration graph
[legend]
List of all members.

Public Types

typedef void(* ModuleInitFunc )(Context *, void *data)
typedef std::map< std::string,
MIFunctor
Registry

Public Member Functions

virtual ~Configurator ()
ContextgetContext ()
void parseConfigurationString (std::string configString)
void changeConfiguration (std::string configString)
void changeConfigurationFile (const char *xmlstring)
void changeConfigurationString (const char *xmlstring)
void runConfigurationThread (const char *filename)

Static Public Member Functions

static Configuratorinstance (int ctx_type=NORMAL)
static void addModuleInit (const char *name, ModuleInitFunc func, void *data)
static void loadModule (Context &newctx, const char *module)

Protected Member Functions

 Configurator (int ctx_type=NORMAL)

Static Protected Member Functions

static void doInitialization (Context &newctx)

Protected Attributes

Contextctx
bool isDefaultContext
ConfigurationThreadthread

Static Protected Attributes

static Registry initFunctions
static Configuratorself = NULL

Friends

OPENTRACKER_API void initializeContext (Context *, void *)

Classes

struct  MIFunctor

Member Typedef Documentation

typedef void(* ot::Configurator::ModuleInitFunc)(Context *, void *data)
 

typedef std::map<std::string, MIFunctor> ot::Configurator::Registry
 


Constructor & Destructor Documentation

ot::Configurator::Configurator int  ctx_type = NORMAL  )  [protected]
 

ot::Configurator::~Configurator  )  [virtual]
 


Member Function Documentation

void ot::Configurator::addModuleInit const char *  name,
ModuleInitFunc  func,
void *  data
[static]
 

void ot::Configurator::changeConfiguration std::string  configString  ) 
 

void ot::Configurator::changeConfigurationFile const char *  xmlstring  ) 
 

void ot::Configurator::changeConfigurationString const char *  xmlstring  ) 
 

void ot::Configurator::doInitialization Context newctx  )  [static, protected]
 

Context * ot::Configurator::getContext  ) 
 

Configurator * ot::Configurator::instance int  ctx_type = NORMAL  )  [static]
 

void ot::Configurator::loadModule Context newctx,
const char *  module
[static]
 

void ot::Configurator::parseConfigurationString std::string  configString  ) 
 

void ot::Configurator::runConfigurationThread const char *  filename  ) 
 


Friends And Related Function Documentation

OPENTRACKER_API void initializeContext Context ,
void * 
[friend]
 

initializes a context by instantiating the available modules and factories and registering them with the given context. So for each passed context there is a new set of objects instantiated. This leaves the programmer with the responsibility of deleting these objects again ! Any compile time definitions go in here, to define which modules are compiled in and can be instantiated. Also the modules configuration element names are defined here.

Parameters:
context reference of the context to be initialized.


Member Data Documentation

Context* ot::Configurator::ctx [protected]
 

Configurator::Registry ot::Configurator::initFunctions [static, protected]
 

bool ot::Configurator::isDefaultContext [protected]
 

Configurator * ot::Configurator::self = NULL [static, protected]
 

ConfigurationThread* ot::Configurator::thread [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 28 15:28:58 2007 for NaviTrack by  doxygen 1.4.6