1 #ifndef PCAPPP_POINTER_VECTOR 2 #define PCAPPP_POINTER_VECTOR 47 for (VectorIterator iter = m_Vector.begin(); iter != m_Vector.end(); iter++)
59 for (ConstVectorIterator iter = other.
begin(); iter != other.
end(); iter++)
61 T* objCopy =
new T(**iter);
62 m_Vector.push_back(objCopy);
71 for (VectorIterator iter = m_Vector.begin(); iter != m_Vector.end(); iter++)
82 inline void pushBack(T* element) { m_Vector.push_back(element); }
88 inline VectorIterator
begin() {
return m_Vector.begin(); }
94 inline ConstVectorIterator
begin()
const {
return m_Vector.begin(); }
100 inline VectorIterator
end() {
return m_Vector.end(); }
106 inline ConstVectorIterator
end()
const {
return m_Vector.end(); }
115 inline size_t size()
const {
return m_Vector.size(); }
121 inline T*
front() {
return m_Vector.front(); }
128 inline VectorIterator
erase(VectorIterator position)
131 return m_Vector.erase(position);
141 T* result = (*position);
142 VectorIterator tempPos = position;
143 tempPos = m_Vector.erase(tempPos);
153 inline T*
at(
int index)
155 return m_Vector.at(index);
159 std::vector<T*> m_Vector;
VectorIterator erase(VectorIterator position)
Definition: PointerVector.h:128
size_t size() const
Definition: PointerVector.h:115
VectorIterator end()
Definition: PointerVector.h:100
Definition: PointerVector.h:24
T * getAndRemoveFromVector(VectorIterator &position)
Definition: PointerVector.h:139
T * at(int index)
Definition: PointerVector.h:153
ConstVectorIterator begin() const
Definition: PointerVector.h:94
ConstVectorIterator end() const
Definition: PointerVector.h:106
std::vector< T * >::const_iterator ConstVectorIterator
Definition: PointerVector.h:35
PointerVector(const PointerVector &other)
Definition: PointerVector.h:57
~PointerVector()
Definition: PointerVector.h:45
PointerVector()
Definition: PointerVector.h:40
void clear()
Definition: PointerVector.h:69
VectorIterator begin()
Definition: PointerVector.h:88
T * front()
Definition: PointerVector.h:121
std::vector< T * >::iterator VectorIterator
Definition: PointerVector.h:30
void pushBack(T *element)
Definition: PointerVector.h:82
The main namespace for the PcapPlusPlus lib.