|
ActiveLib
|
#include <Vector.h>


Public Member Functions | |
| Vector (size_type toReserve=0) | |
| template<class Derived > | |
| Vector (const std::initializer_list< Derived > &items) | |
| Vector (const Vector &source) | |
| Vector (Vector &&source) | |
| virtual | ~Vector ()=default |
| auto | operator= (const Vector &source) |
| auto | operator= (Vector &&source) |
| void | push_back (T *item) |
| void | emplace_back (T &&item) |
| void | emplace_back (const T &item) |
| void | emplace_back (value_type &&item) |
| void | emplace_back (value_type &item) |
| auto | insert (const_iterator pos, T *item) |
| auto | emplace (const_iterator pos, T &&item) |
| auto | emplace (const_iterator pos, value_type &item) |
| auto | release (iterator &pos) |
| auto | release (const_iterator pos) |
A specialisation class for a vector of objects wrapped in unique_ptr
This allows vector to store objects with polymorphic behaviour and object copying (object type must conform to Clonable). Keep in mind that the normal behaviour of the vector is to take ownership of any objects stored in it (unless release is used)
NB: There is no requirement for container items to be non-null. It is entirely up the implementor if this rule should be adopted or enforced
|
inline |
Constructor
| toReserve | The number of items to reserve space for in the vector |
|
inlineexplicit |
Constructor
| items | The items to insert in the array |

|
inline |
Copy constructor
| source | The object to copy |
|
inline |
Move constructor
| source | The object to move |
|
virtualdefault |
Destructor
|
inline |
Emplace an item into the vector at a specified position
| pos | The insertion position |
| item | The item to push (ownership passes to this vector) |
|
inline |
Emplace an item into the vector at a specified position
| pos | The insertion position |
| item | The item to push (ownership passes to this vector) |
|
inline |
Push an item at the end of the vector
| item | The item to push |
|
inline |
Push an item at the end of the vector
| item | The item to push |

|
inline |
Push an item at the end of the vector
| item | The item to push (already wrapped in unique_ptr) |
|
inline |
Push an item at the end of the vector
| item | The item to push (already wrapped in unique_ptr) |
|
inline |
Insert an item into the vector at a specified position
| pos | The insertion position |
| item | The item to push (ownership passes to this vector) |
|
inline |
Assignment operator
| source | The object to copy |
|
inline |
Assignment operator
| source | The object to move |
|
inline |
Push an item at the end of the vector
| item | The item to push (ownership passes to this vector) |

|
inline |
Release the pointer held by the specified item and erase
| pos | An iterator pointing to the item to be removed |
|
inline |
Release the pointer held by the specified item and erase
| pos | An iterator pointing to the item to be removed |

