#include <context.h>
Classes | |
class | CfgParamList |
class | UnsetParam |
Public Types | |
typedef CfgParamList | cfgparamlist_t |
typedef std::map< std::string, cfgparamlist_t > | params_t |
typedef std::list< Context * > | ctxlist_t |
typedef std::map< std::string, UnsetParam > | unsetparams_t |
Public Member Functions | |
Context (ServerConfig &cfg, Context *parent) | |
virtual | ~Context () |
bool | complete () |
const cfgparamlist_t * | getParam (const std::string &type) const |
bool | setParam (const ConfigNode &) |
const std::string & | getName () const |
const std::string & | getType () const |
ServerConfig & | getServerConfig () |
bool | process (ServerConfig &, ConfigNode *) |
void | addChildContext (Context *ctx) |
bool | setIgnore (const ConfigNode &) |
Context * | getParent () |
Protected Member Functions | |
virtual bool | onPreComplete () |
virtual bool | onPostComplete () |
virtual bool | onSetParam (const ConfigNode &val)=0 |
virtual Context * | getContext (const ConfigNode &)=0 |
unsetparams_t & | getUnsetParams () |
Static Protected Member Functions | |
static bool | setString (const ConfigNode &, std::string &) |
Private Attributes | |
ctxlist_t | m_kids |
params_t | m_params |
std::string | m_type |
std::string | m_name |
Context * | m_parent |
unsetparams_t | m_unsetParams |
ServerConfig & | m_cfg |
Definition at line 51 of file context.h.
typedef std::list<Context*> container::serverconfig::Context::ctxlist_t |
typedef std::map<std::string,cfgparamlist_t> container::serverconfig::Context::params_t |
typedef std::map<std::string,UnsetParam> container::serverconfig::Context::unsetparams_t |
container::serverconfig::Context::Context | ( | ServerConfig & | cfg, | |
Context * | parent | |||
) | [inline] |
container::serverconfig::Context::~Context | ( | ) | [virtual] |
void container::serverconfig::Context::addChildContext | ( | Context * | ctx | ) |
bool container::serverconfig::Context::complete | ( | ) |
Definition at line 135 of file context.cpp.
References getName(), getParam(), getType(), getUnsetParams(), m_kids, m_parent, onPostComplete(), onPreComplete(), and setParam().
Referenced by container::serverconfig::ServerConfig::processConfig().
virtual Context* container::serverconfig::Context::getContext | ( | const ConfigNode & | ) | [protected, pure virtual] |
Implemented in container::serverconfig::AppContext, container::serverconfig::GlobalContext, and container::serverconfig::ServletContext.
Referenced by process().
const std::string& container::serverconfig::Context::getName | ( | ) | const [inline] |
Definition at line 118 of file context.h.
References m_name.
Referenced by complete(), container::serverconfig::AppContext::getServletContextName(), container::serverconfig::ServletContext::getServletName(), container::serverconfig::CSPContext::getServletName(), container::serverconfig::ServletContext::onPostComplete(), container::serverconfig::AppContext::onPreComplete(), and process().
const Context::cfgparamlist_t * container::serverconfig::Context::getParam | ( | const std::string & | type | ) | const |
Context* container::serverconfig::Context::getParent | ( | ) | [inline] |
Definition at line 141 of file context.h.
References m_parent.
Referenced by container::serverconfig::AppContext::getGlobalContext(), and container::serverconfig::ServletContext::onPostComplete().
ServerConfig& container::serverconfig::Context::getServerConfig | ( | ) | [inline] |
Definition at line 120 of file context.h.
References m_cfg.
Referenced by container::serverconfig::AppContext::getContext().
const std::string& container::serverconfig::Context::getType | ( | ) | const [inline] |
Definition at line 119 of file context.h.
References m_type.
Referenced by complete(), and process().
unsetparams_t& container::serverconfig::Context::getUnsetParams | ( | ) | [inline, protected] |
Definition at line 102 of file context.h.
References m_unsetParams.
Referenced by container::serverconfig::AppContext::AppContext(), complete(), container::serverconfig::GlobalContext::GlobalContext(), container::serverconfig::ServletContext::ServletContext(), and setParam().
container::serverconfig::Context::onPostComplete | ( | ) | [inline, protected, virtual] |
called after child contexts' complete()
Reimplemented in container::serverconfig::AppContext, container::serverconfig::GlobalContext, and container::serverconfig::ServletContext.
Definition at line 92 of file context.h.
Referenced by complete().
container::serverconfig::Context::onPreComplete | ( | ) | [inline, protected, virtual] |
called before child contexts' complete()
Reimplemented in container::serverconfig::AppContext.
Definition at line 87 of file context.h.
Referenced by complete().
virtual bool container::serverconfig::Context::onSetParam | ( | const ConfigNode & | val | ) | [protected, pure virtual] |
Implemented in container::serverconfig::AppContext, container::serverconfig::GlobalContext, and container::serverconfig::ServletContext.
Referenced by setParam().
bool container::serverconfig::Context::process | ( | ServerConfig & | cfg, | |
ConfigNode * | node | |||
) |
Definition at line 40 of file context.cpp.
References addChildContext(), getContext(), getName(), container::serverconfig::ConfigNode::getName(), container::serverconfig::ServerConfig::getNodes(), getType(), container::serverconfig::ConfigNode::getType(), m_name, m_type, process(), and setParam().
Referenced by process(), and container::serverconfig::ServerConfig::processConfig().
bool container::serverconfig::Context::setIgnore | ( | const ConfigNode & | ) | [inline] |
Definition at line 136 of file context.h.
Referenced by container::serverconfig::GlobalContext::registerParams(), and container::serverconfig::AppContext::registerParams().
bool container::serverconfig::Context::setParam | ( | const ConfigNode & | node | ) |
Definition at line 105 of file context.cpp.
References container::serverconfig::Context::Context::CfgParamList::add(), container::serverconfig::ConfigNode::getName(), container::serverconfig::ConfigNode::getType(), getUnsetParams(), container::serverconfig::Context::Context::CfgParamList::m_flags, m_params, and onSetParam().
Referenced by complete(), process(), and container::serverconfig::GlobalContext::setGlobalParam().
bool container::serverconfig::Context::setString | ( | const ConfigNode & | node, | |
std::string & | dest | |||
) | [static, protected] |
Definition at line 176 of file context.cpp.
References container::serverconfig::ConfigNode::getAttrs().
Referenced by container::serverconfig::AppContext::setDefaultCharacterEncoding(), container::serverconfig::AppContext::setDefaultMimeType(), container::serverconfig::AppContext::setPhysBase(), container::serverconfig::AppContext::setUploadDir(), and container::serverconfig::AppContext::setUriBase().
Definition at line 75 of file context.h.
Referenced by addChildContext(), complete(), and ~Context().
std::string container::serverconfig::Context::m_name [private] |
Reimplemented in container::serverconfig::AppContext, and container::serverconfig::ServletContext.
Definition at line 76 of file context.h.
Referenced by getParam(), and setParam().
std::string container::serverconfig::Context::m_type [private] |