MINT2
Public Member Functions | Protected Attributes | List of all members
MINT::PolymorphVector< T > Class Template Reference

#include <PolymorphVector.h>

Public Member Functions

 PolymorphVector ()
 
 PolymorphVector (unsigned int N)
 
 PolymorphVector (unsigned int N, const T &c)
 
 PolymorphVector (const PolymorphVector &other)
 
 PolymorphVector (const typename std::vector< T > &other)
 
virtual ~PolymorphVector ()
 
std::vector< T > & theVector ()
 
const std::vector< T > & theVector () const
 
T & operator[] (unsigned int i)
 
const T & operator[] (unsigned int i) const
 
T & at (unsigned int i)
 
const T & at (unsigned int i) const
 
std::vector< T >::iterator begin ()
 
std::vector< T >::const_iterator begin () const
 
std::vector< T >::iterator end ()
 
std::vector< T >::const_iterator end () const
 
std::vector< T >::iterator find (const T &c)
 
std::vector< T >::const_iterator find (const T &c) const
 
T & front ()
 
const T & front () const
 
T & back ()
 
const T & back () const
 
unsigned int size () const
 
bool empty () const
 
void push_back (const T &c)
 
void pop_back ()
 
void erase (typename std::vector< T >::iterator pos)
 
void erase (typename std::vector< T >::iterator first, typename std::vector< T >::iterator last)
 
PolymorphVector< T > & operator= (const PolymorphVector< T > &other)
 
void clear ()
 
void resize (unsigned int N)
 
void resize (unsigned int N, const T &c)
 
 operator const typename std::vector< T > & () const
 
 operator typename std::vector< T > & ()
 
bool operator== (const MINT::PolymorphVector< T > &v2) const
 
bool operator!= (const MINT::PolymorphVector< T > &v2) const
 
bool operator< (const MINT::PolymorphVector< T > &v2) const
 
bool operator> (const MINT::PolymorphVector< T > &v2) const
 

Protected Attributes

std::vector< T > _vec
 

Detailed Description

template<typename T>
class MINT::PolymorphVector< T >

Definition at line 8 of file PolymorphVector.h.

Constructor & Destructor Documentation

◆ PolymorphVector() [1/5]

template<typename T>
MINT::PolymorphVector< T >::PolymorphVector ( )
inline

Definition at line 14 of file PolymorphVector.h.

14 : _vec(){}
std::vector< T > _vec

◆ PolymorphVector() [2/5]

template<typename T>
MINT::PolymorphVector< T >::PolymorphVector ( unsigned int  N)
inline

Definition at line 15 of file PolymorphVector.h.

15 : _vec(N){}
std::vector< T > _vec

◆ PolymorphVector() [3/5]

template<typename T>
MINT::PolymorphVector< T >::PolymorphVector ( unsigned int  N,
const T &  c 
)
inline

Definition at line 16 of file PolymorphVector.h.

16 : _vec(N, c){}
std::vector< T > _vec

◆ PolymorphVector() [4/5]

template<typename T>
MINT::PolymorphVector< T >::PolymorphVector ( const PolymorphVector< T > &  other)
inline

Definition at line 17 of file PolymorphVector.h.

17 : _vec(other._vec){}
std::vector< T > _vec

◆ PolymorphVector() [5/5]

template<typename T>
MINT::PolymorphVector< T >::PolymorphVector ( const typename std::vector< T > &  other)
inline

Definition at line 18 of file PolymorphVector.h.

18 : _vec(other){}
std::vector< T > _vec

◆ ~PolymorphVector()

template<typename T>
virtual MINT::PolymorphVector< T >::~PolymorphVector ( )
inlinevirtual

Definition at line 20 of file PolymorphVector.h.

20 {}

Member Function Documentation

◆ at() [1/2]

template<typename T>
T& MINT::PolymorphVector< T >::at ( unsigned int  i)
inline

Definition at line 29 of file PolymorphVector.h.

29 {return _vec.at(i);}
std::vector< T > _vec

◆ at() [2/2]

template<typename T>
const T& MINT::PolymorphVector< T >::at ( unsigned int  i) const
inline

Definition at line 30 of file PolymorphVector.h.

30 {return _vec.at(i);}
std::vector< T > _vec

◆ back() [1/2]

template<typename T>
T& MINT::PolymorphVector< T >::back ( )
inline

Definition at line 43 of file PolymorphVector.h.

43 {return _vec.back();}
std::vector< T > _vec

◆ back() [2/2]

template<typename T>
const T& MINT::PolymorphVector< T >::back ( ) const
inline

Definition at line 44 of file PolymorphVector.h.

44 {return _vec.back();}
std::vector< T > _vec

◆ begin() [1/2]

template<typename T>
std::vector<T>::iterator MINT::PolymorphVector< T >::begin ( )
inline

Definition at line 32 of file PolymorphVector.h.

32 {return _vec.begin();}
std::vector< T > _vec

◆ begin() [2/2]

template<typename T>
std::vector<T>::const_iterator MINT::PolymorphVector< T >::begin ( ) const
inline

Definition at line 33 of file PolymorphVector.h.

33 {return _vec.begin();}
std::vector< T > _vec

◆ clear()

template<typename T>
void MINT::PolymorphVector< T >::clear ( )
inline

Definition at line 64 of file PolymorphVector.h.

64 {_vec.clear();}
std::vector< T > _vec

◆ empty()

template<typename T>
bool MINT::PolymorphVector< T >::empty ( ) const
inline

Definition at line 47 of file PolymorphVector.h.

47 {return _vec.empty();}
std::vector< T > _vec

◆ end() [1/2]

template<typename T>
std::vector<T>::iterator MINT::PolymorphVector< T >::end ( )
inline

Definition at line 35 of file PolymorphVector.h.

35 {return _vec.end();}
std::vector< T > _vec

◆ end() [2/2]

template<typename T>
std::vector<T>::const_iterator MINT::PolymorphVector< T >::end ( ) const
inline

Definition at line 36 of file PolymorphVector.h.

36 {return _vec.end();}
std::vector< T > _vec

◆ erase() [1/2]

template<typename T>
void MINT::PolymorphVector< T >::erase ( typename std::vector< T >::iterator  pos)
inline

Definition at line 53 of file PolymorphVector.h.

53 {_vec.erase(pos);}
std::vector< T > _vec

◆ erase() [2/2]

template<typename T>
void MINT::PolymorphVector< T >::erase ( typename std::vector< T >::iterator  first,
typename std::vector< T >::iterator  last 
)
inline

Definition at line 54 of file PolymorphVector.h.

55  {
56  _vec.erase(first, last);
57  }
std::vector< T > _vec

◆ find() [1/2]

template<typename T>
std::vector<T>::iterator MINT::PolymorphVector< T >::find ( const T &  c)
inline

Definition at line 38 of file PolymorphVector.h.

38 {return _vec.find(c);}
std::vector< T > _vec

◆ find() [2/2]

template<typename T>
std::vector<T>::const_iterator MINT::PolymorphVector< T >::find ( const T &  c) const
inline

Definition at line 39 of file PolymorphVector.h.

39 {return _vec.find(c);}
std::vector< T > _vec

◆ front() [1/2]

template<typename T>
T& MINT::PolymorphVector< T >::front ( )
inline

Definition at line 41 of file PolymorphVector.h.

41 {return _vec.front();}
std::vector< T > _vec

◆ front() [2/2]

template<typename T>
const T& MINT::PolymorphVector< T >::front ( ) const
inline

Definition at line 42 of file PolymorphVector.h.

42 {return _vec.front();}
std::vector< T > _vec

◆ operator const typename std::vector< T > &()

template<typename T>
MINT::PolymorphVector< T >::operator const typename std::vector< T > & ( ) const
inline

Definition at line 68 of file PolymorphVector.h.

68  {
69  return this->theVector();
70  }
std::vector< T > & theVector()

◆ operator typename std::vector< T > &()

template<typename T>
MINT::PolymorphVector< T >::operator typename std::vector< T > & ( )
inline

Definition at line 71 of file PolymorphVector.h.

71  {
72  return this->theVector();
73  }
std::vector< T > & theVector()

◆ operator!=()

template<typename T>
bool MINT::PolymorphVector< T >::operator!= ( const MINT::PolymorphVector< T > &  v2) const
inline

Definition at line 78 of file PolymorphVector.h.

78  {
79  return !(_vec == v2.theVector());
80  }
std::vector< T > & theVector()
std::vector< T > _vec

◆ operator<()

template<typename T>
bool MINT::PolymorphVector< T >::operator< ( const MINT::PolymorphVector< T > &  v2) const
inline

Definition at line 81 of file PolymorphVector.h.

81  {
82  return _vec < v2.theVector();
83  }
std::vector< T > & theVector()
std::vector< T > _vec

◆ operator=()

template<typename T>
PolymorphVector<T>& MINT::PolymorphVector< T >::operator= ( const PolymorphVector< T > &  other)
inline

Definition at line 59 of file PolymorphVector.h.

59  {
60  _vec = other._vec;
61  return *this;
62  }
std::vector< T > _vec

◆ operator==()

template<typename T>
bool MINT::PolymorphVector< T >::operator== ( const MINT::PolymorphVector< T > &  v2) const
inline

Definition at line 75 of file PolymorphVector.h.

75  {
76  return _vec == v2.theVector();
77  }
std::vector< T > & theVector()
std::vector< T > _vec

◆ operator>()

template<typename T>
bool MINT::PolymorphVector< T >::operator> ( const MINT::PolymorphVector< T > &  v2) const
inline

Definition at line 84 of file PolymorphVector.h.

84  {
85  return v2 < _vec.theVector();
86  }
std::vector< T > _vec

◆ operator[]() [1/2]

template<typename T>
T& MINT::PolymorphVector< T >::operator[] ( unsigned int  i)
inline

Definition at line 26 of file PolymorphVector.h.

26 {return _vec[i];}
std::vector< T > _vec

◆ operator[]() [2/2]

template<typename T>
const T& MINT::PolymorphVector< T >::operator[] ( unsigned int  i) const
inline

Definition at line 27 of file PolymorphVector.h.

27 {return _vec[i];}
std::vector< T > _vec

◆ pop_back()

template<typename T>
void MINT::PolymorphVector< T >::pop_back ( )
inline

Definition at line 51 of file PolymorphVector.h.

51 {_vec.pop_back();}
std::vector< T > _vec

◆ push_back()

template<typename T>
void MINT::PolymorphVector< T >::push_back ( const T &  c)
inline

Definition at line 50 of file PolymorphVector.h.

50 {_vec.push_back(c);}
std::vector< T > _vec

◆ resize() [1/2]

template<typename T>
void MINT::PolymorphVector< T >::resize ( unsigned int  N)
inline

Definition at line 65 of file PolymorphVector.h.

65 {_vec.resize(N);}
std::vector< T > _vec

◆ resize() [2/2]

template<typename T>
void MINT::PolymorphVector< T >::resize ( unsigned int  N,
const T &  c 
)
inline

Definition at line 66 of file PolymorphVector.h.

66 {_vec.resize(N, c);}
std::vector< T > _vec

◆ size()

template<typename T>
unsigned int MINT::PolymorphVector< T >::size ( ) const
inline

Definition at line 46 of file PolymorphVector.h.

46 {return _vec.size();}
std::vector< T > _vec

◆ theVector() [1/2]

template<typename T>
std::vector<T>& MINT::PolymorphVector< T >::theVector ( )
inline

Definition at line 22 of file PolymorphVector.h.

22 {return _vec;}
std::vector< T > _vec

◆ theVector() [2/2]

template<typename T>
const std::vector<T>& MINT::PolymorphVector< T >::theVector ( ) const
inline

Definition at line 23 of file PolymorphVector.h.

23 {return _vec;}
std::vector< T > _vec

Member Data Documentation

◆ _vec

template<typename T>
std::vector<T> MINT::PolymorphVector< T >::_vec
protected

Definition at line 11 of file PolymorphVector.h.


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