regina::NXMLFilterReader Class Reference
Normal Surfaces

An XML element reader that reads the specific details of a normal surface filter. More...

`#include <surfaces/nxmlfilterreader.h>`

Inheritance diagram for regina::NXMLFilterReader:

## Public Member Functions

| NXMLFilterReader ()
| Creates a new filter element reader. More...
virtual NSurfaceFilter * | getFilter ()
| Returns the newly allocated filter that has been read by 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 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 | 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...
virtual void | abort (NXMLElementReader *subReader)
| Signifies that XML parsing has been aborted. More...

## Detailed Description

An XML element reader that reads the specific details of a normal surface filter.

These details are generally contained within a `<filter>` ... `</filter>` pair.

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

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

Python:
  Not present.

## Constructor & Destructor Documentation

regina::NXMLFilterReader::NXMLFilterReader | ( |  | ) |

inline

Creates a new filter element reader.

## Member Function Documentation

void regina::NXMLElementReader::abort | ( | NXMLElementReader * | subReader | ) |

inline virtual inherited

Signifies that XML parsing has been aborted.

This element reader will be destroyed shortly after this routine is called.

The default implementation does nothing.

Parameters

  subReader | the corresponding child reader if a subelement is currently being parsed, or 0 otherwise. If this parameter is non-zero, it is guaranteed that abort() has already been called upon the child reader and that the child reader has not yet been destroyed.

Reimplemented in regina::NXMLPacketReader.

void regina::NXMLElementReader::endElement | ( |  | ) |

inline virtual inherited

Signifies that parsing of this XML element is finished.

It is guaranteed that endSubElement() has not yet been called upon the parent reader (if one exists).

The default implementation does nothing.

void regina::NXMLElementReader::endSubElement | ( | const std::string & | subTagName,
|  | NXMLElementReader * | subReader
| ) |  |

inline virtual inherited

Signifies that parsing has finished for a subelement of this XML element.

The default implementation does nothing.

Parameters

  subTagName | the name of the subelement closing tag.
  subReader | the child reader that was used to parse the subelement (this is the reader that was returned by the corresponding startSubElement() call). It is guaranteed that endElement() has already been called upon this child reader and that the child reader has not yet been destroyed.

Reimplemented in regina::NXMLPacketReader, and regina::NXMLGroupPresentationReader.

NSurfaceFilter * regina::NXMLFilterReader::getFilter | ( |  | ) |

inline virtual

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

Deallocation of this new filter 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.

The default implementation returns 0.

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

void regina::NXMLElementReader::initialChars | ( | const std::string & | chars | ) |

inline virtual inherited

Signifies that the initial text belonging to this XML element has been read.

The initial text is everything between the opening tag and the first subelement or closing tag.

The default implementation does nothing.

Parameters

  chars | the initial text for this element.

Reimplemented in regina::NXMLCharsReader, regina::NXMLNormalSurfaceReader, regina::NXMLAngleStructureReader, and regina::NXMLAbelianGroupReader.

void regina::NXMLElementReader::startElement | ( | const std::string & | tagName,
|  | const regina::xml::XMLPropertyDict & | tagProps,
|  | NXMLElementReader * | parentReader
| ) |  |

inline virtual inherited

Signifies that parsing of this XML element is beginning.

The default implementation does nothing.

Parameters

  tagName | the name of the opening tag for this element.
  tagProps | the properties associated with the opening tag.
  parentReader | the reader currently parsing the parent XML element, or 0 if this is the top-level element. If this paraneter is non-zero, it is guaranteed that startSubElement() has already been called upon the parent reader.

Reimplemented in regina::NXMLGroupPresentationReader, regina::NXMLNormalSurfaceReader, regina::NXMLAngleStructureReader, and regina::NXMLAbelianGroupReader.

NXMLElementReader * regina::NXMLElementReader::startSubElement | ( | const std::string & | subTagName,
|  | const regina::xml::XMLPropertyDict & | subTagProps
| ) |  |

inline virtual inherited

Signifies that a subelement of this XML element is about to be parsed.

The default implementation returns a new NXMLElementReader which can be used to ignore the subelement completely.

Parameters

  subTagName | the name of the subelement opening tag.
  subTagProps | the properties associated with the subelement opening tag.

Returns
  a newly created element reader that will be used to parse the subelement. This class should not take care of the new reader's destruction; that will be done by the parser.

Reimplemented in regina::NXMLPacketReader, regina::NXMLGroupPresentationReader, regina::NXMLNormalSurfaceReader, and regina::NXMLAngleStructureReader.

void regina::NXMLElementReader::usingParser | ( | regina::xml::XMLParser * | parser | ) |

inline virtual inherited

Called for the top-level element in an XML file when parsing begins.

This allows direct access to the parser if needed (for instance, to change the character encoding).

The default implementation does nothing.

Parameters

  parser | the current XML parser.

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

- surfaces/nxmlfilterreader.h

Copyright © 1999-2014, 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).