#include <foreach.h>
An EraseIterator is returned by Iterable::EraseIterator. It provides the Erase function which allows to erase the current iteration value from the underlying collection.
Public Types | |
using | Super = ForEachIterator< EraseIterator, typename COLLECTION::Iterator > |
Public Types inherited from ForEachIterator< EraseIterator< COLLECTION, SWAP_ERASE, IsForEachIterator< typename COLLECTION::Iterator >::value >, COLLECTION::Iterator > | |
using | IsForEachIterator = std::true_type |
Public Member Functions | |
EraseIterator (COLLECTION &collection) | |
EraseIterator (EraseIterator &&src) | |
template<typename... ARGS> | |
void | Erase (ARGS &&... args) |
void | operator++ () |
void | operator++ (int) |
Public Member Functions inherited from ForEachIterator< EraseIterator< COLLECTION, SWAP_ERASE, IsForEachIterator< typename COLLECTION::Iterator >::value >, COLLECTION::Iterator > | |
MAXON_ATTRIBUTE_FORCE_INLINE | ForEachIterator (ARGS &&... args) |
String | ToString (const FormatStatement *formatStatement=nullptr) |
EraseIterator< COLLECTION, SWAP_ERASE, IsForEachIterator< typename COLLECTION::Iterator >::value > & | Find (const T &v) |
Int | FindIndex (const T &v) |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | Contains (const T &v) |
MAXON_ATTRIBUTE_FORCE_INLINE Wrapper | begin () |
Private Member Functions | |
void | operator-- () |
void | operator-- (int) |
void | operator+= (int) |
void | operator-= (int) |
void | operator+ (int) |
void | operator- (int) |
MAXON_DISALLOW_COPY_AND_ASSIGN (EraseIterator) | |
Private Attributes | |
COLLECTION * | _collection |
Bool | _erased |
Additional Inherited Members | |
Static Public Member Functions inherited from ForEachIterator< EraseIterator< COLLECTION, SWAP_ERASE, IsForEachIterator< typename COLLECTION::Iterator >::value >, COLLECTION::Iterator > | |
static MAXON_ATTRIBUTE_FORCE_INLINE | PRIVATE_MAXON_RBF_SENTINEL (Wrapper) end() |
using Super = ForEachIterator<EraseIterator, typename COLLECTION::Iterator> |
|
explicit |
EraseIterator | ( | EraseIterator< COLLECTION, SWAP_ERASE, IS_FOREACH_ITERATOR > && | src | ) |
void Erase | ( | ARGS &&... | args | ) |
Removes the current iteration value from the underlying collection. This is a simple and safe way to remove a value from a collection within a for loop. You must not access the removed iteration value afterwards, the only valid operation on an iterator after Erase is ++iterator. Example:
void operator++ | ( | ) |
void operator++ | ( | int | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |