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 void pushBack(T* element) { m_Vector.push_back(element); }
88 VectorIterator
begin() {
return m_Vector.begin(); }
94 ConstVectorIterator
begin()
const {
return m_Vector.begin(); }
100 VectorIterator
end() {
return m_Vector.end(); }
106 ConstVectorIterator
end()
const {
return m_Vector.end(); }
115 size_t size()
const {
return m_Vector.size(); }
121 T*
front() {
return m_Vector.front(); }
128 VectorIterator
erase(VectorIterator position)
131 return m_Vector.erase(position);
141 T* result = (*position);
142 VectorIterator tempPos = position;
143 tempPos = m_Vector.erase(tempPos);
155 return m_Vector.at(index);
163 const T*
at(
int index)
const 165 return m_Vector.at(index);
169 std::vector<T*> m_Vector;
ConstVectorIterator end() const
Definition: PointerVector.h:106
The main namespace for the PcapPlusPlus lib.
T * front()
Definition: PointerVector.h:121
Definition: PointerVector.h:24
std::vector< T * >::const_iterator ConstVectorIterator
Definition: PointerVector.h:35
ConstVectorIterator begin() const
Definition: PointerVector.h:94
const T * at(int index) const
Definition: PointerVector.h:163
PointerVector(const PointerVector &other)
Definition: PointerVector.h:57
std::vector< T * >::iterator VectorIterator
Definition: PointerVector.h:30
void pushBack(T *element)
Definition: PointerVector.h:82
void clear()
Definition: PointerVector.h:69
T * at(int index)
Definition: PointerVector.h:153
VectorIterator erase(VectorIterator position)
Definition: PointerVector.h:128
~PointerVector()
Definition: PointerVector.h:45
PointerVector()
Definition: PointerVector.h:40
size_t size() const
Definition: PointerVector.h:115
VectorIterator begin()
Definition: PointerVector.h:88
VectorIterator end()
Definition: PointerVector.h:100
T * getAndRemoveFromVector(VectorIterator &position)
Definition: PointerVector.h:139