Back to index

salome-med  6.5.0
Public Member Functions | Private Attributes
MEDMEM_ENSIGHT::_BinaryFileWriter::_RealData Class Reference

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

Collaboration diagram for MEDMEM_ENSIGHT::_BinaryFileWriter::_RealData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const float * values ()
 < return pointer to float array
template<typename T >
 _RealData (const T *data, int nbValues)
 convert nbValues to floats in given interlace
template<class TValueIterator >
 _RealData (vector< TValueIterator > &componentIt, const int nbValues, const medModeSwitch interlace)

Private Attributes

PointerOf< float > _floatData

Detailed Description

Container of temporary data converting any data to floats.

Definition at line 890 of file MEDMEM_EnsightUtils.hxx.


Constructor & Destructor Documentation

template<typename T >
MEDMEM_ENSIGHT::_BinaryFileWriter::_RealData::_RealData ( const T *  data,
int  nbValues 
) [inline]

convert nbValues to floats in given interlace

Definition at line 898 of file MEDMEM_EnsightUtils.hxx.

Here is the call graph for this function:

template<class TValueIterator >
MEDMEM_ENSIGHT::_BinaryFileWriter::_RealData::_RealData ( vector< TValueIterator > &  componentIt,
const int  nbValues,
const medModeSwitch  interlace 
) [inline]

Definition at line 913 of file MEDMEM_EnsightUtils.hxx.

    {
      int nbComponents = componentIt.size();
      _floatData.set(nbValues * nbComponents);
      float* floatPtr = _floatData;
      if ( interlace == MED_FULL_INTERLACE && nbComponents > 1 ) {
        for ( int i = 0; i < nbValues; ++i )
          for ( int j = 0; j < nbComponents; ++j )
            *floatPtr++ = _toFloat( componentIt[ j ].next() );
      }
      else {
        for ( int j = 0; j < nbComponents; ++j ) {
          TValueIterator & values = componentIt[ j ];
          for ( int i = 0; i < nbValues; ++i )
            *floatPtr++ = _toFloat( values.next() );
        }
      } 
    }

Here is the call graph for this function:


Member Function Documentation

< return pointer to float array

convert nbValues to floats

Definition at line 894 of file MEDMEM_EnsightUtils.hxx.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 891 of file MEDMEM_EnsightUtils.hxx.


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