Keeps the booking when loading a single Xerces-C DOM element into CLAM data. More...
#include <XercesDomReadingContext.hxx>
Public Member Functions | |
XercesDomReadingContext (xercesc::DOMElement *element) | |
XercesDomReadingContext (XercesDomDocumentHandler &docHandler) | |
XercesDomReadingContext (XercesDomReadingContext *oldContext, const char *name) | |
void | setAt (xercesc::DOMElement *element) |
bool | findElement (const char *name) |
Returns true when the next DOM element to be read is an element with the required name. | |
xercesc::DOMElement * | fetchElement (const char *name) |
Preconditions are asured when findElement returns true. | |
XercesDomReadingContext * | release () |
void | checkNoContentLeftOrError () |
void | checkNoElementLeftOrError () |
bool | extractAttribute (const char *attributeName, std::ostream &os) |
std::istream & | reachableContent () |
void | fetchContent () |
Dumps the reachable content of text nodes onto the content stream. | |
bool | contentLeft () |
Returns true if there is non-space content on the content stream. | |
std::list< std::string > | errors () |
std::string | getPath () |
Keeps the booking when loading a single Xerces-C DOM element into CLAM data.
Definition at line 42 of file XercesDomReadingContext.hxx.
CLAM::XercesDomReadingContext::XercesDomReadingContext | ( | xercesc::DOMElement * | element | ) | [inline] |
Definition at line 54 of file XercesDomReadingContext.hxx.
References setAt().
Referenced by XercesDomReadingContext().
CLAM::XercesDomReadingContext::XercesDomReadingContext | ( | XercesDomDocumentHandler & | docHandler | ) |
Definition at line 26 of file XercesDomReadingContext.cxx.
References CLAM::XercesDomDocumentHandler::getSelection(), setAt(), and XercesDomReadingContext().
CLAM::XercesDomReadingContext::XercesDomReadingContext | ( | XercesDomReadingContext * | oldContext, | |
const char * | name | |||
) | [inline] |
Definition at line 62 of file XercesDomReadingContext.hxx.
References fetchElement(), and setAt().
void CLAM::XercesDomReadingContext::checkNoContentLeftOrError | ( | ) | [inline] |
Definition at line 127 of file XercesDomReadingContext.hxx.
References contentLeft(), and getPath().
Referenced by release().
void CLAM::XercesDomReadingContext::checkNoElementLeftOrError | ( | ) | [inline] |
Definition at line 139 of file XercesDomReadingContext.hxx.
Referenced by release().
bool CLAM::XercesDomReadingContext::contentLeft | ( | ) | [inline] |
Returns true if there is non-space content on the content stream.
As side effect it skips any space (including
...) caracters.
Definition at line 196 of file XercesDomReadingContext.hxx.
Referenced by checkNoContentLeftOrError(), fetchContent(), fetchElement(), and findElement().
std::list<std::string> CLAM::XercesDomReadingContext::errors | ( | ) | [inline] |
Definition at line 208 of file XercesDomReadingContext.hxx.
bool CLAM::XercesDomReadingContext::extractAttribute | ( | const char * | attributeName, | |
std::ostream & | os | |||
) | [inline] |
Definition at line 159 of file XercesDomReadingContext.hxx.
void CLAM::XercesDomReadingContext::fetchContent | ( | ) | [inline] |
Dumps the reachable content of text nodes onto the content stream.
Reachable means continuous Text which may have XML comments inside. As side effect trims initial spaces on content
Definition at line 178 of file XercesDomReadingContext.hxx.
References contentLeft(), and L.
Referenced by fetchElement(), and setAt().
xercesc::DOMElement* CLAM::XercesDomReadingContext::fetchElement | ( | const char * | name | ) | [inline] |
Preconditions are asured when findElement returns true.
Definition at line 103 of file XercesDomReadingContext.hxx.
References CLAM_ASSERT, contentLeft(), fetchContent(), and U.
Referenced by XercesDomReadingContext().
bool CLAM::XercesDomReadingContext::findElement | ( | const char * | name | ) | [inline] |
Returns true when the next DOM element to be read is an element with the required name.
Returns false when all the nodes have been read. Returns false when there is content left before the next element. Returns false when the next DOM element has a different name.
Definition at line 84 of file XercesDomReadingContext.hxx.
References CLAM_ASSERT, contentLeft(), and U.
std::string CLAM::XercesDomReadingContext::getPath | ( | ) | [inline] |
Definition at line 213 of file XercesDomReadingContext.hxx.
Referenced by checkNoContentLeftOrError(), checkNoElementLeftOrError(), and getPath().
std::istream& CLAM::XercesDomReadingContext::reachableContent | ( | ) | [inline] |
Definition at line 168 of file XercesDomReadingContext.hxx.
XercesDomReadingContext* CLAM::XercesDomReadingContext::release | ( | ) | [inline] |
Definition at line 120 of file XercesDomReadingContext.hxx.
References checkNoContentLeftOrError(), and checkNoElementLeftOrError().
void CLAM::XercesDomReadingContext::setAt | ( | xercesc::DOMElement * | element | ) | [inline] |
Definition at line 67 of file XercesDomReadingContext.hxx.
References fetchContent().
Referenced by XercesDomReadingContext().