Keeps the booking when loading one LibXml DOM single element into CLAM data. More...
#include <LibXmlDomReadingContext.hxx>
Public Member Functions | |
LibXmlDomReadingContext (xmlpp::Element *element) | |
LibXmlDomReadingContext (LibXmlDomDocumentHandler &docHandler) | |
LibXmlDomReadingContext (LibXmlDomReadingContext *oldContext, const char *name) | |
void | setAt (xmlpp::Element *element) |
bool | findElement (const char *name) |
Returns true when the next DOM element to be read is an element with the required name. | |
xmlpp::Element * | fetchElement (const char *name) |
Preconditions are asured when findElement returns true. | |
LibXmlDomReadingContext * | 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 one LibXml DOM single element into CLAM data.
Definition at line 40 of file LibXmlDomReadingContext.hxx.
CLAM::LibXmlDomReadingContext::LibXmlDomReadingContext | ( | xmlpp::Element * | element | ) | [inline] |
Definition at line 51 of file LibXmlDomReadingContext.hxx.
References setAt().
Referenced by LibXmlDomReadingContext().
CLAM::LibXmlDomReadingContext::LibXmlDomReadingContext | ( | LibXmlDomDocumentHandler & | docHandler | ) |
Definition at line 26 of file LibXmlDomReadingContext.cxx.
References CLAM::LibXmlDomDocumentHandler::getSelection(), LibXmlDomReadingContext(), and setAt().
CLAM::LibXmlDomReadingContext::LibXmlDomReadingContext | ( | LibXmlDomReadingContext * | oldContext, | |
const char * | name | |||
) | [inline] |
Definition at line 60 of file LibXmlDomReadingContext.hxx.
References fetchElement(), and setAt().
void CLAM::LibXmlDomReadingContext::checkNoContentLeftOrError | ( | ) | [inline] |
Definition at line 121 of file LibXmlDomReadingContext.hxx.
References contentLeft(), and getPath().
Referenced by release().
void CLAM::LibXmlDomReadingContext::checkNoElementLeftOrError | ( | ) | [inline] |
Definition at line 132 of file LibXmlDomReadingContext.hxx.
Referenced by release().
bool CLAM::LibXmlDomReadingContext::contentLeft | ( | ) | [inline] |
Returns true if there is non-space content on the content stream.
As side effect it skips any space (including \n \t \r...) caracters.
Definition at line 187 of file LibXmlDomReadingContext.hxx.
Referenced by checkNoContentLeftOrError(), fetchContent(), fetchElement(), and findElement().
std::list<std::string> CLAM::LibXmlDomReadingContext::errors | ( | ) | [inline] |
Definition at line 199 of file LibXmlDomReadingContext.hxx.
bool CLAM::LibXmlDomReadingContext::extractAttribute | ( | const char * | attributeName, | |
std::ostream & | os | |||
) | [inline] |
Definition at line 150 of file LibXmlDomReadingContext.hxx.
void CLAM::LibXmlDomReadingContext::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 168 of file LibXmlDomReadingContext.hxx.
References contentLeft(), and L.
Referenced by fetchElement(), and setAt().
xmlpp::Element* CLAM::LibXmlDomReadingContext::fetchElement | ( | const char * | name | ) | [inline] |
Preconditions are asured when findElement returns true.
Definition at line 98 of file LibXmlDomReadingContext.hxx.
References CLAM_ASSERT, contentLeft(), fetchContent(), and L.
Referenced by LibXmlDomReadingContext().
bool CLAM::LibXmlDomReadingContext::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 81 of file LibXmlDomReadingContext.hxx.
References CLAM_ASSERT, contentLeft(), and U.
std::string CLAM::LibXmlDomReadingContext::getPath | ( | ) | [inline] |
Definition at line 204 of file LibXmlDomReadingContext.hxx.
Referenced by checkNoContentLeftOrError(), checkNoElementLeftOrError(), and getPath().
std::istream& CLAM::LibXmlDomReadingContext::reachableContent | ( | ) | [inline] |
Definition at line 159 of file LibXmlDomReadingContext.hxx.
LibXmlDomReadingContext* CLAM::LibXmlDomReadingContext::release | ( | ) | [inline] |
Definition at line 114 of file LibXmlDomReadingContext.hxx.
References checkNoContentLeftOrError(), and checkNoElementLeftOrError().
void CLAM::LibXmlDomReadingContext::setAt | ( | xmlpp::Element * | element | ) | [inline] |
Definition at line 65 of file LibXmlDomReadingContext.hxx.
References fetchContent().
Referenced by LibXmlDomReadingContext().