CatapultServer
v0.5.0.1 (Elephant)
|
Wraps a container type and provides modification-safe iteration support. More...
Public Types | |
using | value_type = typename TContainer::value_type |
using | iterator = typename TContainer::iterator |
Public Member Functions | |
size_t | size () const |
Gets the number of elements in the container. More... | |
bool | empty () const |
Gets a value indicating whether or not the container is empty. More... | |
auto | cbegin () const |
Returns a const iterator that represents the first entity. More... | |
auto | cend () const |
Returns a const iterator that represents one past the last entity. More... | |
auto | begin () |
Returns an iterator that represents the first entity. More... | |
auto | end () |
Returns an iterator that represents one past the last entity. More... | |
value_type * | next () |
Gets a pointer to the next value or nullptr if this container is empty. More... | |
template<typename TPredicate > | |
value_type * | nextIf (TPredicate predicate) |
void | push_back (const value_type &value) |
Adds a new element at the end of the container. More... | |
void | erase (iterator position) |
Removes a single element at position from the container. More... | |
void | clear () |
Removes all elements from the container. More... | |
Private Attributes | |
TContainer | m_container |
iterator | m_iter |
Wraps a container type and provides modification-safe iteration support.
using catapult::utils::ModificationSafeIterableContainer< TContainer >::iterator = typename TContainer::iterator |
using catapult::utils::ModificationSafeIterableContainer< TContainer >::value_type = typename TContainer::value_type |
|
inline |
Returns an iterator that represents the first entity.
|
inline |
Returns a const iterator that represents the first entity.
|
inline |
Returns a const iterator that represents one past the last entity.
|
inline |
Removes all elements from the container.
|
inline |
Gets a value indicating whether or not the container is empty.
|
inline |
Returns an iterator that represents one past the last entity.
|
inline |
Removes a single element at position from the container.
|
inline |
Gets a pointer to the next value or nullptr
if this container is empty.
|
inline |
Gets a pointer to the next value for which predicate returns true
or nullptr
if this container contains no matching values.
|
inline |
Adds a new element at the end of the container.
|
inline |
Gets the number of elements in the container.
|
private |
|
private |