Version: 6.3.1
Data Structures | Public Member Functions | Private Attributes

MEDMEM.MEDFILEBROWSER Class Reference

Class giving access to names of meshes and fields contained in the med file. More...

#include <MEDMEM_MedFileBrowser.hxx>

Data Structures

struct  FIELD_DATA_

Public Member Functions

 MEDFILEBROWSER ()
 Constructor of an empty MEDFILEBROWSER to be filled with readFileStruct()
 MEDFILEBROWSER (const std::string &fileName) throw (MEDEXCEPTION)
 This constructor constructs the MEDFILEBROWSER object from the file filename. Names of meshes and fields are read.
void readFileStruct (const std::string &fileName) throw (MEDEXCEPTION)
 Read names of meshes and fields from the file fileName.
std::string getFileName () const
 Returns the name of a browsed file.
int getNumberOfMeshes (void) const
 Gets the number of meshes in med file.
int getNumberOfFields (void) const
 Gets the number of fields in med file.
void getMeshNames (std::string *meshNames) const
 Gets the names of all meshes.
void getFieldNames (std::string *fieldNames) const
 Gets the names of all fields.
std::vector< std::string > getMeshNames () const
 Gets the names of all MESH objects.
std::vector< std::string > getFieldNames () const
 Gets the names of all fields.
bool isStructuredMesh (const std::string &meshName) const throw (MEDEXCEPTION)
 Return true if mesh meshName is a structured one.
MED_EN::med_type_champ getFieldType (const std::string &fieldName) const throw (MEDEXCEPTION)
 Return type of values of FIELD named fieldName.
std::string getMeshName (const std::string &fieldName) const throw (MEDEXCEPTION)
 Return name of mesh supporting the FIELD named fieldName.
VEC_DT_IT_ getFieldIteration (const std::string &fieldName) const throw (MEDEXCEPTION)
 Returns a vector<DT_IT_> which contain all iteration step for the FIELD identified by its name.

Private Attributes

std::string _fileName
std::map< std::string, bool > _meshes
 mesh name and isStructured flag
std::map< std::string,
FIELD_DATA_
_fields
 field name and its type and "dtit"

Detailed Description

Class giving access to names of meshes and fields contained in the med file.


Constructor & Destructor Documentation

MEDFILEBROWSER::MEDFILEBROWSER ( )

Constructor of an empty MEDFILEBROWSER to be filled with readFileStruct()

MEDFILEBROWSER::MEDFILEBROWSER ( const std::string &  fileName) throw (MEDEXCEPTION)

This constructor constructs the MEDFILEBROWSER object from the file filename. Names of meshes and fields are read.

References Med_Gen_test.fileName.


Member Function Documentation

void MEDFILEBROWSER::readFileStruct ( const std::string &  fileName) throw (MEDEXCEPTION)
std::string MEDFILEBROWSER::getFileName ( ) const

Returns the name of a browsed file.

int MEDFILEBROWSER::getNumberOfMeshes ( void  ) const

Gets the number of meshes in med file.

int MEDFILEBROWSER::getNumberOfFields ( void  ) const

Gets the number of fields in med file.

void MEDFILEBROWSER::getMeshNames ( std::string *  meshNames) const

Gets the names of all meshes.

meshNames is an in/out argument.

It is a string array of size the number of meshes. It must be allocated before calling this method. All names are put in it.

void MEDFILEBROWSER::getFieldNames ( std::string *  fieldNames) const

Gets the names of all fields.

fieldNames is an in/out argument.

It is an array of string of size the number of fields. It must be allocated before calling this method. All names are put in it.

vector< string > MEDFILEBROWSER::getMeshNames ( ) const

Gets the names of all MESH objects.

Returns a vector<string> object which contain the name of all MESH objects.

References Med_Gen_test.meshNames.

vector< string > MEDFILEBROWSER::getFieldNames ( ) const

Gets the names of all fields.

References Med_Gen_test.fieldNames.

bool MEDFILEBROWSER::isStructuredMesh ( const std::string &  meshName) const throw (MEDEXCEPTION)

Return true if mesh meshName is a structured one.

References LOCALIZED, and Med_Gen_test.meshName.

med_type_champ MEDFILEBROWSER::getFieldType ( const std::string &  fieldName) const throw (MEDEXCEPTION)

Return type of values of FIELD named fieldName.

References Med_Gen_test.fieldName, and LOCALIZED.

std::string MEDFILEBROWSER::getMeshName ( const std::string &  fieldName) const throw (MEDEXCEPTION)

Return name of mesh supporting the FIELD named fieldName.

References Med_Gen_test.fieldName, and LOCALIZED.

vector< DT_IT_ > MEDFILEBROWSER::getFieldIteration ( const std::string &  fieldName) const throw (MEDEXCEPTION)

Returns a vector<DT_IT_> which contain all iteration step for the FIELD identified by its name.

DT_IT_ definition is

typedef struct { int dt; int it; } DT_IT_;

dt represents the time iteration number, while it represents the inner iteration number.

References Med_Gen_test.fieldName, and LOCALIZED.


Field Documentation

std::string MEDMEM.MEDFILEBROWSER._fileName [private]
std::map< std::string, bool > MEDMEM.MEDFILEBROWSER._meshes [private]

mesh name and isStructured flag

std::map< std::string, FIELD_DATA_ > MEDMEM.MEDFILEBROWSER._fields [private]

field name and its type and "dtit"

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS