TKN Logo SelfSoft Logo

Total Knowledge

SelfSoft, Inc.

CPPSERV

[CPPSERV] [Documentation] [Download] [Contact] [Bug tracker] [News] [RSS Feed] [gitweb]

container::ServerConfig::ContextRegistry Class Reference

Collaboration diagram for container::ServerConfig::ContextRegistry:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Context *(*) createcontext_f (const ServerConfig::ConfigNode &n, Context *parent)

Public Member Functions

void registerContext (const std::string &type, createcontext_f creator)
 ContextRegistry (void(*registerContexts)(ContextRegistry &))
ContextgetContext (const ServerConfig::ConfigNode &, ServerConfig::Context *)

Private Types

typedef std::map< std::string,
createcontext_f
registry_t

Private Attributes

registry_t registry

Detailed Description

Definition at line 262 of file serverconfig.h.


Member Typedef Documentation

Definition at line 267 of file serverconfig.h.


Constructor & Destructor Documentation

container::ServerConfig::ContextRegistry::ContextRegistry ( void(*)(ContextRegistry &)  registerContexts  )  [inline]

Definition at line 271 of file serverconfig.h.


Member Function Documentation

void container::ServerConfig::ContextRegistry::registerContext ( const std::string &  type,
createcontext_f  creator 
)

ServerConfig::Context * container::ServerConfig::ContextRegistry::getContext ( const ServerConfig::ConfigNode node,
ServerConfig::Context parent 
)

Parameters:
node Node that caused creation of this context (node creator may look at attributes)
parent Parent context to pass to context factory
Returns:
pointer to new Context object registered under type or NULL if no such object is available

Definition at line 171 of file serverconfig.cpp.

References container::ServerConfig::ConfigNode::getType(), and registry.

Referenced by container::ServerConfig::ServletContext::getContext(), container::ServerConfig::AppContext::getContext(), and container::ServerConfig::GlobalContext::getContext().

Here is the call graph for this function:


Member Data Documentation


The documentation for this class was generated from the following files:

SourceForge.net Logo

Authoright © Total Knowledge: 2001-2004