Version: 8.3.0
DriverGMF_Read Class Reference

Driver reading a mesh from the GMF file. More...

#include <DriverGMF_Read.hxx>

Inheritance diagram for DriverGMF_Read:

Public Types

enum  Status {
  DRS_OK, DRS_EMPTY, DRS_WARN_RENUMBER, DRS_WARN_SKIP_ELEM,
  DRS_WARN_DESCENDING, DRS_FAIL
}
 

Public Member Functions

 DriverGMF_Read ()
 
 ~DriverGMF_Read ()
 
void SetMakeRequiredGroups (bool theMakeRequiredGroups)
 
virtual Status Perform ()
 Read a GMF file. More...
 
void SetMesh (SMESHDS_Mesh *theMesh)
 
void SetMeshId (int theMeshId)
 
virtual void SetFile (const std::string &theFileName)
 
virtual void SetMeshName (const std::string &theMeshName)
 
virtual std::string GetMeshName () const
 
virtual void SetOption (const std::string &optionName, const std::string &optionValue)
 
virtual SMESH_ComputeErrorPtr GetError ()
 Return a structure containing description of errors. More...
 

Protected Member Functions

Status addMessage (const std::string &msg, const bool isFatal=false)
 Stores an error message. More...
 

Protected Attributes

SMESHDS_MeshmyMesh
 
std::string myFile
 
std::string myMeshName
 
int myMeshId
 
std::vector< std::string > myErrorMessages
 
Status myStatus
 

Private Member Functions

Status storeBadNodeIds (const char *gmfKwd, int elemNb, int nb,...)
 Store a message about invalid IDs of nodes. More...
 

Private Attributes

bool _makeRequiredGroups
 

Detailed Description

Driver reading a mesh from the GMF file.

The mesh to read is selected by an index (counted form 0) set via SetMeshId()

Member Enumeration Documentation

enum Driver_Mesh::Status
inherited
Enumerator
DRS_OK 
DRS_EMPTY 
DRS_WARN_RENUMBER 
DRS_WARN_SKIP_ELEM 
DRS_WARN_DESCENDING 
DRS_FAIL 

Constructor & Destructor Documentation

DriverGMF_Read::DriverGMF_Read ( )
DriverGMF_Read::~DriverGMF_Read ( )

Member Function Documentation

Driver_Mesh::Status Driver_Mesh::addMessage ( const std::string &  msg,
const bool  isFatal = false 
)
protectedinherited

Stores an error message.

We consider an error fatal if none mesh can be read

References Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_WARN_SKIP_ELEM, MESSAGE, Driver_Mesh::myErrorMessages, and Driver_Mesh::myStatus.

Referenced by DriverGMF_Write::Perform(), Perform(), DriverMED_W_Field::Perform(), and storeBadNodeIds().

SMESH_ComputeErrorPtr Driver_Mesh::GetError ( )
virtualinherited
std::string Driver_Mesh::GetMeshName ( ) const
virtualinherited
void DriverGMF_Read::SetMakeRequiredGroups ( bool  theMakeRequiredGroups)

Referenced by SMESH_Mesh::GMFToMesh().

void Driver_Mesh::SetMeshName ( const std::string &  theMeshName)
virtualinherited
virtual void Driver_Mesh::SetOption ( const std::string &  optionName,
const std::string &  optionValue 
)
virtualinherited
Driver_Mesh::Status DriverGMF_Read::storeBadNodeIds ( const char *  gmfKwd,
int  elemNb,
int  nb,
  ... 
)
private

Store a message about invalid IDs of nodes.

References Driver_Mesh::addMessage(), Driver_Mesh::DRS_OK, SMDS_Mesh::FindNode(), Driver_SMESHDS_Mesh::myMesh, and Driver_Mesh::myStatus.

Referenced by Perform().

Field Documentation

bool DriverGMF_Read::_makeRequiredGroups
private

Referenced by Perform().

std::vector< std::string > Driver_Mesh::myErrorMessages
protectedinherited
int Driver_Mesh::myMeshId
protectedinherited
std::string Driver_Mesh::myMeshName
protectedinherited
Status Driver_Mesh::myStatus
protectedinherited