Regina Calculation Engine
|
Classes | |
class | regina::FileInfo |
Stores information about a Regina data file, including file type and version. More... | |
class | regina::GlobalDirs |
Provides global routines that return directories in which various components of Regina are installed on the system. More... | |
class | regina::XMLCallback |
Provides the callbacks for an XMLParser required to parse an entire file using a series of XMLElementReader objects. More... | |
class | regina::XMLElementReader |
Used to read the contents of a single XML element. More... | |
class | regina::XMLCharsReader |
A reader for an XML element that contains only characters. More... | |
Functions | |
regina::FileInfo::FileInfo (const FileInfo &)=default | |
Creates a new copy of the given file information. More... | |
const std::string & | regina::FileInfo::pathname () const |
Returns the pathname of the data file being described. More... | |
int | regina::FileInfo::type () const |
Returns the type of data file. More... | |
const std::string & | regina::FileInfo::typeDescription () const |
Returns a human-readable description of the type of data file. More... | |
const std::string & | regina::FileInfo::engine () const |
Returns the version of the calculation engine that wrote this file. More... | |
bool | regina::FileInfo::isCompressed () const |
Returns whether this file is stored in compressed format. More... | |
bool | regina::FileInfo::isInvalid () const |
Returns whether the file metadata could not be read. More... | |
FileInfo & | regina::FileInfo::operator= (const FileInfo &)=default |
Sets this to be a copy of the given file information. More... | |
static FileInfo * | regina::FileInfo::identify (const std::string &idPathname) |
Return information about the given Regina data file. More... | |
void | regina::FileInfo::writeTextShort (std::ostream &out) const |
Writes a short text representation of this object to the given output stream. More... | |
void | regina::FileInfo::writeTextLong (std::ostream &out) const |
Writes a detailed text representation of this object to the given output stream. More... | |
static std::string | regina::GlobalDirs::home () |
Returns Regina's primary home directory on the system. More... | |
static std::string | regina::GlobalDirs::pythonModule () |
Returns the directory in which Regina's python module is installed, or the empty string if the module is installed in python's standard site-packages directory. More... | |
static std::string | regina::GlobalDirs::census () |
Returns the directory containing the large machine-encoded census data files. More... | |
static std::string | regina::GlobalDirs::pythonLibs () |
Returns the directory in which optional "helper" Python libraries are installed. More... | |
static std::string | regina::GlobalDirs::examples () |
Returns the directory in which example data files (including the smaller but human-browsable census data files) are installed. More... | |
static std::string | regina::GlobalDirs::engineDocs () |
Returns the directory in which API documentation for Regina's calculation engine is installed. More... | |
static std::string | regina::GlobalDirs::data () |
Returns the directory containing miscellaneous data files for internal use Regina's calculation engine. More... | |
static void | regina::GlobalDirs::setDirs (const std::string &homeDir, const std::string &pythonModuleDir, const std::string &censusDir=std::string()) |
Tells Regina where data files are installed. More... | |
regina::XMLCallback::XMLCallback (XMLElementReader &newTopReader, std::ostream &newErrStream) | |
Creates a new callback object. More... | |
virtual | regina::XMLCallback::~XMLCallback () |
Destroys this callback object. More... | |
int | regina::XMLCallback::state () const |
Returns the state that this callback object is currently in. More... | |
void | regina::XMLCallback::abort () |
Aborts processing of the XML file completely. More... | |
virtual void | regina::XMLCallback::start_document (regina::xml::XMLParser *parser) override |
Called at the start of the document. More... | |
virtual void | regina::XMLCallback::end_document () override |
Called when the document is finalised. More... | |
virtual void | regina::XMLCallback::start_element (const std::string &n, const regina::xml::XMLPropertyDict &p) override |
Called when an element's opening tag is encountered. More... | |
virtual void | regina::XMLCallback::end_element (const std::string &n) override |
Called when an element's closing tag is encountered. More... | |
virtual void | regina::XMLCallback::characters (const std::string &s) override |
Called when characters are encountered. More... | |
virtual void | regina::XMLCallback::warning (const std::string &s) override |
Called when a parser warning occurs. More... | |
virtual void | regina::XMLCallback::error (const std::string &s) override |
Called when a parser error occurs. More... | |
virtual void | regina::XMLCallback::fatal_error (const std::string &s) override |
Called when a parser fatal error occurs. More... | |
regina::XMLCallback::XMLCallback (const XMLCallback &)=delete | |
XMLCallback & | regina::XMLCallback::operator= (const XMLCallback &)=delete |
regina::XMLElementReader::XMLElementReader () | |
Creates a new element reader. More... | |
virtual | regina::XMLElementReader::~XMLElementReader () |
Destroys this element reader. More... | |
virtual void | regina::XMLElementReader::startElement (const std::string &tagName, const regina::xml::XMLPropertyDict &tagProps, XMLElementReader *parentReader) |
Signifies that parsing of this XML element is beginning. More... | |
virtual void | regina::XMLElementReader::initialChars (const std::string &chars) |
Signifies that the initial text belonging to this XML element has been read. More... | |
virtual XMLElementReader * | regina::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 | regina::XMLElementReader::endSubElement (const std::string &subTagName, XMLElementReader *subReader) |
Signifies that parsing has finished for a subelement of this XML element. More... | |
virtual void | regina::XMLElementReader::endElement () |
Signifies that parsing of this XML element is finished. More... | |
virtual void | regina::XMLElementReader::usingParser (regina::xml::XMLParser *parser) |
Called for the top-level element in an XML file when parsing begins. More... | |
virtual void | regina::XMLElementReader::abort (XMLElementReader *subReader) |
Signifies that XML parsing has been aborted. More... | |
regina::XMLElementReader::XMLElementReader (const XMLElementReader &)=delete | |
XMLElementReader & | regina::XMLElementReader::operator= (const XMLElementReader &)=delete |
regina::XMLCharsReader::XMLCharsReader () | |
Creates a new XML element reader. More... | |
const std::string & | regina::XMLCharsReader::chars () |
Returns the characters stored in the XML element that has been read. More... | |
virtual void | regina::XMLCharsReader::initialChars (const std::string &chars) override |
Signifies that the initial text belonging to this XML element has been read. More... | |
Variables | |
static const int | regina::FileInfo::TYPE_XML |
Represents a new-style XML data file. More... | |
static const int | regina::XMLCallback::WAITING |
Signifies that the top-level XML element has not yet been seen. More... | |
static const int | regina::XMLCallback::WORKING |
Signifies that XML elements are currently being processed. More... | |
static const int | regina::XMLCallback::DONE |
Signifies that processing of all XML elements has finished. More... | |
static const int | regina::XMLCallback::ABORTED |
Signifies that XML processing was aborted. More... | |
void regina::XMLCallback::abort | ( | ) |
Aborts processing of the XML file completely.
The XMLParser may continue sending information but it will be completely ignored by this XMLCallback object from this point onwards.
All currently active readers will have XMLElementReader::abort() called upon them and all except for the top-level reader will be destroyed.
|
inlinevirtual |
Signifies that XML parsing has been aborted.
This element reader will be destroyed shortly after this routine is called.
The default implementation does nothing.
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.
|
inlinestatic |
Returns the directory containing the large machine-encoded census data files.
These data files are not human-browsable: instead they are built for fast performance and small size. Users can access them by calling Census::lookup().
On a typical GNU/Linux system, this directory might (for example) be /usr/local/share/regina/data/census
.
|
overridevirtual |
Called when characters are encountered.
s | the characters encountered. |
Reimplemented from regina::xml::XMLParserCallback.
|
inline |
Returns the characters stored in the XML element that has been read.
|
inlinestatic |
Returns the directory containing miscellaneous data files for internal use Regina's calculation engine.
This is computed automatically as a subdirectory of home().
On a typical GNU/Linux system, this directory might (for example) be /usr/local/share/regina/data
.
|
overridevirtual |
Called when the document is finalised.
Reimplemented from regina::xml::XMLParserCallback.
|
overridevirtual |
Called when an element's closing tag is encountered.
This is called immediately after start_element() if the opening tag is in <tag/>
format.
n | the name of the tag. |
Reimplemented from regina::xml::XMLParserCallback.
|
inlinevirtual |
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.
|
inlinevirtual |
Signifies that parsing has finished for a subelement of this XML element.
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 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.
|
inline |
Returns the version of the calculation engine that wrote this file.
|
inlinestatic |
Returns the directory in which API documentation for Regina's calculation engine is installed.
This is computed automatically as a subdirectory of home().
On a typical GNU/Linux system, this directory might (for example) be /usr/local/share/regina/engine-docs
.
|
overridevirtual |
Called when a parser error occurs.
s | the error message. |
Reimplemented from regina::xml::XMLParserCallback.
|
inlinestatic |
Returns the directory in which example data files (including the smaller but human-browsable census data files) are installed.
This is computed automatically as a subdirectory of home().
On a typical GNU/Linux system, this directory might (for example) be /usr/local/share/regina/examples
.
|
overridevirtual |
Called when a parser fatal error occurs.
s | the error message. |
Reimplemented from regina::xml::XMLParserCallback.
|
default |
Creates a new copy of the given file information.
cloneMe | the file information to clone. |
|
inlinestatic |
Returns Regina's primary home directory on the system.
This directory should contains subdirectories data, icons/, examples/ and so on.
On a typical GNU/Linux system, this directory might (for example) be /usr/local/share/regina
.
|
static |
Return information about the given Regina data file.
idPathname | the pathname of the data file to be examined. |
|
inlinevirtual |
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.
chars | the initial text for this element. |
Reimplemented in regina::XMLCharsReader, regina::detail::XMLSimplexReader< dim >, regina::XMLNormalSurfaceReader, regina::XMLLinkCrossingsReader, regina::XMLNormalHypersurfaceReader, regina::XMLAngleStructureReader, regina::XMLAbelianGroupReader, regina::XMLLinkComponentsReader, and regina::XMLLinkConnectionsReader.
|
inlineoverridevirtual |
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.
chars | the initial text for this element. |
Reimplemented from regina::XMLElementReader.
|
inline |
Returns whether this file is stored in compressed format.
Currently this option only applies to XML data files.
true
if this file is compressed or false
otherwise.
|
inline |
Returns whether the file metadata could not be read.
true
if the metadata could not be read, false
otherwise. Sets this to be a copy of the given file information.
cloneMe | the file information to clone. |
|
inline |
Returns the pathname of the data file being described.
|
inlinestatic |
Returns the directory in which optional "helper" Python libraries are installed.
These libraries are not a formal part of Regina, but can be made to load automatically as extra user libraries through Regina's python settings.
On a typical GNU/Linux system, this directory might (for example) be /usr/local/share/regina/pylib
.
|
inlinestatic |
Returns the directory in which Regina's python module is installed, or the empty string if the module is installed in python's standard site-packages directory.
|
static |
Tells Regina where data files are installed.
You must call this at runtime if Regina is not installed in the location that was configured by cmake at build time (e.g., if you are running a MacOSX app bundle).
Empty strings are treated as follows:
homeDir | Regina's primary home directory; this will be returned by homeDir(). |
pythonModuleDir | the directory containing Regina's python module, or the empty string if the module has been installed in python's standard site-packages directory; this will be returned by pythonModule(). |
censusDir | The directory containing the large machine-encoded census data files; this will be returned by census(). |
|
overridevirtual |
Called at the start of the document.
parser | the XML parser that is currently parsing this document. |
Reimplemented from regina::xml::XMLParserCallback.
|
overridevirtual |
Called when an element's opening tag is encountered.
n | the name of the tag. |
p | a dictionary of all the properties of the tag. |
Reimplemented from regina::xml::XMLParserCallback.
|
inlinevirtual |
Signifies that parsing of this XML element is beginning.
The default implementation does nothing.
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::XMLNormalSurfaceReader, regina::XMLNormalHypersurfaceReader, regina::XMLAngleStructureReader, regina::XMLGroupPresentationReader, regina::XMLAbelianGroupReader, regina::detail::XMLSimplicesReader< dim >, regina::detail::XMLSimplexReader< dim >, regina::XMLLinkCrossingsReader, and regina::XMLLinkComponentsReader.
|
inlinevirtual |
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.
subTagName | the name of the subelement opening tag. |
subTagProps | the properties associated with the subelement opening tag. |
Reimplemented in regina::XMLNormalSurfaceReader, regina::XMLPacketReader, regina::XMLNormalHypersurfaceReader, regina::XMLAngleStructureReader, regina::XMLGroupPresentationReader, regina::detail::XMLTriangulationReaderBase< dim >::GroupPresentationPropertyReader, regina::detail::XMLTriangulationReaderBase< dim >::AbelianGroupPropertyReader, and regina::detail::XMLSimplicesReader< dim >.
|
inline |
Returns the state that this callback object is currently in.
The returned value will be one of the state constants defined in this class.
|
inline |
Returns the type of data file.
The type will be given as one of the file type constants defined in this class.
|
inline |
Returns a human-readable description of the type of data file.
|
inlinevirtual |
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.
parser | the current XML parser. |
|
overridevirtual |
Called when a parser warning occurs.
s | the warning message. |
Reimplemented from regina::xml::XMLParserCallback.
void regina::FileInfo::writeTextLong | ( | std::ostream & | out | ) | const |
Writes a detailed text representation of this object to the given output stream.
out | the output stream to which to write. |
void regina::FileInfo::writeTextShort | ( | std::ostream & | out | ) | const |
Writes a short text representation of this object to the given output stream.
out | the output stream to which to write. |
|
inline |
Creates a new callback object.
newTopReader | the element reader to use for the top-level XML element. This is the only element reader that will not be destroyed once parsing has finished. |
newErrStream | the output stream to which any warning or error messages should be sent. |
|
inline |
Creates a new XML element reader.
|
inline |
Creates a new element reader.
|
virtual |
Destroys this callback object.
Any element reader (aside from the top-level reader) that has not yet been destroyed will have abort() called upon it and will be destroyed at this point.
|
inlinevirtual |
Destroys this element reader.
The default implementation does nothing.
|
static |
Signifies that XML processing was aborted.
|
static |
Signifies that processing of all XML elements has finished.
|
static |
Represents a new-style XML data file.
|
static |
Signifies that the top-level XML element has not yet been seen.
|
static |
Signifies that XML elements are currently being processed.