regina::NXMLContainerReader Class Reference
Basic Packet Types

An XML packet reader that reads a single container. More...

`#include <packet/nxmlpacketreaders.h>`

Inheritance diagram for regina::NXMLContainerReader:

## Public Member Functions

| NXMLContainerReader (NXMLTreeResolver &resolver)
| Creates a new container reader. More...
virtual NPacket * | getPacket ()
| Returns the newly allocated packet that has been read by this element reader. More...
Public Member Functions inherited from regina::NXMLPacketReader
| NXMLPacketReader (NXMLTreeResolver &resolver)
| Creates a new packet element reader. More...
virtual NXMLElementReader * | 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, NXMLElementReader *subReader)
| Used instead of endSubElement() for XML subelements that are not child packets or packet tags. More...
virtual NXMLElementReader * | 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, NXMLElementReader *subReader)
| Signifies that parsing has finished for a subelement of this XML element. More...
virtual void | abort (NXMLElementReader *subReader)
| Signifies that XML parsing has been aborted. More...
Public Member Functions inherited from regina::NXMLElementReader
| NXMLElementReader ()
| Creates a new element reader. More...
virtual | ~NXMLElementReader ()
| Destroys this element reader. More...
virtual void | startElement (const std::string &tagName, const regina::xml::XMLPropertyDict &tagProps, NXMLElementReader *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...

## Additional Inherited Members

Protected Attributes inherited from regina::NXMLPacketReader
NXMLTreeResolver & | 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 packet reader that reads a single container.

Python:
  Not present.

## Constructor & Destructor Documentation

regina::NXMLContainerReader::NXMLContainerReader | ( | NXMLTreeResolver & | resolver | ) |

inline

Creates a new container reader.

Parameters

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

## Member Function Documentation

NPacket * regina::NXMLContainerReader::getPacket | ( |  | ) |

inline virtual

Returns the newly allocated packet that has been read by this element reader.

Deallocation of this new packet is not the responsibility of this class. Once this routine gives a non-zero return value, it should continue to give the same non-zero return value from this point onwards.

If this routine is ever to give a non-zero return value, it must be giving that non-zero return value by the time the first child packet or packet tag is encountered; otherwise child packets will not be inserted into the packet tree and/or packet tags will not be added.

The newly allocated packet should not be given a packet label. This will be done by NXMLPacketReader::endSubElement().

The newly allocated packet may or may not be inserted in the packet tree structure; this does not matter (although if it is inserted it must be inserted in the correct place).

The newly allocated packet should not be given any associated packet tags. This will be done by NXMLPacketReader::startSubElement().

The default implementation returns 0.

Returns
  the packet that has been read, or 0 if packet reading is incomplete, the packet should be ignored or an error occurred.

Reimplemented from regina::NXMLPacketReader.

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

- packet/nxmlpacketreaders.h

Copyright © 1999-2013, 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@debian.org).