Cogs.Core
|
Iterator type for iterating over typed component collections. More...
#include <ComponentCollection.h>
Public Types | |
typedef std::forward_iterator_tag | iterator_category |
Type of iterator. Can only be used to iterate forward over components in a pool. | |
typedef ComponentType | value_type |
Value type for dereferencing the iterator is the templated ComponentType. | |
typedef size_t | difference_type |
Difference type to calculate iterator distance. | |
typedef ComponentType * | pointer |
Pointer type to the templated ComponentType. | |
typedef ComponentType & | reference |
Reference type to the templated ComponentType. | |
Public Member Functions | |
ComponentCollectionIterator (ComponentCollection &collection, size_t index) | |
Creates a new iterator over the given collection with the given index. | |
ComponentCollectionIterator (const ComponentCollectionIterator &other) | |
Creates a new iterator copying the state of other. | |
constexpr bool | operator== (const ComponentCollectionIterator &other) const |
Comparison operator. If the current index of both iterators are equal the iterators are considered equal. | |
ComponentCollectionIterator | operator++ () |
Post increment operator. Moves the iterator to the next component indexed in the collection. | |
ComponentCollectionIterator & | operator++ (int) |
Pre increment operator. Moves the iterator to the next component indexed in the collection. | |
ComponentType & | operator* () |
Dereference operator. Returns a reference to the component at the iterators current iterator index. | |
const ComponentType & | operator* () const |
Const dereference operator. Returns a const reference to the component at the current iterator index. | |
const ComponentType * | operator-> () const |
Pointer operator. Returns a pointer to the component at the current iterator index. | |
Iterator type for iterating over typed component collections.
Definition at line 162 of file ComponentCollection.h.
typedef size_t Cogs::ComponentModel::ComponentCollection< ComponentType >::ComponentCollectionIterator::difference_type |
Difference type to calculate iterator distance.
Definition at line 172 of file ComponentCollection.h.
typedef std::forward_iterator_tag Cogs::ComponentModel::ComponentCollection< ComponentType >::ComponentCollectionIterator::iterator_category |
Type of iterator. Can only be used to iterate forward over components in a pool.
Definition at line 166 of file ComponentCollection.h.
typedef ComponentType* Cogs::ComponentModel::ComponentCollection< ComponentType >::ComponentCollectionIterator::pointer |
Pointer type to the templated ComponentType.
Definition at line 175 of file ComponentCollection.h.
typedef ComponentType& Cogs::ComponentModel::ComponentCollection< ComponentType >::ComponentCollectionIterator::reference |
Reference type to the templated ComponentType.
Definition at line 178 of file ComponentCollection.h.
typedef ComponentType Cogs::ComponentModel::ComponentCollection< ComponentType >::ComponentCollectionIterator::value_type |
Value type for dereferencing the iterator is the templated ComponentType.
Definition at line 169 of file ComponentCollection.h.
|
inline |
Creates a new iterator over the given collection with the given index.
Definition at line 181 of file ComponentCollection.h.
|
inline |
Creates a new iterator copying the state of other.
Definition at line 184 of file ComponentCollection.h.
|
inline |
Dereference operator. Returns a reference to the component at the iterators current iterator index.
Definition at line 196 of file ComponentCollection.h.
|
inline |
Const dereference operator. Returns a const reference to the component at the current iterator index.
Definition at line 199 of file ComponentCollection.h.
|
inline |
Post increment operator. Moves the iterator to the next component indexed in the collection.
Definition at line 190 of file ComponentCollection.h.
|
inline |
Pre increment operator. Moves the iterator to the next component indexed in the collection.
Definition at line 193 of file ComponentCollection.h.
|
inline |
Pointer operator. Returns a pointer to the component at the current iterator index.
Definition at line 202 of file ComponentCollection.h.
|
inlineconstexpr |
Comparison operator. If the current index of both iterators are equal the iterators are considered equal.
Definition at line 187 of file ComponentCollection.h.