Version: 8.3.0
MED::TSlice< TValueType > Class Template Reference

This class extends TCSlice functionality for non-constant case. More...

#include <MED_SliceArray.hxx>

Inheritance diagram for MED::TSlice< TValueType >:

Public Types

typedef TValueType value_type
 
typedef TCSlice< TValueType > TSupperClass
 

Public Member Functions

 TSlice (value_type *theValuePtr, size_t theSourceSize, const std::slice &theSlice)
 Construct the class from bare pointer. More...
 
 TSlice (TVector< value_type > &theContainer, const std::slice &theSlice)
 Construct the class from corresponding container. More...
 
 TSlice ()
 Default constructor (dangerous) More...
 
value_typeoperator[] (size_t theId)
 Get element by its number. More...
 
value_typeat (size_t theId)
 
const value_typeoperator[] (size_t theId) const
 Get element by its number (const version) More...
 
const value_typeat (size_t theId) const
 
size_t size () const
 Get range of the order numbers. More...
 

Protected Member Functions

void check_id (size_t theId) const
 
size_t calculate_id (size_t theId) const
 Calculate internal index to get proper element from the source multidimensional data. More...
 
size_t get_id (size_t theId) const
 
size_t get_id_at (size_t theId) const
 

Private Attributes

TValueType * myValuePtr
 

Detailed Description

template<class TValueType>
class MED::TSlice< TValueType >

This class extends TCSlice functionality for non-constant case.

Member Typedef Documentation

template<class TValueType >
typedef TCSlice<TValueType> MED::TSlice< TValueType >::TSupperClass
template<class TValueType >
typedef TValueType MED::TSlice< TValueType >::value_type

Constructor & Destructor Documentation

template<class TValueType >
MED::TSlice< TValueType >::TSlice ( value_type theValuePtr,
size_t  theSourceSize,
const std::slice &  theSlice 
)

Construct the class from bare pointer.

template<class TValueType >
MED::TSlice< TValueType >::TSlice ( TVector< value_type > &  theContainer,
const std::slice &  theSlice 
)

Construct the class from corresponding container.

template<class TValueType >
MED::TSlice< TValueType >::TSlice ( )

Default constructor (dangerous)

Member Function Documentation

template<class TValueType >
const value_type& MED::TCSlice< TValueType >::at ( size_t  theId) const
inherited
template<class TValueType >
value_type& MED::TSlice< TValueType >::at ( size_t  theId)
template<class TValueType >
size_t MED::TCSlice< TValueType >::calculate_id ( size_t  theId) const
protectedinherited

Calculate internal index to get proper element from the source multidimensional data.

References MED::TCSlice< TValueType >::mySlice.

Referenced by MED::TCSlice< TValueType >::get_id(), and MED::TCSlice< TValueType >::get_id_at().

template<class TValueType >
void MED::TCSlice< TValueType >::check_id ( size_t  theId) const
protectedinherited
template<class TValueType >
size_t MED::TCSlice< TValueType >::get_id ( size_t  theId) const
protectedinherited
template<class TValueType >
size_t MED::TCSlice< TValueType >::get_id_at ( size_t  theId) const
protectedinherited
template<class TValueType >
const value_type& MED::TCSlice< TValueType >::operator[] ( size_t  theId) const
inherited

Get element by its number (const version)

References MED::TCSlice< TValueType >::get_id(), and MED::TCSlice< TValueType >::myCValuePtr.

template<class TValueType >
value_type& MED::TSlice< TValueType >::operator[] ( size_t  theId)
template<class TValueType >
size_t MED::TCSlice< TValueType >::size ( ) const
inherited

Field Documentation

template<class TValueType >
TValueType* MED::TSlice< TValueType >::myValuePtr
private