CORGI
An open source project by
FPL.
|
An Iterator for the VectorPool. More...
#include <vector_pool.h>
An Iterator for the VectorPool.
This has constant-time access, so it is a good choice for iterating over the active elements that the pool owns.
is_const | A bool that determines if the IteratorTemplate should be defined as const. |
Public Member Functions | |
IteratorTemplate (VectorPool< T > *container, size_t index) | |
Constructor for an IteratorTemplate to a given VectorPool index. More... | |
~IteratorTemplate () | |
Destructor for an IteratorTemplate. | |
bool | operator== (const IteratorTemplate &other) const |
The standard equality operator to compare two IteratorTemplates. More... | |
bool | operator!= (const IteratorTemplate &other) const |
The standard inequality operator to compare two IteratorTemplates. More... | |
IteratorTemplate & | operator++ () |
The prefix increment operator to move the iterator forward in the list. More... | |
IteratorTemplate | operator++ (int) |
The postfix increment operator to move the iterator forward in the list. More... | |
IteratorTemplate & | operator-- () |
The prefix decrement operator to move the iterator backward in the list. More... | |
IteratorTemplate | operator-- (int) |
The postfix decrement operator to move the iterator backward in the list. More... | |
reference | operator* () |
The dereference operator. More... | |
pointer | operator-> () |
Member access on the iterator. More... | |
VectorPoolReference | ToReference () const |
Converts the Iterator into a VectorPoolReference, which is the preferred way for holding onto references into the VectorPool. More... | |
size_t | index () const |
Get the index into the VectorPool vector. More... | |
Friends | |
class | VectorPool< T > |
|
inline |
Constructor for an IteratorTemplate to a given VectorPool index.
[in] | container | The VectorPool to point to. |
[in] | index | The index into the VectorPool's underlying vector. |
|
inline |
Get the index into the VectorPool vector.
|
inline |
The standard inequality operator to compare two IteratorTemplates.
[in] | other | The other IteratorTemplate to compare with to check for inequality. |
|
inline |
The dereference operator.
|
inline |
The prefix increment operator to move the iterator forward in the list.
|
inline |
The postfix increment operator to move the iterator forward in the list.
|
inline |
The prefix decrement operator to move the iterator backward in the list.
|
inline |
The postfix decrement operator to move the iterator backward in the list.
|
inline |
Member access on the iterator.
|
inline |
The standard equality operator to compare two IteratorTemplates.
[in] | other | The other IteratorTemplate to compare with to check for equality. |
|
inline |
Converts the Iterator into a VectorPoolReference, which is the preferred way for holding onto references into the VectorPool.