#include <ServletMap.h>
Classes | |
class | Func |
class | Func2 |
class | Killer |
Public Types | |
typedef std::map< std::string, ServletMap< T > * > | subpaths_t |
typedef std::map< std::string, T * > | servletmap_t |
Public Member Functions | |
~ServletMap () | |
ServletMap * | getPath (std::string path, bool create) |
T * | getServletDesc (std::string path) |
void | removeDesc (const std::string &path) |
const servletmap_t & | getServlets () const |
const subpaths_t & | getSubpaths () const |
template<class F > | |
void | forEachServletPath (F &func, std::string curpath) |
T *& | operator[] (const std::string &path) |
Static Public Member Functions | |
static void | splitServPath (const std::string &path, std::string &dir, std::string &name) |
Private Attributes | |
servletmap_t | m_servlets |
subpaths_t | m_subpaths |
Definition at line 31 of file ServletMap.h.
typedef std::map<std::string,T*> container::ServletMap< T >::servletmap_t |
Definition at line 35 of file ServletMap.h.
typedef std::map<std::string,ServletMap<T>*> container::ServletMap< T >::subpaths_t |
Definition at line 34 of file ServletMap.h.
container::ServletMap< T >::~ServletMap | ( | ) | [inline] |
void container::ServletMap< T >::forEachServletPath | ( | F & | func, | |
std::string | curpath | |||
) | [inline] |
Definition at line 85 of file ServletMap.h.
Referenced by container::serverconfig::AppContext::destroyServlets(), container::serverconfig::AppContext::initServlets(), and container::serverconfig::AppContext::~AppContext().
ServletMap< T > * container::ServletMap< T >::getPath | ( | std::string | path, | |
bool | create | |||
) | [inline] |
Definition at line 115 of file ServletMap.h.
References container::ServletMap< T >::getPath(), and container::ServletMap< T >::m_subpaths.
Referenced by container::ServletMap< T >::getPath(), container::serverconfig::AppContext::getResourcePaths(), container::ServletMap< ServletDesc >::operator[](), container::ServletMap< T >::removeDesc(), and container::RequestHandler::taskFunction().
T * container::ServletMap< T >::getServletDesc | ( | std::string | path | ) | [inline] |
This function searches servlet map tree for first instance That matches servlet name. i.e.: /app/base/IndexServlet/path/Info will match IndexServlet in dir /app/base/ if it exists, even if there is path or Info servlets mapped elsewhere
Definition at line 156 of file ServletMap.h.
References container::ServletMap< T >::m_servlets, and container::ServletMap< T >::m_subpaths.
Referenced by container::RequestHandler::addServlet(), container::serverconfig::AppContext::getDesc(), container::RequestHandler::removeServlet(), and container::RequestHandler::taskFunction().
const servletmap_t& container::ServletMap< T >::getServlets | ( | ) | const [inline] |
Definition at line 82 of file ServletMap.h.
Referenced by container::serverconfig::AppContext::getResourcePaths().
const subpaths_t& container::ServletMap< T >::getSubpaths | ( | ) | const [inline] |
Definition at line 83 of file ServletMap.h.
Referenced by container::serverconfig::AppContext::getResourcePaths().
T*& container::ServletMap< T >::operator[] | ( | const std::string & | path | ) | [inline] |
Definition at line 90 of file ServletMap.h.
void container::ServletMap< T >::removeDesc | ( | const std::string & | path | ) | [inline] |
Definition at line 175 of file ServletMap.h.
References container::ServletMap< T >::getPath(), container::ServletMap< T >::m_servlets, and container::ServletMap< T >::splitServPath().
Referenced by container::serverconfig::AppContext::delServlet(), and container::RequestHandler::removeServlet().
void container::ServletMap< T >::splitServPath | ( | const std::string & | path, | |
std::string & | dir, | |||
std::string & | name | |||
) | [inline, static] |
Definition at line 102 of file ServletMap.h.
Referenced by container::ServletMap< ServletDesc >::operator[](), and container::ServletMap< T >::removeDesc().
servletmap_t container::ServletMap< T >::m_servlets [private] |
Definition at line 37 of file ServletMap.h.
Referenced by container::ServletMap< ServletDesc >::forEachServletPath(), container::ServletMap< T >::getServletDesc(), container::ServletMap< ServletDesc >::getServlets(), container::ServletMap< ServletDesc >::operator[](), and container::ServletMap< T >::removeDesc().
subpaths_t container::ServletMap< T >::m_subpaths [private] |
Definition at line 38 of file ServletMap.h.
Referenced by container::ServletMap< ServletDesc >::forEachServletPath(), container::ServletMap< T >::getPath(), container::ServletMap< T >::getServletDesc(), container::ServletMap< ServletDesc >::getSubpaths(), and container::ServletMap< T >::~ServletMap().