Version: 5.1.6

MEDMEM_ENSIGHT._BinaryFileWriter Class Reference

Writer of binary files. More...

#include <MEDMEM_EnsightUtils.hxx>

Data Structures

class  _RealData
 Container of temporary data converting any data to floats. More...

Public Member Functions

 _BinaryFileWriter (const string &fileName) throw (MEDEXCEPTION)
 Constructor of _BinaryFileWriter opens its file.
 ~_BinaryFileWriter ()
 write a string
void addString (const char *str) throw (MEDEXCEPTION)
 write a string
void addString (const string &str) throw (MEDEXCEPTION)
 write an integer value
void addInt (const int value) throw (MEDEXCEPTION)
 write integer values
void addInt (const int *data, int nbValues) throw (MEDEXCEPTION)
 write integer values
void addInt (const vector< int > &data) throw (MEDEXCEPTION)
 write any data as floats
template<typename T >
void addReal (const T *data, int nbValues) throw (MEDEXCEPTION)
 write any data as floats
template<class TValueIterator >
void addReal (vector< TValueIterator > &componentIt, const int nbValues, const medModeSwitch interlace) throw (MEDEXCEPTION)
template<typename T >
void add (const T *data, int nbValues) throw (MEDEXCEPTION)

Data Fields

int _file
 descriptor
MEDEXCEPTION _exception
 ready to raise exception

Detailed Description

Writer of binary files.


Constructor & Destructor Documentation

MEDMEM_ENSIGHT._BinaryFileWriter::_BinaryFileWriter ( const string &  fileName  )  throw (MEDEXCEPTION)

Constructor of _BinaryFileWriter opens its file.

References Med_Gen_test.fileName.

MEDMEM_ENSIGHT._BinaryFileWriter::~_BinaryFileWriter (  ) 

write a string

Destructor of _BinaryFileWriter closes its file.

References MEDMEM_ENSIGHT._BinaryFileWriter._file.


Member Function Documentation

void MEDMEM_ENSIGHT._BinaryFileWriter::addString ( const char *  str  )  throw (MEDEXCEPTION)

write a string

Write string.

References LOCALIZED, and MEDMEM_ENSIGHT.MAX_LINE_LENGTH.

void MEDMEM_ENSIGHT._BinaryFileWriter.addString ( const string &  str  )  throw (MEDEXCEPTION)

write an integer value

References MEDMEM_ENSIGHT._BinaryFileWriter.addString().

void MEDMEM_ENSIGHT._BinaryFileWriter.addInt ( const int  value  )  throw (MEDEXCEPTION)
void MEDMEM_ENSIGHT._BinaryFileWriter.addInt ( const int data,
int  nbValues 
) throw (MEDEXCEPTION)

write integer values

References MEDMEM_ENSIGHT._BinaryFileWriter.add().

void MEDMEM_ENSIGHT._BinaryFileWriter.addInt ( const vector< int > &  data  )  throw (MEDEXCEPTION)

write any data as floats

References MEDMEM_ENSIGHT._BinaryFileWriter.add().

template<typename T >
void MEDMEM_ENSIGHT._BinaryFileWriter.addReal ( const T *  data,
int  nbValues 
) throw (MEDEXCEPTION)
template<class TValueIterator >
void MEDMEM_ENSIGHT._BinaryFileWriter.addReal ( vector< TValueIterator > &  componentIt,
const int  nbValues,
const medModeSwitch  interlace 
) throw (MEDEXCEPTION)
template<typename T >
void MEDMEM_ENSIGHT._BinaryFileWriter.add ( const T *  data,
int  nbValues 
) throw (MEDEXCEPTION)

Field Documentation

descriptor

ready to raise exception

write any data to file