Reader of binary files. More...
#include <MEDMEM_EnsightUtils.hxx>
Public Member Functions | |
| _BinaryFileReader (const string &fileName) throw (MEDEXCEPTION) | |
| Constructor of _BinaryFileReader opens its file. | |
| ~_BinaryFileReader () | |
| Destructor of _BinaryFileWriter closes its file. | |
| void | rewind () |
| rewind the file backward | |
| void | swapBytes () |
| int | moreValuesAvailable () const |
| size of not read file portion in sizeof(int) | |
| bool | eof () |
| Return true if the whole file has been read. | |
| void | skip (int size) throw (MEDEXCEPTION) |
| Skips given nb of bytes. | |
| void | skipTimeStepBeginning () throw (MEDEXCEPTION) |
| Read lines until TIME_STEP_BEG encounters. | |
| char * | getLine () throw (MEDEXCEPTION) |
| int * | getInt (int nb) throw (MEDEXCEPTION) |
| float * | getFlt (int nb) throw (MEDEXCEPTION) |
| ssize_t | getPosition () const |
| template<class T > | |
| char * | convertReals (const int nbValues, const char *undefValue=0, set< int > *undefIndices=0, const vector< int > *partialIndices=0, const int nbPartialComponents=0) throw (MEDEXCEPTION) |
Private Member Functions | |
| template<typename T > | |
| T * | get (int nb, bool inverseBytes=false) |
Private Attributes | |
| int | _file |
| descriptor | |
| MEDEXCEPTION | _exception |
| ready to raise exception | |
| ssize_t | _pos |
| ssize_t | _maxPos |
| current position and end position | |
| bool | _mySwapBytes |
| to swap bytes | |
Reader of binary files.
| MEDMEM_ENSIGHT._BinaryFileReader::_BinaryFileReader | ( | const string & | fileName | ) | throw (MEDEXCEPTION) |
Constructor of _BinaryFileReader opens its file.
References Med_Gen_test.fileName.
| MEDMEM_ENSIGHT._BinaryFileReader::~_BinaryFileReader | ( | ) |
Destructor of _BinaryFileWriter closes its file.
References MEDMEM_ENSIGHT._BinaryFileReader._file.
| void MEDMEM_ENSIGHT._BinaryFileReader::rewind | ( | ) |
rewind the file backward
References MEDMEM_ENSIGHT._BinaryFileReader._file, and MEDMEM_ENSIGHT._BinaryFileReader._pos.
| void MEDMEM_ENSIGHT._BinaryFileReader.swapBytes | ( | ) |
| int MEDMEM_ENSIGHT._BinaryFileReader::moreValuesAvailable | ( | ) | const |
size of not read file portion in sizeof(int)
References MEDMEM_ENSIGHT._BinaryFileReader._maxPos, and MEDMEM_ENSIGHT._BinaryFileReader._pos.
| bool MEDMEM_ENSIGHT._BinaryFileReader::eof | ( | ) |
Return true if the whole file has been read.
References MEDMEM_ENSIGHT._BinaryFileReader._maxPos, and MEDMEM_ENSIGHT._BinaryFileReader._pos.
| void MEDMEM_ENSIGHT._BinaryFileReader::skip | ( | int | size | ) | throw (MEDEXCEPTION) |
Skips given nb of bytes.
References test_NonCoincidentDEC.size.
| void MEDMEM_ENSIGHT._BinaryFileReader::skipTimeStepBeginning | ( | ) | throw (MEDEXCEPTION) |
Read lines until TIME_STEP_BEG encounters.
References MEDMEM_ENSIGHT._BinaryFileReader.getLine(), MEDMEM_ENSIGHT.TIME_STEP_BEG, and MEDMEM_ENSIGHT.TIME_STEP_BEG_LEN.
| char* MEDMEM_ENSIGHT._BinaryFileReader.getLine | ( | ) | throw (MEDEXCEPTION) |
| int* MEDMEM_ENSIGHT._BinaryFileReader.getInt | ( | int | nb | ) | throw (MEDEXCEPTION) |
| float* MEDMEM_ENSIGHT._BinaryFileReader.getFlt | ( | int | nb | ) | throw (MEDEXCEPTION) |
| ssize_t MEDMEM_ENSIGHT._BinaryFileReader.getPosition | ( | ) | const |
| char* MEDMEM_ENSIGHT._BinaryFileReader.convertReals | ( | const int | nbValues, |
| const char * | undefValue = 0, |
||
| set< int > * | undefIndices = 0, |
||
| const vector< int > * | partialIndices = 0, |
||
| const int | nbPartialComponents = 0 |
||
| ) | throw (MEDEXCEPTION) |
References batchmode_medcorba_test.value.
| T* MEDMEM_ENSIGHT._BinaryFileReader.get | ( | int | nb, |
| bool | inverseBytes = false |
||
| ) | [private] |
References MEDMEM.swapBytes().
int MEDMEM_ENSIGHT._BinaryFileReader._file [private] |
descriptor
ready to raise exception
ssize_t MEDMEM_ENSIGHT._BinaryFileReader._pos [private] |
ssize_t MEDMEM_ENSIGHT._BinaryFileReader._maxPos [private] |
current position and end position
bool MEDMEM_ENSIGHT._BinaryFileReader._mySwapBytes [private] |
to swap bytes
read any data from file