23#ifndef MED_Vector_HeaderFile
24#define MED_Vector_HeaderFile
29# define MED_TVECTOR_CHECK_RANGE
34 template<
typename _Tp,
typename _Alloc = std::allocator<_Tp> >
35 class TVector :
public std::vector<_Tp, _Alloc>
51 if (__n >= this->size())
52 throw std::out_of_range(
"TVector [] access out of range");
58 return superclass::operator[](__n);
64 return superclass::operator[](__n);
87 template<
typename _InputIterator>
88 TVector(_InputIterator __first, _InputIterator __last,
93 template<
typename _Yp,
typename _Al>
101 superclass::operator=(__x);
105 template<
typename _Yp,
typename _Al>
109 this->assign(__y.begin(), __y.end());
116#if defined(MED_TVECTOR_CHECK_RANGE)
125#if defined(MED_TVECTOR_CHECK_RANGE)
147#undef MED_TVECTOR_CHECK_RANGE
IMAP::const_iterator begin(const IMAP &m)
Definition: StdMeshers_Projection_2D.cxx:104
IMAP::const_iterator end(const IMAP &m)
Definition: StdMeshers_Projection_2D.cxx:106
Main purpose to introduce the class was to customize operator [].
Definition: MED_Vector.hxx:36
_Tp value_type
Definition: MED_Vector.hxx:43
void check_range(size_type __n) const
Definition: MED_Vector.hxx:49
const_reference operator[](size_type __n) const
Definition: MED_Vector.hxx:123
const value_type & const_reference
Definition: MED_Vector.hxx:45
TVector(size_type __n)
Definition: MED_Vector.hxx:79
const_reference at(size_type __n) const
Definition: MED_Vector.hxx:139
superclass::allocator_type allocator_type
Definition: MED_Vector.hxx:41
TVector(size_type __n, const value_type &__val, const allocator_type &__a=allocator_type())
Definition: MED_Vector.hxx:73
std::vector< _Tp, _Alloc > superclass
Definition: MED_Vector.hxx:40
const_reference get_value(size_type __n) const
Definition: MED_Vector.hxx:56
TVector(_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())
Definition: MED_Vector.hxx:88
value_type & reference
Definition: MED_Vector.hxx:44
TVector(const TVector &__x)
Definition: MED_Vector.hxx:83
TVector & operator=(const TVector &__x)
Definition: MED_Vector.hxx:99
TVector(TVector< _Yp, _Al > __y)
Definition: MED_Vector.hxx:94
TVector & operator=(TVector< _Yp, _Al > __y)
Definition: MED_Vector.hxx:107
reference operator[](size_type __n)
Definition: MED_Vector.hxx:114
TVector(const allocator_type &__a=allocator_type())
Definition: MED_Vector.hxx:69
reference get_value(size_type __n)
Definition: MED_Vector.hxx:62
size_t size_type
Definition: MED_Vector.hxx:38
reference at(size_type __n)
Definition: MED_Vector.hxx:132
Definition: MED_Algorithm.cxx:28