Handler list iterators are rather limited. More...
#include <handlers.hpp>
Public Member Functions | |
iterator (const list_t::iterator &base_iter) | |
Initialized constructor (to be called by handler_list). More... | |
iterator & | operator++ () |
Increment. More... | |
handler_ptr | operator* () |
Dereference. More... | |
Private Attributes | |
list_t::iterator | iter_ |
The current element. More... | |
Handler list iterators are rather limited.
They can be constructed from a reference iterator (not default constructed), incremented, and dereferenced. Consecutive dereferences are not guaranteed to return the same element (if the list mutates between them, the next element might be returned). An increment guarantees that the next dereference will differ from the previous (unless at the end of the list). The end of the list is indicated by dereferencing to a null pointer.
Definition at line 104 of file handlers.hpp.
|
inlineexplicit |
Initialized constructor (to be called by handler_list).
Definition at line 111 of file handlers.hpp.
handler_ptr game_events::handler_list::iterator::operator* | ( | ) |
Dereference.
If the current element has become invalid, we will increment first.
Definition at line 59 of file handlers.cpp.
References utils::smart_list< internal_ptr >::erase(), and iter_.
|
inline |
|
private |
The current element.
Definition at line 107 of file handlers.hpp.
Referenced by operator*(), and operator++().