|
PcapPlusPlus
20.08
|
Go to the documentation of this file. 1 #ifndef PCAPPP_POINTER_VECTOR
2 #define PCAPPP_POINTER_VECTOR
47 for (
VectorIterator iter = m_Vector.begin(); iter != m_Vector.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); }
115 size_t size()
const {
return m_Vector.size(); }
121 T*
front() {
return m_Vector.front(); }
131 return m_Vector.erase(position);
141 T* result = (*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;
VectorIterator begin()
Definition: PointerVector.h:88
VectorIterator end()
Definition: PointerVector.h:100
ConstVectorIterator end() const
Definition: PointerVector.h:106
T * front()
Definition: PointerVector.h:121
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
The main namespace for the PcapPlusPlus lib.
size_t size() const
Definition: PointerVector.h:115
~PointerVector()
Definition: PointerVector.h:45
Definition: PointerVector.h:24
PointerVector()
Definition: PointerVector.h:40
T * getAndRemoveFromVector(VectorIterator &position)
Definition: PointerVector.h:139
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