Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

XMLFlowContext Class Reference

#include <xmlflowcontext.hpp>

Inheritance diagram for XMLFlowContext:

Inheritance graph
[legend]
Collaboration diagram for XMLFlowContext:

Collaboration graph
[legend]
List of all members.

Detailed Description

Represents an user request. Inherits from SAX2 ContentHandler to parse input XML data and drive the processing.

Remarks:
object multiplicity : this class is instanciated for each user request.

object lifetime : the object lifetime is the request processing time.

Definition at line 58 of file xmlflowcontext.hpp.

Public Methods

 XMLFlowContext (const XMLProcessor *p_pXMLProcessor, const XMLFlowContext *m_pParent, unsigned int p_uiThreadId, const char *m_pszEncoding)
 Constructor. Initializes data members and populate valuers collection.

 ~XMLFlowContext ()
 Destructor. Destroys valuers collection and XML named buffers.

void setProcessor (const XMLProcessor *p_pXMLProcessor)
const XMLProcessorgetProcessor ()
void setParent (const XMLFlowContext *p_pParent)
const XMLFlowContext * getParent ()
unsigned int getThreadId () const
 Returns the thread identifier for this request.

const char * getEncoding () const
 Returns encoding used.

XMLTranscoder * getTranscoder () const
unsigned int getError () const
 Returns error number.

void addParameter (const char *p_pszName, const char *p_pszParamValue)
 Adds named parameters.

const char * getParameter (const char *p_pszName) const
 Returns a parameter value, given its name.

const char * removeParameter (const char *p_pszName)
 Returns a parameter value, given its name.

void addNamedBuffer (const char *p_pszName, XMLStreamBuffer *p_pXMLStreamBuffer)
 Adds a XMLStreamBuffer to the named buffers collection.

XMLStreamBuffergetNamedBuffer (const char *p_pszName) const
 Returns a parameter value, given its name.

XMLStreamBufferremoveNamedBuffer (const char *p_pszName)
 Returns a parameter value, given its name.

void releaseBuffers ()
 Destroys the buffers referenced by the object.

void releaseParameters ()


Constructor & Destructor Documentation

BEGIN_XDFLENGINE_NS XMLFlowContext::XMLFlowContext const XMLProcessor   p_pXMLProcessor,
const XMLFlowContext *    m_pParent,
unsigned int    p_uiThreadId,
const char *    m_pszEncoding
 

Constructor. Initializes data members and populate valuers collection.

Definition at line 60 of file xmlflowcontext.cpp.

References CHAR_ENCODING_DEFAULT, DEBUG_CREATE, DEBUG_ECHO, importCharBuffer(), and STRX().

XMLFlowContext::~XMLFlowContext  
 

Destructor. Destroys valuers collection and XML named buffers.

Definition at line 87 of file xmlflowcontext.cpp.

References DEBUG_DEL, releaseBuffers(), releaseCharBuffer(), and releaseParameters().


Member Function Documentation

void XMLFlowContext::addNamedBuffer const char *    p_pszName,
XMLStreamBuffer   p_pXMLStreamBuffer
 

Adds a XMLStreamBuffer to the named buffers collection.

Remarks:
Setting a named buffer overwrites an existing one with the same name.
Parameters:
p_pszName (string) The name of the buffer.
p_pXMLStreamBuffer (XMLStreamBuffer*) A pointer to the XMLStreamBuffer object to add to the collection

Definition at line 225 of file xmlflowcontext.cpp.

References VAarray< XMLStreamBuffer * >::add(), DEBUG_FUNC, and VAarray< XMLStreamBuffer * >::remove().

Referenced by FuncCallStreamer::commitStream(), and NamedBufferSetStreamer::initStream().

void XMLFlowContext::addParameter const char *    p_pszName,
const char *    p_pszParamValue
 

Adds named parameters.

Remarks:
The parameters added at request level are dynamics (ie request-specific).

Setting a parameter overwrites an existing one with the same name.

Parameters:
p_pszName (string) The name of the parameter to set.
p_pszParamValue (string) The value of the paramieter to set.

Definition at line 183 of file xmlflowcontext.cpp.

References VAarray< char * >::add(), DEBUG_FUNC, importCharBuffer(), and VAarray< char * >::remove().

Referenced by FuncCallStreamer::commitStream(), and SAXValuesHandler::endElement().

const char * XMLFlowContext::getEncoding   const
 

Returns encoding used.

Returns:
(string) Character encoding used.

Definition at line 148 of file xmlflowcontext.cpp.

References DEBUG_FUNC, and exportCharBuffer().

Referenced by FuncCallStreamer::commitStream(), and ExecStreamer::commitStream().

unsigned int XMLFlowContext::getError   const
 

Returns error number.

Returns:
(int) Error number

Definition at line 170 of file xmlflowcontext.cpp.

References DEBUG_FUNC.

XMLStreamBuffer * XMLFlowContext::getNamedBuffer const char *    p_pszName const
 

Returns a parameter value, given its name.

Remarks:
If the parameter does not exists, an empty string is returned.
Parameters:
p_pszName (string) The name of the parameter.
Returns:
(string) The value of the parameter.

Definition at line 240 of file xmlflowcontext.cpp.

References DEBUG_FUNC, and VAarray< XMLStreamBuffer * >::get().

Referenced by DBOBJSetStreamer::initStream(), and ActiveStreamNode::streamXML().

const char * XMLFlowContext::getParameter const char *    p_pszName const
 

Returns a parameter value, given its name.

Remarks:
If the parameter does not exists, an empty string is returned.
Parameters:
p_pszName (string) The name of the parameter.
Returns:
(string) The value of the parameter.

Definition at line 192 of file xmlflowcontext.cpp.

References DEBUG_FUNC, exportCharBuffer(), and VAarray< char * >::get().

Referenced by ParamValuer::calculateExpression(), and SAXValuesHandler::endElement().

const XMLFlowContext * XMLFlowContext::getParent  
 

Definition at line 128 of file xmlflowcontext.cpp.

Referenced by _ValuesStreamerFactory::getStreamer(), and _NamedBufferSetStreamerFactory::getStreamer().

const XMLProcessor * XMLFlowContext::getProcessor  
 

Definition at line 110 of file xmlflowcontext.cpp.

Referenced by FuncDefineStreamer::commitStream(), FuncCallStreamer::commitStream(), ExecStreamer::commitStream(), CacheScriptStreamer::commitStream(), FuncDefineStreamer::initStream(), FuncCallStreamer::initStream(), ExecStreamer::initStream(), and CacheScriptStreamer::initStream().

unsigned int XMLFlowContext::getThreadId   const
 

Returns the thread identifier for this request.

Returns:
(int) The identifier of the thread in which the request is processed.

Definition at line 139 of file xmlflowcontext.cpp.

References DEBUG_FUNC.

Referenced by FuncDefineStreamer::commitStream(), FuncCallStreamer::commitStream(), ExecStreamer::commitStream(), DBOBJGetStreamer::commitStream(), CacheScriptStreamer::commitStream(), AutodescStreamer::commitStream(), DBOBJSetStreamer::initStream(), XMLProcessor::process(), SAXSQLHandler::SAXSQLHandler(), DBOBJGetStreamer::~DBOBJGetStreamer(), DBOBJSetStreamer::~DBOBJSetStreamer(), and SAXSQLHandler::~SAXSQLHandler().

XMLTranscoder * XMLFlowContext::getTranscoder   const
 

Definition at line 158 of file xmlflowcontext.cpp.

References DEBUG_FUNC.

Referenced by SAXValuesHandler::characters(), SAXSystemHandler::characters(), SAXSQLHandler::characters(), SAXRawHandler::characters(), SAXLangHandler::characters(), DBOBJGetStatementSAXBuilder::characters(), DBObjectSAXBuilder::characters(), XMLFlowBuilder::endElement(), SAXSystemHandler::endElement(), SAXSQLHandler::endElement(), DBObjectSAXBuilder::endElement(), SAXDBOBJDefinitionBuilder::endElement(), XMLFlowBuilder::startElement(), SAXValuesHandler::startElement(), SAXSystemHandler::startElement(), SAXLangHandler::startElement(), DBOBJGetStatementSAXBuilder::startElement(), DBObjectSAXBuilder::startElement(), and SAXDBOBJDefinitionBuilder::startElement().

void XMLFlowContext::releaseBuffers  
 

Destroys the buffers referenced by the object.

Definition at line 269 of file xmlflowcontext.cpp.

References DEBUG_FUNC, VAarray< XMLStreamBuffer * >::empty(), and VAarray< XMLStreamBuffer * >::pop().

Referenced by ~XMLFlowContext().

void XMLFlowContext::releaseParameters  
 

Definition at line 289 of file xmlflowcontext.cpp.

References DEBUG_FUNC, VAarray< char * >::empty(), VAarray< char * >::pop(), and releaseCharBuffer().

Referenced by ~XMLFlowContext().

XMLStreamBuffer * XMLFlowContext::removeNamedBuffer const char *    p_pszName
 

Returns a parameter value, given its name.

Remarks:
If the parameter does not exists, an empty string is returned.
Parameters:
p_pszName (string) The name of the parameter.
Returns:
(string) The value of the parameter.

Definition at line 257 of file xmlflowcontext.cpp.

References DEBUG_FUNC, and VAarray< XMLStreamBuffer * >::remove().

Referenced by FuncCallStreamer::commitStream().

const char * XMLFlowContext::removeParameter const char *    p_pszName
 

Returns a parameter value, given its name.

Remarks:
If the parameter does not exists, an empty string is returned.
Parameters:
p_pszName (string) The name of the parameter.
Returns:
(string) The value of the parameter.

Definition at line 212 of file xmlflowcontext.cpp.

References DEBUG_FUNC, and VAarray< char * >::remove().

void XMLFlowContext::setParent const XMLFlowContext *    p_pParent
 

Definition at line 119 of file xmlflowcontext.cpp.

void XMLFlowContext::setProcessor const XMLProcessor   p_pXMLProcessor
 

Definition at line 101 of file xmlflowcontext.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Oct 4 13:25:00 2003 for XDFLengine by doxygen1.3-rc2