regina::detail::XMLSimplicesReader< dim > Class Template Reference
Implementation details

Helper class that reads the XML element for the set of all top-dimensional simplices in a dim-dimensional triangulation. More...

`#include <triangulation/detail/xmltrireader.h>`

Inheritance diagram for regina::detail::XMLSimplicesReader< dim >:

## Public Member Functions

| XMLSimplicesReader (Triangulation< dim > *tri)
| Creates a new simplices element reader. More...
virtual void | startElement (const std::string &, const regina::xml::XMLPropertyDict &props, XMLElementReader *)
| Signifies that parsing of this XML element is beginning. More...
virtual XMLElementReader * | startSubElement (const std::string &subTagName, const regina::xml::XMLPropertyDict &)
| Signifies that a subelement of this XML element is about to be parsed. More...
virtual void | initialChars (const std::string &chars)
| Signifies that the initial text belonging to this XML element has been read. 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 | 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 (XMLElementReader *subReader)
| Signifies that XML parsing has been aborted. More...

## Detailed Description

### template<int dim>
class regina::detail::XMLSimplicesReader< dim >

Helper class that reads the XML element for the set of all top-dimensional simplices in a dim-dimensional triangulation.

In other words, this reads the contents of a single <simplices> element for dimension dim ≥ 5, or a single <triangles>, <tetrahedra> or <pentachora> element for dimension dim = 2, 3 or 4.

It is assumed that the underlying triangulation has already been created, but its simplices have not.

Python:
  Not present.

Template Parameters

  dim | The dimension of the triangulation being read.

## Constructor & Destructor Documentation

## XMLSimplicesReader()

template<int dim>

regina::detail::XMLSimplicesReader< dim >::XMLSimplicesReader | ( | Triangulation< dim > * | tri | ) |

inline

Creates a new simplices element reader.

The given triangulation should be empty; its simplices will be created by this reader.

Parameters

  tri | the triangulation being read.

## Member Function Documentation

## abort()

void regina::XMLElementReader::abort | ( | XMLElementReader * | 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::XMLPacketReader.

## endElement()

void regina::XMLElementReader::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.

## endSubElement()

void regina::XMLElementReader::endSubElement | ( | const std::string & | subTagName,
|  | XMLElementReader * | 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::detail::XMLTriangulationReaderBase< dim >::GroupPresentationPropertyReader, regina::detail::XMLTriangulationReaderBase< dim >::AbelianGroupPropertyReader, regina::XMLPacketReader, and regina::XMLGroupPresentationReader.

## initialChars()

void regina::XMLElementReader::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::XMLCharsReader, regina::detail::XMLSimplexReader< dim >, regina::XMLNormalHypersurfaceReader, regina::XMLNormalSurfaceReader, regina::XMLAngleStructureReader, and regina::XMLAbelianGroupReader.

## startElement()

template<int dim>

void regina::detail::XMLSimplicesReader< dim >::startElement | ( | const std::string & | tagName,
|  | const regina::xml::XMLPropertyDict & | tagProps,
|  | XMLElementReader * | parentReader
| ) |  |

virtual

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 from regina::XMLElementReader.

## startSubElement()

template<int dim>

XMLElementReader * regina::detail::XMLSimplicesReader< dim >::startSubElement | ( | const std::string & | subTagName,
|  | const regina::xml::XMLPropertyDict & | subTagProps
| ) |  |

virtual

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

The default implementation returns a new XMLElementReader 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 from regina::XMLElementReader.

## usingParser()

void regina::XMLElementReader::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:

- triangulation/detail/xmltrireader.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).