Regina Calculation Engine
|
Assists with reading individual object properties from old-style binary data files. More...
#include <file/nfilepropertyreader.h>
Public Member Functions | |
virtual | ~NFilePropertyReader () |
Default destructor that does nothing. More... | |
virtual void | readIndividualProperty (NFile &infile, unsigned propType)=0 |
Reads an individual property from an old-style binary file. More... | |
Assists with reading individual object properties from old-style binary data files.
The mechanics of reading and writing properties of objects are described in the notes for NFilePropertyReader::readIndividualProperty() and NFile::writePropertyHeader() respectively.
Each property that can be stored on file for a particular type of object has an integer identifier called the property type. Property types must be strictly positive, and must be unique for each type of object that can store properties.
|
inlinevirtual |
Default destructor that does nothing.
|
pure virtual |
Reads an individual property from an old-style binary file.
The property type and bookmarking details should not read; merely the contents of the property that are written to file between NFile::writePropertyHeader() and NFile::writePropertyFooter(). See the NFile::writePropertyHeader() notes for details.
The property type of the property to be read will be passed in propType. If the property type is unrecognised, this routine should simply do nothing and return. If the property type is recognised, this routine should read the property and process it accordingly (e.g., store it in whatever data object is currently being read).
infile | the file from which to read the property. This should be open for reading and at the position immediately after writePropertyHeader() would have been called during the corresponding write operation. |
propType | the property type of the property about to be read. |
Implemented in regina::NNormalSurface, regina::NAngleStructure, regina::NSurfaceFilter, regina::NAngleStructureList, regina::NTriangulation, regina::NScript, and regina::NSurfaceFilterProperties.