Back to index

salome-med  6.5.0
Public Types | Public Member Functions | Public Attributes | Protected Member Functions
MED::TVector< _Tp, _Alloc > Class Template Reference

Main purpose to introduce the class was to customize operator []. More...

#include <MED_Vector.hxx>

Inheritance diagram for MED::TVector< _Tp, _Alloc >:
Inheritance graph
[legend]
Collaboration diagram for MED::TVector< _Tp, _Alloc >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef size_t size_type
typedef std::vector< _Tp, _Alloc > superclass
typedef superclass::allocator_type allocator_type
typedef _Tp value_type
typedef value_typereference
typedef const value_typeconst_reference

Public Member Functions

 TVector (const allocator_type &__a=allocator_type())
 TVector (size_type __n, const value_type &__val, const allocator_type &__a=allocator_type())
 TVector (size_type __n)
 TVector (const TVector &__x)
template<typename _InputIterator >
 TVector (_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())
template<typename _Yp , typename _Al >
 TVector (TVector< _Yp, _Al > __y)
TVectoroperator= (const TVector &__x)
template<typename _Yp , typename _Al >
TVectoroperator= (TVector< _Yp, _Al > __y)
reference operator[] (size_type __n)
const_reference operator[] (size_type __n) const
reference at (size_type __n)
const_reference at (size_type __n) const

Public Attributes

elements
 STL member.

Protected Member Functions

void check_range (size_type __n) const
const_reference get_value (size_type __n) const
reference get_value (size_type __n)

Detailed Description

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
class MED::TVector< _Tp, _Alloc >

Main purpose to introduce the class was to customize operator [].

Definition at line 43 of file MED_Vector.hxx.


Member Typedef Documentation

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
typedef superclass::allocator_type MED::TVector< _Tp, _Alloc >::allocator_type

Definition at line 49 of file MED_Vector.hxx.

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
typedef const value_type& MED::TVector< _Tp, _Alloc >::const_reference

Definition at line 53 of file MED_Vector.hxx.

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
typedef value_type& MED::TVector< _Tp, _Alloc >::reference

Definition at line 52 of file MED_Vector.hxx.

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
typedef size_t MED::TVector< _Tp, _Alloc >::size_type

Definition at line 46 of file MED_Vector.hxx.

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
typedef std::vector<_Tp, _Alloc> MED::TVector< _Tp, _Alloc >::superclass

Definition at line 48 of file MED_Vector.hxx.

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
typedef _Tp MED::TVector< _Tp, _Alloc >::value_type

Definition at line 51 of file MED_Vector.hxx.


Constructor & Destructor Documentation

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
MED::TVector< _Tp, _Alloc >::TVector ( const allocator_type __a = allocator_type()) [inline, explicit]

Definition at line 77 of file MED_Vector.hxx.

                                                         : 
      superclass(__a) 
    {}
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
MED::TVector< _Tp, _Alloc >::TVector ( size_type  __n,
const value_type __val,
const allocator_type __a = allocator_type() 
) [inline]

Definition at line 81 of file MED_Vector.hxx.

                                                         :
      superclass(__n, __val, __a)
    {}
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
MED::TVector< _Tp, _Alloc >::TVector ( size_type  __n) [inline, explicit]

Definition at line 87 of file MED_Vector.hxx.

                          :
      superclass(__n)
    {}
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
MED::TVector< _Tp, _Alloc >::TVector ( const TVector< _Tp, _Alloc > &  __x) [inline]

Definition at line 91 of file MED_Vector.hxx.

                               :
      superclass(__x)
    {}
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _InputIterator >
MED::TVector< _Tp, _Alloc >::TVector ( _InputIterator  __first,
_InputIterator  __last,
const allocator_type __a = allocator_type() 
) [inline]

Definition at line 96 of file MED_Vector.hxx.

                                                         :
      superclass(__first, __last, __a)
    {}
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _Yp , typename _Al >
MED::TVector< _Tp, _Alloc >::TVector ( TVector< _Yp, _Al >  __y) [inline]

Definition at line 102 of file MED_Vector.hxx.

                                  :
      superclass(__y.begin(), __y.end())
    {}

Member Function Documentation

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference MED::TVector< _Tp, _Alloc >::at ( size_type  __n) [inline]

Definition at line 140 of file MED_Vector.hxx.

    {
      check_range(__n);
      return get_value(__n);
    }
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference MED::TVector< _Tp, _Alloc >::at ( size_type  __n) const [inline]

Definition at line 147 of file MED_Vector.hxx.

    {
      check_range(__n);
      return get_value(__n);
    }
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void MED::TVector< _Tp, _Alloc >::check_range ( size_type  __n) const [inline, protected]

Definition at line 57 of file MED_Vector.hxx.

    {
      if (__n >= this->size())
        throw std::out_of_range("TVector [] access out of range");
    }

Here is the caller graph for this function:

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference MED::TVector< _Tp, _Alloc >::get_value ( size_type  __n) const [inline, protected]

Definition at line 64 of file MED_Vector.hxx.

    {
      return superclass::operator[](__n);
    }

Here is the caller graph for this function:

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference MED::TVector< _Tp, _Alloc >::get_value ( size_type  __n) [inline, protected]

Definition at line 70 of file MED_Vector.hxx.

    {
      return superclass::operator[](__n);
    }
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
TVector& MED::TVector< _Tp, _Alloc >::operator= ( const TVector< _Tp, _Alloc > &  __x) [inline]

Definition at line 107 of file MED_Vector.hxx.

    {
      superclass::operator=(__x);
      return *this;
    }

Here is the caller graph for this function:

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _Yp , typename _Al >
TVector& MED::TVector< _Tp, _Alloc >::operator= ( TVector< _Yp, _Al >  __y) [inline]

Definition at line 115 of file MED_Vector.hxx.

    {
      this->assign(__y.begin(), __y.end());
      return *this;
    }
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference MED::TVector< _Tp, _Alloc >::operator[] ( size_type  __n) [inline]

Definition at line 122 of file MED_Vector.hxx.

    {
#if defined(MED_TVECTOR_CHECK_RANGE)
      check_range(__n);
#endif
      return get_value(__n);
    }

Here is the caller graph for this function:

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference MED::TVector< _Tp, _Alloc >::operator[] ( size_type  __n) const [inline]

Definition at line 131 of file MED_Vector.hxx.

    {
#if defined(MED_TVECTOR_CHECK_RANGE)
      check_range(__n);
#endif
      return get_value(__n);
    }

Member Data Documentation

template<typename T>
T std::vector< T >::elements [inherited]

STL member.


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