Wrapper to have a vector of pointers such that when it is destroyed, all the pointers are deleted.
More...
#include <PointerVector.h>
|
| PointerVector ()=default |
| Default constructor.
|
|
| PointerVector (size_t const numElements) |
| Constructor that initializes a shared vector to hold for numElements pointers. More...
|
|
virtual | ~PointerVector () |
| Destructor that deletes what is hold for each pointer in the pointer vector before deleting the PointerVector itself.
|
|
std::vector< T * > & | operator* () |
| Access a reference to the vector.
|
|
T * | operator[] (size_t const i) |
|
|
std::vector< T * > | v |
| The vector of pointers.
|
|
template<typename T>
class PointerVector< T >
Wrapper to have a vector of pointers such that when it is destroyed, all the pointers are deleted.
- Author
- Alberto M. Esmoris Pena
- Version
- 1.0
The shared vector can be safely accessed by different threads since it it is implemented to be concurrency-aware.
- Template Parameters
-
T | The type of elements to which each pointer in the vector refers |
◆ PointerVector()
Constructor that initializes a shared vector to hold for numElements pointers.
- Parameters
-
numElements | The number of pointers that the vector must be initialized to contain |
◆ operator[]()
@biref Access the pointer at the \(i\)-th position
- Parameters
-
i | The position of the requested pointer |
- Returns
- Pointer at the \(i\)-th position
The documentation for this class was generated from the following file: