Back to index

salome-med  6.5.0
Public Member Functions | Private Attributes
MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY > Class Template Reference

#include <MEDMEM_AsciiFieldDriver.hxx>

List of all members.

Public Member Functions

 SDForSorting (const double *coords, const T *comp, int nbComponents)
 SDForSorting (const SDForSorting &other)
 ~SDForSorting ()
bool operator< (const SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY > &other) const
void writeLine (ofstream &file) const

Private Attributes

double _coords [SPACEDIMENSION]
T * _components
int _nbComponents

Detailed Description

template<class T, int SPACEDIMENSION, unsigned int SORTSTRATEGY>
class MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >

Definition at line 74 of file MEDMEM_AsciiFieldDriver.hxx.


Constructor & Destructor Documentation

template<class T , int SPACEDIMENSION, unsigned int SORTSTRATEGY>
MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >::SDForSorting ( const double *  coords,
const T *  comp,
int  nbComponents 
)

Definition at line 135 of file MEDMEM_AsciiFieldDriver.hxx.

                                                                                                                :_nbComponents(nbComponents)
  {
    fill<SPACEDIMENSION-1,SORTSTRATEGY>(_coords,coords);
    _components=new T[_nbComponents];
    memcpy(_components,comp,sizeof(T)*_nbComponents);
  }

Here is the call graph for this function:

template<class T , int SPACEDIMENSION, unsigned int SORTSTRATEGY>
MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >::SDForSorting ( const SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY > &  other)

Definition at line 143 of file MEDMEM_AsciiFieldDriver.hxx.

                                                                                    :_nbComponents(other._nbComponents)
  {
    memcpy(_coords,other._coords,sizeof(double)*SPACEDIMENSION);
    _components=new T[_nbComponents];
    memcpy(_components,other._components,sizeof(T)*_nbComponents);
  }
template<class T , int SPACEDIMENSION, unsigned int SORTSTRATEGY>
MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >::~SDForSorting ( )

Definition at line 151 of file MEDMEM_AsciiFieldDriver.hxx.

  {
    delete [] _components;
  }

Member Function Documentation

template<class T , int SPACEDIMENSION, unsigned int SORTSTRATEGY>
bool MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >::operator< ( const SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY > &  other) const

Definition at line 157 of file MEDMEM_AsciiFieldDriver.hxx.

  {
    return compare<SPACEDIMENSION-1>(_coords,other._coords);
  }

Here is the call graph for this function:

template<class T , int SPACEDIMENSION, unsigned int SORTSTRATEGY>
void MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >::writeLine ( ofstream &  file) const

Definition at line 163 of file MEDMEM_AsciiFieldDriver.hxx.

  {
    int i;
    double temp[SPACEDIMENSION];
    fill<SPACEDIMENSION-1,SORTSTRATEGY>(temp,_coords);
    for(i=0;i<SPACEDIMENSION;i++)
      file << setw(SPACE_BETWEEN_NBS) << temp[i];
    for(i=0;i<_nbComponents;i++)
      file << setw(SPACE_BETWEEN_NBS) << _components[i];
    file << endl;
  }

Here is the call graph for this function:


Member Data Documentation

template<class T, int SPACEDIMENSION, unsigned int SORTSTRATEGY>
T* MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >::_components [private]

Definition at line 78 of file MEDMEM_AsciiFieldDriver.hxx.

template<class T, int SPACEDIMENSION, unsigned int SORTSTRATEGY>
double MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >::_coords[SPACEDIMENSION] [private]

Definition at line 77 of file MEDMEM_AsciiFieldDriver.hxx.

template<class T, int SPACEDIMENSION, unsigned int SORTSTRATEGY>
int MEDMEM::SDForSorting< T, SPACEDIMENSION, SORTSTRATEGY >::_nbComponents [private]

Definition at line 79 of file MEDMEM_AsciiFieldDriver.hxx.


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