Classes | |
class | NFile |
Represents an old-style binary file containing a packet tree. More... | |
class | NFileInfo |
Stores information about a Regina data file, including file type and version. More... | |
class | NFilePropertyReader |
Assists with reading individual object properties from old-style binary data files. More... | |
class | NRandomAccessResource |
Provides a standard random access interface for old-style binary file-like resources. More... | |
class | NLocalFileResource |
A random access resource that is simply a local file. More... | |
class | NXMLCallback |
Provides the callbacks for an XMLParser required to parse an entire file using a series of NXMLElementReader objects. More... | |
class | NXMLElementReader |
Used to read the contents of a single XML element. More... | |
class | NXMLCharsReader |
A reader for an XML element that contains only characters. More... | |
Defines | |
#define | NFILE_PROGRAM_NAME "Regina" |
String name of the program, to be placed at the beginning of data files. | |
#define | NFILE_SIZE_INT 4 |
The number of bytes written to files to represent an integer; any higher order bytes will be ignored. | |
#define | NFILE_SIZE_LONG 8 |
The number of bytes written to files to represent a long integer; any higher order bytes will be ignored. | |
#define | NFILE_SIZE_FILEPOS 8 |
The number of bytes written to files to represent a file position; any higher order bytes will be ignored. | |
Functions | |
NPacket * | regina::readFromFile (const char *fileName) |
Reads a packet tree from the given old-style binary file doing everything in a single step. | |
bool | regina::writeToFile (const char *fileName, NPacket *packet) |
Writes the given packet tree to the given old-style binary file doing everything in a single step. | |
bool | regina::writeXMLFile (const char *fileName, NPacket *subtree, bool compressed=true) |
Writes the subtree with the given packet as matriarch to disk as a complete XML file. | |
NPacket * | regina::readXMLFile (const char *fileName) |
Reads the packet tree stored in the given XML file. | |
NPacket * | regina::readFileMagic (const std::string &fileName) |
Reads a packet tree from a file whose format is unknown. |
|
String name of the program, to be placed at the beginning of data files.
|
|
The number of bytes written to files to represent a file position; any higher order bytes will be ignored. This ensures constancy of file format across platforms. |
|
The number of bytes written to files to represent an integer; any higher order bytes will be ignored. This ensures constancy of file format across platforms. |
|
The number of bytes written to files to represent a long integer; any higher order bytes will be ignored. This ensures constancy of file format across platforms. |
|
Reads a packet tree from a file whose format is unknown. The file may be in either XML (optionally compressed) or old-style binary format. If the matriarch of the packet tree could not be read, this routine will return 0. If a lower-level packet could not be read, it (and its descendants) will simply be ignored. The given file will almost certainly be opened and closed multiple times during this routine.
|
|
Reads a packet tree from the given old-style binary file doing everything in a single step. This routine reads the complete packet tree from the given file. If the highest level packet could not be read, this routine will return null. The behaviour regarding problematic subpackets is identical to that of NFile::readPacketTree().
|
|
Reads the packet tree stored in the given XML file. It does not matter whether the XML file is compressed. If the matriarch of the packet tree could not be read, this routine will return 0. If a lower-level packet could not be read, it (and its descendants) will simply be ignored.
|
|
Writes the given packet tree to the given old-style binary file doing everything in a single step.
|
|
Writes the subtree with the given packet as matriarch to disk as a complete XML file. The XML file may be optionally compressed. This is the preferred way of writing a packet tree to file.
|