Regina Calculation Engine
|
An XML packet reader that reads a single 4-dimensional triangulation. More...
#include <triangulation/xmltrireader4.h>
Public Member Functions | |
XMLTriangulationReader (XMLTreeResolver &resolver) | |
Creates a new triangulation reader. More... | |
XMLElementReader * | startPropertySubElement (const std::string &subTagName, const regina::xml::XMLPropertyDict &subTagProps) |
Returns an XML element reader for the given optional property of a dim-dimensional triangulation. More... | |
virtual Packet * | packet () override |
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) override |
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) override |
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) override |
Signifies that a subelement of this XML element is about to be parsed. More... | |
virtual void | endSubElement (const std::string &subTagName, XMLElementReader *subReader) override |
Signifies that parsing has finished for a subelement of this XML element. More... | |
virtual void | abort (XMLElementReader *subReader) override |
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 Member Functions | |
XMLElementReader * | propertyReader (const std::string &subTagName, const regina::xml::XMLPropertyDict &subTagProps) |
Returns a reader for the generic triangulation property with the given subtag name. More... | |
Protected Attributes | |
Triangulation< dim > * | tri_ |
The triangulation currently being read. More... | |
XMLTreeResolver & | resolver_ |
The master resolver that will be used to fix dangling packet references after the entire XML file has been read. More... | |
An XML packet reader that reads a single 4-dimensional triangulation.
This is a specialisation of the generic XMLTriangulationReader class template; see the XMLTriangulationReader documentation for an overview of how this class works.
This 4-dimensional specialisation contains extra functionality for reading optional properties specific to 4-dimensional triangulations.
|
inlineoverridevirtualinherited |
Used instead of endSubElement() for XML subelements that are not child packets or packet tags.
The default implementation does nothing.
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 startContentSubElement() 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 from regina::XMLPacketReader.
|
inlineoverridevirtualinherited |
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 XMLPacketReader::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 XMLPacketReader::startSubElement().
The default implementation returns 0.
Reimplemented from regina::XMLPacketReader.
|
inlineprotectedinherited |
Returns a reader for the generic triangulation property with the given subtag name.
If subTagName refers to a property that is managed by the generic base class TriangulationBase<dim>, then this routine returns an appropriate element reader. Otherwise this routine returns null
.
subTagName | the name of the XML subelement opening tag. |
subTagProps | the properties associated with the subelement opening tag. |
null
otherwise.
|
overridevirtualinherited |
Used instead of startSubElement() for XML subelements that are not child packets or packet tags.
The default implementation returns a new XMLElementReader which can be used to ignore the subelement completely.
subTagName | the name of the subelement opening tag. |
subTagProps | the properties associated with the subelement opening tag. |
Reimplemented from regina::XMLPacketReader.
|
protectedinherited |
The triangulation currently being read.