GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmFileReader Class Referenceabstract

Basic interface for file deserializers. More...

#include <gmFileReader.h>

Inheritance diagram for GmFileReader:
Collaboration diagram for GmFileReader:

Public Member Functions

 GmFileReader (const GmLogCategory &logger)
 Constructor. Receives as parameter the logger used to report errors.
 
virtual ~GmFileReader ()
 Destructor. Should call closeFiles() on derived classes.
 
virtual bool openFiles (QString fileName, int numNodeValues, int numElemValues)=0
 
virtual bool initializeMesh (GmMesh *mesh, const QStringList &nodeValues, const QList< Unit > &nodeUnits, const QStringList &elementValues, const QList< Unit > &elementUnits)=0
 Initialize the mesh structure.
 
virtual bool readNodeCoordinates (GmMesh *mesh, Unit coordUnit)=0
 Reads mesh node coordinates in the file and fill the mesh structure. Returns false on errors.
 
virtual bool readCellGeometry (GmCellMesh *cellmesh)=0
 Reads cell geometry in the file and fill the mesh structure. Returns false on errors.
 
virtual bool readNodeData (GmMesh *mesh, const QStringList &nodeValues, const QList< Unit > &nodeUnits)=0
 Reads node data from the file. Returns false on errors.
 
virtual bool readCellData (GmCellMesh *cellmesh, const QStringList &elementValues, const QList< Unit > &elementUnits)=0
 Reads cell data from the file. Returns false on errors.
 
virtual bool closeFiles ()=0
 Closes the set of files opened by a call to openFiles(). Will be called automatically by the destructor (so may be called with a closed file).
 
virtual GmFileFormatfileFormat ()=0
 Returns the file format of the deserializer.
 

Protected Attributes

const GmLogCategory_logger
 The logger used to report errors.
 

Detailed Description

Basic interface for file deserializers.

Member Function Documentation

◆ closeFiles()

virtual bool GmFileReader::closeFiles ( )
pure virtual

Closes the set of files opened by a call to openFiles(). Will be called automatically by the destructor (so may be called with a closed file).

Implemented in GmNfFileReader.

◆ fileFormat()

virtual GmFileFormat * GmFileReader::fileFormat ( )
pure virtual

Returns the file format of the deserializer.

Implemented in GmNfFileReader.

◆ initializeMesh()

virtual bool GmFileReader::initializeMesh ( GmMesh * mesh,
const QStringList & nodeValues,
const QList< Unit > & nodeUnits,
const QStringList & elementValues,
const QList< Unit > & elementUnits )
pure virtual

Initialize the mesh structure.

Implemented in GmNfFileReader.

◆ openFiles()

virtual bool GmFileReader::openFiles ( QString fileName,
int numNodeValues,
int numElemValues )
pure virtual

Implemented in GmNfFileReader.

◆ readCellData()

virtual bool GmFileReader::readCellData ( GmCellMesh * cellmesh,
const QStringList & elementValues,
const QList< Unit > & elementUnits )
pure virtual

Reads cell data from the file. Returns false on errors.

Implemented in GmNfFileReader.

◆ readCellGeometry()

virtual bool GmFileReader::readCellGeometry ( GmCellMesh * cellmesh)
pure virtual

Reads cell geometry in the file and fill the mesh structure. Returns false on errors.

Implemented in GmNfFileReader.

◆ readNodeCoordinates()

virtual bool GmFileReader::readNodeCoordinates ( GmMesh * mesh,
Unit coordUnit )
pure virtual

Reads mesh node coordinates in the file and fill the mesh structure. Returns false on errors.

Implemented in GmNfFileReader.

◆ readNodeData()

virtual bool GmFileReader::readNodeData ( GmMesh * mesh,
const QStringList & nodeValues,
const QList< Unit > & nodeUnits )
pure virtual

Reads node data from the file. Returns false on errors.

Implemented in GmNfFileReader.


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