Base class for all object vector classes.
More...
#include <object_vector.hpp>
Inherits object_container.
template<class S, class T, class CT = T>
class oos::object_vector_base< S, T, CT >
Base class for all object vector classes.
- Template Parameters
-
S | The type of the parent object. |
T | The value of the vector. |
CT | The container item type. |
The object_vector class implements a vector which can hold any type of object from builtin types as int, float to object_ptr or object_ref elements. The class provides STL like behaviour and the order of the elements is reliable.
template<class S, class T, class CT = T>
Shortcut for the vector const iterator.
template<class S, class T, class CT = T>
Shortcut for the value holder type.
template<class S, class T, class CT = T>
Shortcut for the item type.
template<class S, class T, class CT = T>
Shortcut for the vector iterator.
template<class S, class T, class CT = T>
Shortcut for the container type.
template<class S, class T, class CT = T>
Shortcut for the size type.
template<class S, class T, class CT = T>
Shortcut for the value type.
template<class S, class T, class CT = T>
Shortcut for the vector class member.
template<class S, class T, class CT = T>
Creates a new object_vector.
A new object_vector is created. The vector is part of the given parent object and therefor a reference to the parent object must be found inside the value type object with the given vector_name. Also the index of the element is stored within the element. Therefor the name of the index parameter must be given.
- Template Parameters
-
- Parameters
-
parent | The containing vector object. |
template<class S, class T, class CT = T>
Adjust indeces of all elements after the given iterator.
- Parameters
-
i | The start iterator for the index adjustment. |
template<class S, class T, class CT = T>
Access the element at given position.
- Parameters
-
pos | The index of the requested element. |
- Returns
- The requested element.
template<class S, class T, class CT = T>
Access the element at given position.
- Parameters
-
pos | The index of the requested element. |
- Returns
- The requested element.
template<class S, class T, class CT = T>
Return the begin iterator of the vector.
- Returns
- The begin iterator.
template<class S, class T, class CT = T>
Return the begin iterator of the vector.
- Returns
- The begin iterator.
template<class S, class T, class CT = T>
Return the typename of the item type class
- Returns
- The item type name.
template<class S, class T, class CT = T>
template<class S, class T, class CT = T>
Returns true if the vector is empty.
- Returns
- True if the vector is empty.
template<class S, class T, class CT = T>
Return the end iterator of the vector.
- Returns
- The end iterator.
template<class S, class T, class CT = T>
Return the end iterator of the vector.
- Returns
- The end iterator.
template<class S, class T, class CT = T>
Interface to erase an element.
This is the interface for derived object_list classes to implement their erase element method. Erases a single element from the list.
- Parameters
-
- Returns
- Returns the next iterator.
template<class S, class T, class CT = T>
Erases a range defines by iterators.
Erase a range of elements from the list. The range is defined by a first and a last iterator.
- Parameters
-
first | The first iterator of the range to erase. |
last | The last iterator of the range to erase. |
- Returns
- Returns the next iterator.
template<class S, class T, class CT = T>
Executes the given function object for all elements.
Executes the given function object for all elements.
- Parameters
-
nf | Function object used to be executed on each element. |
template<class S, class T, class CT = T>
Inserts a new element.
Insert a new element at a given iterator position.
- Parameters
-
pos | The position where to insert. |
x | The element to insert. |
- Returns
- The new position iterator.
template<class S, class T, class CT = T>
Insert a proxy object at a given position.
- Parameters
-
index | The index to insert at. |
proxy | The object_proxy to insert. |
template<class S, class T, class CT = T>
Access the element at given position.
- Parameters
-
pos | The index of the requested element. |
- Returns
- The requested element.
template<class S, class T, class CT = T>
Access the element at given position.
- Parameters
-
pos | The index of the requested element. |
- Returns
- The requested element.
template<class S, class T, class CT = T>
Sets the parent for the vector
- Parameters
-
p | The parent object of the vector. |
template<class S, class T, class CT = T>
Return the parent of the vector.
- Returns
- The parent.
template<class S, class T, class CT = T>
Adds an element to the end of the list.
- Parameters
-
x | The element to be pushed back. |
template<class S, class T, class CT = T>
Returns the size of the vector.
- Returns
- The size of the vector.
template<class S, class T, class CT = T>
template<class S, class T, class CT = T>
Return a reference to the underlying vector class object.
- Returns
- The vector object.
The documentation for this class was generated from the following file: