Version: 9.16.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
 
const TValueType * myCValuePtr
 Reference to source multidimensional data. More...
 
size_t mySourceSize
 Size of the source multidimensional data. More...
 
std::slice mySlice
 Defines algorithm of index calculation. More...
 

Detailed Description

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

This class extends TCSlice functionality for non-constant case.

Member Typedef Documentation

◆ TSupperClass

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

◆ value_type

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

Constructor & Destructor Documentation

◆ TSlice() [1/3]

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

Construct the class from bare pointer.

◆ TSlice() [2/3]

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

Construct the class from corresponding container.

◆ TSlice() [3/3]

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

Default constructor (dangerous)

Member Function Documentation

◆ at() [1/2]

template<class TValueType >
value_type & MED::TSlice< TValueType >::at ( size_t  theId)

◆ at() [2/2]

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

◆ calculate_id()

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().

◆ check_id()

template<class TValueType >
void MED::TCSlice< TValueType >::check_id ( size_t  theId) const
protectedinherited

◆ get_id()

template<class TValueType >
size_t MED::TCSlice< TValueType >::get_id ( size_t  theId) const
protectedinherited

◆ get_id_at()

template<class TValueType >
size_t MED::TCSlice< TValueType >::get_id_at ( size_t  theId) const
protectedinherited

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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.

◆ size()

template<class TValueType >
size_t MED::TCSlice< TValueType >::size ( ) const
inherited

Field Documentation

◆ myCValuePtr

template<class TValueType >
const TValueType* MED::TCSlice< TValueType >::myCValuePtr
privateinherited

Reference to source multidimensional data.

Referenced by MED::TCSlice< TValueType >::at(), and MED::TCSlice< TValueType >::operator[]().

◆ mySlice

template<class TValueType >
std::slice MED::TCSlice< TValueType >::mySlice
privateinherited

◆ mySourceSize

template<class TValueType >
size_t MED::TCSlice< TValueType >::mySourceSize
privateinherited

Size of the source multidimensional data.

Referenced by MED::TCSlice< TValueType >::check_id().

◆ myValuePtr

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