Provides the callbacks for an XMLParser required to parse an entire file using a series of XMLElementReader objects.
More...
#include <utilities/xmlcallback.h>
|
static const int | WAITING |
| Signifies that the top-level XML element has not yet been seen. More...
|
|
static const int | WORKING |
| Signifies that XML elements are currently being processed. More...
|
|
static const int | DONE |
| Signifies that processing of all XML elements has finished. More...
|
|
static const int | ABORTED |
| Signifies that XML processing was aborted. More...
|
|
Provides the callbacks for an XMLParser required to parse an entire file using a series of XMLElementReader objects.
See the XMLElementReader class notes for details of precisely how processing will take place.
- Python:
- Not present.
§ XMLCallback()
regina::XMLCallback::XMLCallback |
( |
XMLElementReader & |
newTopReader, |
|
|
std::ostream & |
newErrStream |
|
) |
| |
|
inline |
Creates a new callback object.
- Parameters
-
newTopReader | the element reader to use for the top-level XML element. This is the only element reader that will not be destroyed once parsing has finished. |
newErrStream | the output stream to which any warning or error messages should be sent. |
§ ~XMLCallback()
virtual regina::XMLCallback::~XMLCallback |
( |
| ) |
|
|
virtual |
Destroys this callback object.
Any element reader (aside from the top-level reader) that has not yet been destroyed will have abort() called upon it and will be destroyed at this point.
§ abort()
void regina::XMLCallback::abort |
( |
| ) |
|
Aborts processing of the XML file completely.
The XMLParser may continue sending information but it will be completely ignored by this XMLCallback object from this point onwards.
All currently active readers will have XMLElementReader::abort() called upon them and all except for the top-level reader will be destroyed.
§ characters()
virtual void regina::XMLCallback::characters |
( |
const std::string & |
s | ) |
|
|
virtual |
§ comment()
void regina::xml::XMLParserCallback::comment |
( |
const std::string & |
s | ) |
|
|
inlinevirtualinherited |
Called when a comment is encountered.
- Parameters
-
§ end_document()
virtual void regina::XMLCallback::end_document |
( |
| ) |
|
|
virtual |
§ end_element()
virtual void regina::XMLCallback::end_element |
( |
const std::string & |
n | ) |
|
|
virtual |
§ error()
virtual void regina::XMLCallback::error |
( |
const std::string & |
s | ) |
|
|
virtual |
§ fatal_error()
virtual void regina::XMLCallback::fatal_error |
( |
const std::string & |
s | ) |
|
|
virtual |
§ start_document()
Called at the start of the document.
- Parameters
-
parser | the XML parser that is currently parsing this document. |
Reimplemented from regina::xml::XMLParserCallback.
§ start_element()
Called when an element's opening tag is encountered.
- Parameters
-
n | the name of the tag. |
p | a dictionary of all the properties of the tag. |
Reimplemented from regina::xml::XMLParserCallback.
§ state()
int regina::XMLCallback::state |
( |
| ) |
const |
|
inline |
Returns the state that this callback object is currently in.
The returned value will be one of the state constants defined in this class.
- Returns
- the current state of this callback object.
§ warning()
virtual void regina::XMLCallback::warning |
( |
const std::string & |
s | ) |
|
|
virtual |
§ ABORTED
const int regina::XMLCallback::ABORTED |
|
static |
Signifies that XML processing was aborted.
§ DONE
const int regina::XMLCallback::DONE |
|
static |
Signifies that processing of all XML elements has finished.
§ WAITING
const int regina::XMLCallback::WAITING |
|
static |
Signifies that the top-level XML element has not yet been seen.
§ WORKING
const int regina::XMLCallback::WORKING |
|
static |
Signifies that XML elements are currently being processed.
The documentation for this class was generated from the following file: