Regina Calculation Engine
|
Stores information about a Regina data file, including file type and version. More...
#include <file/nfileinfo.h>
Public Member Functions | |
const std::string & | getPathname () const |
Returns the pathname of the data file being described. More... | |
int | getType () const |
Returns the type of data file. More... | |
const std::string & | getTypeDescription () const |
Returns a human-readable description of the type of data file. More... | |
const std::string & | getEngine () const |
Returns the version of the calculation engine that wrote this file. More... | |
bool | isCompressed () const |
Returns whether this file is stored in compressed format. More... | |
bool | isInvalid () const |
Returns whether the file metadata could not be read. More... | |
void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. More... | |
void | writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. More... | |
Input and Output | |
std::string | str () const |
Returns the output from writeTextShort() as a string. More... | |
std::string | toString () const |
A deprecated alias for str(), which returns the output from writeTextShort() as a string. More... | |
std::string | detail () const |
Returns the output from writeTextLong() as a string. More... | |
std::string | toStringLong () const |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string. More... | |
Static Public Member Functions | |
static NFileInfo * | identify (const std::string &idPathname) |
Return information about the given Regina data file. More... | |
Static Public Attributes | |
static const int | TYPE_XML |
Represents a new-style XML data file. More... | |
Stores information about a Regina data file, including file type and version.
Routine identify() can be used to determine this information for a given file.
As of Regina 4.94, the old-style binary files are no longer supported. These have not been in use for over a decade. The only file type that this class now recognises is TYPE_XML (compressed or uncompressed XML data files).
|
inherited |
Returns the output from writeTextLong() as a string.
|
inline |
Returns the version of the calculation engine that wrote this file.
|
inline |
Returns the pathname of the data file being described.
|
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.
|
static |
Return information about the given Regina data file.
idPathname | the pathname of the data file to be examined. |
|
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.
|
inherited |
Returns the output from writeTextShort() as a string.
__str__()
function.
|
inlineinherited |
A deprecated alias for str(), which returns the output from writeTextShort() as a string.
|
inlineinherited |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string.
|
virtual |
Writes this object in long text format to the given output stream.
The output should provide the user with all the information they could want. The output should be human-readable, should not contain extremely long lines (so users can read the output in a terminal), and should end with a final newline.
The default implementation of this routine merely calls writeTextShort() and adds a newline.
out | the output stream to which to write. |
Reimplemented from regina::ShareableObject.
|
virtual |
Writes this object in short text format to the given output stream.
The output should be human-readable, should fit on a single line, and should not end with a newline.
out | the output stream to which to write. |
Implements regina::ShareableObject.
|
static |
Represents a new-style XML data file.