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

DBObjectSAXBuilder Class Reference

#include <dbobject.hpp>

Collaboration diagram for DBObjectSAXBuilder:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements a XMLStreamBuffer using temporary files.

Definition at line 583 of file dbobject.hpp.

Public Methods

 DBObjectSAXBuilder (XMLFlowContext *p_pContext, const DBOBJDefinitionNode *p_pDBOBJDefNode, DBOBJSetAction l_intBaseAction)
 Constructor. Inits private data members.

 ~DBObjectSAXBuilder ()
 Destructor. Releases private data members.

void startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs)
 Receive notification of the beginning of an element. Builds objects nodes and fields.

void characters (const XMLCh *const chars, const unsigned int length)
 Receive notification of character data. Accumulates fields values.

void endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
 Receive notification of the end of an element. Attach nodes and fields to object tree. Lanches object process for ach completed object.

void startDocument ()
void endDocument ()
void startPrefixMapping (const XMLCh *const prefix, const XMLCh *const uri)
void endPrefixMapping (const XMLCh *const prefix)
void processingInstruction (const XMLCh *const target, const XMLCh *const data)
void ignorableWhitespace (const XMLCh *const chars, const unsigned int length)
void setDocumentLocator (const Locator *const locator)
void skippedEntity (const XMLCh *const name)
unsigned int getObjectsCount ()
DBObjectNodepopObject ()

Static Public Methods

void buildDBObject (XMLFlowContext *p_pContext, XMLStreamProvider *p_pInput, const DBOBJDefinitionNode *p_pDBOBJDefNode, DBOBJSetAction l_intBaseAction)
 Launches input XML parse & mapping. //.

DBOBJSetAction translateAction (const char *p_pszAction)
 Translation tring action to action constants.

char * translateAction (DBOBJSetAction p_Action)
 Translation tring action to action constants.


Constructor & Destructor Documentation

DBObjectSAXBuilder::DBObjectSAXBuilder XMLFlowContext   p_pContext,
const DBOBJDefinitionNode   p_pDBOBJDefNode,
DBOBJSetAction    l_intBaseAction
 

Constructor. Inits private data members.

Definition at line 850 of file dbobject.cpp.

References DEBUG_CREATE.

Referenced by buildDBObject().

DBObjectSAXBuilder::~DBObjectSAXBuilder  
 

Destructor. Releases private data members.

Definition at line 864 of file dbobject.cpp.

References DEBUG_DEL, VAarray< DBObjectNode * >::empty(), VAarray< DBObjectNode * >::pop(), and releaseCharBuffer().


Member Function Documentation

void DBObjectSAXBuilder::buildDBObject XMLFlowContext   p_pContext,
XMLStreamProvider   p_pInput,
const DBOBJDefinitionNode   p_pDBOBJDefNode,
DBOBJSetAction    l_intBaseAction
[static]
 

Launches input XML parse & mapping. //.

Parameters:
p_pInputXMLStreamBuffer (XMLStreamBuffer*) Input XML buffer.
p_pDBOBJDefNode (DBOBJDefinitionNode*) Root node of the definition of the objects to build.
p_pSAXDB_request (DBOBJSetRequest*) Parent DBOBJGetRequest object.

Definition at line 808 of file dbobject.cpp.

References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, DBObjectSAXBuilder(), DEBUG_IN, DEBUG_OUT, ON_XML_FLOW_ERROR_THROW, PREP_CATCH_XML_FLOW_ERROR, and WATCH_XML_FLOW_ERROR.

void DBObjectSAXBuilder::characters const XMLCh *const    chars,
const unsigned int    length
 

Receive notification of character data. Accumulates fields values.

Parameters:
chars The characters from the XML document.
length The number of characters to read from the array.
Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.

Definition at line 1098 of file dbobject.cpp.

References CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, concatCharBuffer(), DEBUG_IN, DEBUG_OUT, XMLFlowContext::getTranscoder(), ON_XML_FLOW_ERROR_THROW, PREP_CATCH_XML_FLOW_ERROR, releaseCharBuffer(), trimCharBuffer(), WATCH_XML_FLOW_ERROR, and XSTR().

void DBObjectSAXBuilder::endDocument   [inline]
 

Definition at line 674 of file dbobject.hpp.

void DBObjectSAXBuilder::endElement const XMLCh *const    uri,
const XMLCh *const    localname,
const XMLCh *const    qname
 

Receive notification of the end of an element. Attach nodes and fields to object tree. Lanches object process for ach completed object.

Parameters:
uri The URI of the asscioated namespace for this element
localname The local part of the element name
qname The QName of this element
Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.

Definition at line 1031 of file dbobject.cpp.

References DBObjectNode::addChildNode(), DBObjectNode::addField(), CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, DEBUG_ECHO, DEBUG_IN, DEBUG_OUT, VAarray< DBObjectNode * >::empty(), DBObjectNode::getName(), XMLFlowContext::getTranscoder(), ON_XML_FLOW_ERROR_THROW, VAarray< DBObjectNode * >::pop(), PREP_CATCH_XML_FLOW_ERROR, VAarray< DBObjectNode * >::push(), releaseCharBuffer(), VAarray< DBObjectNode * >::top(), WATCH_XML_FLOW_ERROR, XMLPROCESSOR_MAX_TAG_SIZE, and XSTR().

void DBObjectSAXBuilder::endPrefixMapping const XMLCh *const    prefix [inline]
 

Definition at line 676 of file dbobject.hpp.

unsigned int DBObjectSAXBuilder::getObjectsCount  
 

Definition at line 1180 of file dbobject.cpp.

References VAarray< DBObjectNode * >::size().

Referenced by DBOBJSetStreamer::commitStream().

void DBObjectSAXBuilder::ignorableWhitespace const XMLCh *const    chars,
const unsigned int    length
[inline]
 

Definition at line 678 of file dbobject.hpp.

DBObjectNode * DBObjectSAXBuilder::popObject  
 

Definition at line 1188 of file dbobject.cpp.

References VAarray< DBObjectNode * >::bottom(), and VAarray< DBObjectNode * >::remove().

Referenced by DBOBJSetStreamer::commitStream().

void DBObjectSAXBuilder::processingInstruction const XMLCh *const    target,
const XMLCh *const    data
[inline]
 

Definition at line 677 of file dbobject.hpp.

void DBObjectSAXBuilder::setDocumentLocator const Locator *const    locator [inline]
 

Definition at line 679 of file dbobject.hpp.

void DBObjectSAXBuilder::skippedEntity const XMLCh *const    name [inline]
 

Definition at line 680 of file dbobject.hpp.

void DBObjectSAXBuilder::startDocument   [inline]
 

Definition at line 673 of file dbobject.hpp.

void DBObjectSAXBuilder::startElement const XMLCh *const    uri,
const XMLCh *const    localname,
const XMLCh *const    qname,
const Attributes &    attrs
 

Receive notification of the beginning of an element. Builds objects nodes and fields.

Parameters:
uri The URI of the asscioated namespace for this element
localname The local part of the element name
qname The QName of this element
attrs The attributes attached to the element, if any.
Exceptions:
SAXException Any SAX exception, possibly wrapping another exception.
XMLFlowException ERRCODE_CAUSE_MISSINGREF

Definition at line 882 of file dbobject.cpp.

References DBObjectNode::addField(), CATCH_XML_FLOW_ERROR_RELEASE_AND_RETURN, copyCharBuffer(), DBOBJDEFFIELD_ATTR, DBObjectNode, DBOBJSetAction, DEBUG_ECHO, DEBUG_IN, DEBUG_OUT, VAarray< DBObjectNode * >::empty(), DBObjectNode::getAction(), DBOBJDefinitionNode::getChildNode(), DBObjectNode::getDefinition(), DBOBJDefinitionNode::getField(), DBOBJDefinitionNode::getName(), XMLFlowContext::getTranscoder(), ON_XML_FLOW_ERROR_THROW, PREP_CATCH_XML_FLOW_ERROR, VAarray< DBObjectNode * >::push(), releaseCharBuffer(), SAX_getAttrValue(), DBObjectNode::setAction(), DBObjectField::setValue(), VAarray< DBObjectNode * >::top(), translateAction(), WATCH_XML_FLOW_ERROR, XMLPROCESSOR_MAX_ATTRNAME_SIZE, XMLPROCESSOR_MAX_ATTRVAL_SIZE, XMLPROCESSOR_MAX_TAG_SIZE, and XSTR().

void DBObjectSAXBuilder::startPrefixMapping const XMLCh *const    prefix,
const XMLCh *const    uri
[inline]
 

Definition at line 675 of file dbobject.hpp.

char * DBObjectSAXBuilder::translateAction DBOBJSetAction    p_Action [static]
 

Translation tring action to action constants.

Parameters:
p_Action (DBOBJSetAction) Action constant.
Returns:
(string) string action.

Definition at line 1157 of file dbobject.cpp.

References copyCharBuffer(), DBOBJaction_Delete, DBOBJaction_Insert, DBOBJaction_None, DBOBJaction_Update, DBOBJECTNODE_ACTIONDELETE, DBOBJECTNODE_ACTIONINSERT, DBOBJECTNODE_ACTIONNONE, DBOBJECTNODE_ACTIONUPDATE, and DEBUG_FUNC.

DBOBJSetAction DBObjectSAXBuilder::translateAction const char *    p_pszAction [static]
 

Translation tring action to action constants.

Parameters:
p_strAction (string) string action.
Returns:
(DBOBJSetAction) Action constant.

Definition at line 1136 of file dbobject.cpp.

References DBOBJaction_Delete, DBOBJaction_Insert, DBOBJaction_None, DBOBJaction_Unspec, DBOBJaction_Update, DBOBJSetAction, and DEBUG_FUNC.

Referenced by DBOBJSetStreamer::countObjectNodes(), and startElement().


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