Regina Calculation Engine
Public Member Functions
regina::NFilePropertyReader Class Reference

Assists with reading individual object properties from old-style binary data files. More...

#include <nfilepropertyreader.h>

Inheritance diagram for regina::NFilePropertyReader:
regina::NAngleStructure regina::NAngleStructureList regina::NNormalSurface regina::NScript regina::NSurfaceFilter regina::NTriangulation regina::NSurfaceFilterCombination regina::NSurfaceFilterProperties

List of all members.

Public Member Functions

virtual ~NFilePropertyReader ()
 Default destructor that does nothing.
virtual void readIndividualProperty (NFile &infile, unsigned propType)=0
 Reads an individual property from an old-style binary file.

Detailed Description

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.

Deprecated:
This class is only for use with old-style binary data files. New-style XML data files should simply bundle object properties in with the standard XML read/write routines.
Python:
Not present.

Constructor & Destructor Documentation

regina::NFilePropertyReader::~NFilePropertyReader ( ) [inline, virtual]

Default destructor that does nothing.


Member Function Documentation

virtual void regina::NFilePropertyReader::readIndividualProperty ( NFile infile,
unsigned  propType 
) [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).

Parameters:
infilethe 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.
propTypethe property type of the property about to be read.

Implemented in regina::NAngleStructure, regina::NAngleStructureList, regina::NScript, regina::NNormalSurface, regina::NSurfaceFilter, regina::NSurfaceFilterProperties, and regina::NTriangulation.


The documentation for this class was generated from the following file:

Copyright © 1999-2009, Ben Burton
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).