#include <xmlprocessor.hpp>
Collaboration diagram for XMLProcessor:
Definition at line 66 of file xmlprocessor.hpp.
Public Methods | |
XMLProcessor () | |
Constructor. Sets active URI, creates and attach Handlers to the processor. | |
~XMLProcessor () | |
Destructor. Kills processor handlers. | |
void | setActiveURI (const char *p_pszActiveURI) |
Active URI property setter. | |
const char * | getActiveURI () |
Returns active URI. | |
void | loadStreamerFactories () |
Loads all streamer factories. | |
void | loadValuers (XMLFlowContext *p_pContext) const |
Load all valuers. | |
void | addStreamerFactory (XMLStreamerFactory *p_pXMLHandler, const char *p_pszName) |
Adds an XMLStreamerFactory object to the processor. | |
XMLStreamerFactory * | getStreamerFactory (const char *p_pszName) const |
Returns an XMLHandler object, given its name. | |
void | setContext (XMLFlowContext *p_pContext) |
XMLFlowContext * | getContext () const |
void | cacheScript (RootStreamNode *p_pRootNode, const char *p_pszCacheName, unsigned int p_uiThreadId=0) |
const RootStreamNode * | getCachedScript (const char *p_pszCacheName, unsigned int p_uiThreadId=0) |
RootStreamNode * | compile (XMLStreamProvider *p_pInput, unsigned int p_uiThreadId=0) const |
int | execute (const RootStreamNode *p_pRootNode, XMLStreamConsumer *p_pOutput, XMLFlowContext *p_pContext=0) const |
int | process (XMLStreamProvider *p_pInput, XMLStreamConsumer *p_pOutput, XMLFlowContext *p_pContext=0) const |
void | tick (unsigned long p_ulClock) |
Time ticker method. This method is to be called periodically by a separate thread for the handler to make its state maintenance tasks. | |
Static Public Methods | |
void | init () |
Processor initialisation method. Enforce XMLProcessor prerequities (Xerces init). | |
void | terminate () |
Processor terminaison method. Release XMLProcessor prerequities (Xerces terminate). | |
XMLStreamBuffer * | getNewBuffer (const char *p_pszBufferType=0, const char *p_pszFileName=0, bool p_fReadOnly=false, unsigned int p_uiBufferSize=0) |
Produces and returns a new XMLStreamBuffer of the given type. | |
void | setThreadCount (unsigned int p_uiThreadCount) |
Sets the number of threads which will use the processor. | |
unsigned int | getThreadCount () |
Returns the number of threads which will use the processor. | |
Protected Attributes | |
char * | m_pszActiveURI |
active URI. | |
VAarray< XMLStreamerFactory * > | m_vaStreamerFactories |
Collection of XMLStreamerFactories. | |
VAarray< RootStreamNode * > | m_pvaScriptCache |
Compiled script cache. | |
XMLFlowContext * | m_pContext |
Processor static context object. | |
bool | m_fOwnContext |
Has the context been created by the processor ? |
|
Constructor. Sets active URI, creates and attach Handlers to the processor.
Definition at line 150 of file xmlprocessor.cpp. References DEBUG_CREATE, m_fOwnContext, m_pContext, m_pszActiveURI, setActiveURI(), and XMLFlowContext. |
|
Destructor. Kills processor handlers.
Definition at line 166 of file xmlprocessor.cpp. References DEBUG_DEL, VAarray< RootStreamNode * >::empty(), VAarray< XMLStreamerFactory * >::empty(), m_pContext, m_pszActiveURI, m_pvaScriptCache, m_vaStreamerFactories, VAarray< RootStreamNode * >::pop(), VAarray< XMLStreamerFactory * >::pop(), and releaseCharBuffer(). |
|
Adds an XMLStreamerFactory object to the processor.
Definition at line 267 of file xmlprocessor.cpp. References VAarray< XMLStreamerFactory * >::add(), DEBUG_ECHO, DEBUG_IN, DEBUG_OUT, m_vaStreamerFactories, and XMLStreamerFactory::setParent(). Referenced by loadStreamerFactories(). |
|
Definition at line 317 of file xmlprocessor.cpp. References VAarray< RootStreamNode * >::add(), and m_pvaScriptCache. |
|
Definition at line 335 of file xmlprocessor.cpp. References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, MAKE_XMLFLOW_EXCEPTION, ON_XML_FLOW_ERROR_DO, ON_XML_FLOW_ERROR_THROW, PREP_CATCH_XML_FLOW_ERROR, and WATCH_XML_FLOW_ERROR. Referenced by FuncDefineStreamer::commitStream(), CacheScriptStreamer::commitStream(), and process(). |
|
Definition at line 389 of file xmlprocessor.cpp. References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, getContext(), loadValuers(), MAKE_XMLFLOW_EXCEPTION, ON_XML_FLOW_ERROR_THROW, PREP_CATCH_XML_FLOW_ERROR, RootStreamNode::streamXML(), WATCH_XML_FLOW_ERROR, and XMLFlowContext. Referenced by FuncCallStreamer::commitStream(), and process(). |
|
Returns active URI.
Definition at line 197 of file xmlprocessor.cpp. References exportCharBuffer(). |
|
Definition at line 325 of file xmlprocessor.cpp. References VAarray< RootStreamNode * >::get(), and m_pvaScriptCache. |
|
Definition at line 307 of file xmlprocessor.cpp. References m_pContext. Referenced by XMLFlowBuilder::endElement(), execute(), and XMLFlowBuilder::startElement(). |
|
Produces and returns a new XMLStreamBuffer of the given type.
Definition at line 96 of file xmlprocessor.cpp. References DEBUG_FUNC, THROW_XMLFLOW_EXCEPTION, and XMLPROCESSOR_STRING. |
|
Returns an XMLHandler object, given its name.
Definition at line 282 of file xmlprocessor.cpp. References DEBUG_FUNC, VAarray< XMLStreamerFactory * >::get(), and m_vaStreamerFactories. Referenced by FuncDefineStreamer::commitStream(), and XMLFlowBuilder::startElement(). |
|
Returns the number of threads which will use the processor.
Definition at line 139 of file xmlprocessor.cpp. References DEBUG_FUNC. Referenced by DBStreamerFactory::DBStreamerFactory(), DBStreamerFactory::tick(), and DBStreamerFactory::~DBStreamerFactory(). |
|
Processor initialisation method.
Definition at line 59 of file xmlprocessor.cpp. References DEBUG_IN, DEBUG_INIT, and setThreadCount(). |
|
Loads all streamer factories.
Definition at line 208 of file xmlprocessor.cpp. References addStreamerFactory(), DEBUG_IN, and DEBUG_OUT. |
|
Load all valuers.
Definition at line 252 of file xmlprocessor.cpp. References XMLValuable::addValuer(). Referenced by execute(). |
|
Definition at line 451 of file xmlprocessor.cpp. References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, compile(), execute(), XMLFlowContext::getThreadId(), ON_XML_FLOW_ERROR_THROW, PREP_CATCH_XML_FLOW_ERROR, and WATCH_XML_FLOW_ERROR. |
|
Active URI property setter.
Definition at line 188 of file xmlprocessor.cpp. References DEBUG_FUNC, importCharBuffer(), and m_pszActiveURI. Referenced by XMLProcessor(). |
|
Definition at line 294 of file xmlprocessor.cpp. References DEBUG_FUNC, and m_pContext. |
|
Sets the number of threads which will use the processor.
Definition at line 130 of file xmlprocessor.cpp. References DEBUG_FUNC. Referenced by init(). |
|
Processor terminaison method.
Definition at line 80 of file xmlprocessor.cpp. |
|
Time ticker method. This method is to be called periodically by a separate thread for the handler to make its state maintenance tasks.
Definition at line 480 of file xmlprocessor.cpp. References VAarray< XMLStreamerFactory * >::get(), m_vaStreamerFactories, VAarray< XMLStreamerFactory * >::size(), and XMLStreamerFactory::tick(). |
|
Has the context been created by the processor ?
Definition at line 76 of file xmlprocessor.hpp. Referenced by XMLProcessor(). |
|
Processor static context object.
Definition at line 75 of file xmlprocessor.hpp. Referenced by getContext(), setContext(), XMLProcessor(), and ~XMLProcessor(). |
|
active URI.
Definition at line 72 of file xmlprocessor.hpp. Referenced by setActiveURI(), XMLProcessor(), and ~XMLProcessor(). |
|
Compiled script cache.
Definition at line 74 of file xmlprocessor.hpp. Referenced by cacheScript(), getCachedScript(), and ~XMLProcessor(). |
|
Collection of XMLStreamerFactories.
Definition at line 73 of file xmlprocessor.hpp. Referenced by addStreamerFactory(), getStreamerFactory(), tick(), and ~XMLProcessor(). |