regina::XMLPacketReader Class Reference
Basic Packet Types

An XML element reader that reads the data for an individual packet. More...

`#include <packet/xmlpacketreader.h>`

Inheritance diagram for regina::XMLPacketReader:

## Public Member Functions

| XMLPacketReader (XMLTreeResolver &resolver)
| Creates a new packet element reader. More...
virtual Packet * | packet ()
| Returns the newly allocated packet that has been read by this element reader. More...
virtual XMLElementReader * | startContentSubElement (const std::string &subTagName, const regina::xml::XMLPropertyDict &subTagProps)
| Used instead of startSubElement() for XML subelements that are not child packets or packet tags. More...
virtual void | endContentSubElement (const std::string &subTagName, XMLElementReader *subReader)
| Used instead of endSubElement() for XML subelements that are not child packets or packet tags. More...
virtual XMLElementReader * | startSubElement (const std::string &subTagName, const regina::xml::XMLPropertyDict &subTagProps)
| Signifies that a subelement of this XML element is about to be parsed. More...
virtual void | endSubElement (const std::string &subTagName, XMLElementReader *subReader)
| Signifies that parsing has finished for a subelement of this XML element. More...
virtual void | abort (XMLElementReader *subReader)
| Signifies that XML parsing has been aborted. More...
virtual void | startElement (const std::string &tagName, const regina::xml::XMLPropertyDict &tagProps, XMLElementReader *parentReader)
| Signifies that parsing of this XML element is beginning. More...
virtual void | initialChars (const std::string &chars)
| Signifies that the initial text belonging to this XML element has been read. More...
virtual void | endElement ()
| Signifies that parsing of this XML element is finished. More...
virtual void | usingParser (regina::xml::XMLParser *parser)
| Called for the top-level element in an XML file when parsing begins. More...

## Protected Attributes

XMLTreeResolver & | resolver_
| The master resolver that will be used to fix dangling packet references after the entire XML file has been read. More...

## Detailed Description

An XML element reader that reads the data for an individual packet.

Generally a subclass of XMLPacketReader will be used to receive and store packets that you care about. However, if you simply wish to ignore a particular packet (and all of its descendants), you can use class XMLPacketReader itself for the packet(s) you wish to ignore.

Routine packet() is used to return the packet that was read; see its documentation for further notes on how the packet should be constructed.

Routines startSubElement() and endSubElement() should not be overridden by derived classes. They determine whether the subelement is another packet element or a packet tag; if so then they deal with the subelement themselves (packet elements will be read using a new XMLPacketReader of the correct type), and if not then they call startContentSubElement() and endContentSubElement() which should be overridden for processing of non-packet XML subelements.

If routine abort() is overridden, it must at some point call XMLPacketReader::abort() which will destroy whatever new packets have already been created.

Python:\n Not present.

The documentation for this class was generated from the following file:

- packet/xmlpacketreader.h

Copyright © 1999-2016, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).