Base class for all object list classes.
More...
#include <object_list.hpp>
Inherits object_container.
template<class S, class T, class CT = T>
class oos::object_list_base< S, T, CT >
Base class for all object list classes.
- Template Parameters
-
S | The type of the parent object. |
T | The value of the list. |
CT | The container item type. |
The object_list class implements a list 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 list 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 list iterator.
template<class S, class T, class CT = T>
Shortcut for the list class member.
template<class S, class T, class CT = T>
Shortcut for the container type.
template<class S, class T, class CT = T>
template<class S, class T, class CT = T>
Shortcut for the value type.
template<class S, class T, class CT = T>
Create an empty object list with the given parent object.
- Parameters
-
parent | The parent object of the list. |
template<class S, class T, class CT = T>
Return the begin iterator of the list.
- Returns
- The begin iterator.
template<class S, class T, class CT = T>
Return the begin iterator of the list.
- Returns
- The begin iterator.
template<class S, class T, class CT = T>
Return the class name of the item.
- Returns
- The class name of the item.
template<class S, class T, class CT = T>
template<class S, class T, class CT = T>
Returns true if the list is empty.
- Returns
- True if the list is empty.
template<class S, class T, class CT = T>
Return the end iterator of the list.
- Returns
- The end iterator.
template<class S, class T, class CT = T>
Return the end iterator of the list.
- 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>
Return the underlying list object.
- Returns
- The list object.
template<class S, class T, class CT = T>
Sets the parent for the list
- Parameters
-
p | The parent object of the list. |
template<class S, class T, class CT = T>
Returns the parent object.
- Returns
- The parent object.
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>
Adds an element to the beginning of the list.
- Parameters
-
x | The element to be pushed front. |
template<class S, class T, class CT = T>
Returns the size of the list.
- Returns
- The size of the list.
template<class S, class T, class CT = T>
The documentation for this class was generated from the following file: