#include <htlist.H>
Public Member Functions | |
| template<class Operation > | |
| bool | traverse (Operation &operation) noexcept(noexcept(operation)) |
| template<class Operation > | |
| bool | traverse (Operation &operation) const noexcept(noexcept(operation)) |
| template<class Operation > | |
| bool | traverse (Operation &&operation) const noexcept(noexcept(operation)) |
| template<class Operation > | |
| bool | traverse (Operation &&operation) noexcept(noexcept(operation)) |
Generic traversal of the container through its iterator.
This class implements a conditioned traversal on the container through its iterator.
It is assumed that Container exports its iterator with
typename Container::Iterator
|
inlinenoexcept |
Traverse the container via its iterator and performs a conditioned operation on each item.
traverse(operation) instantiates the internal iterator of the class and traverses each item performing operation(item).
operation must have the following signature:
bool operation(const typename Container::Item_Type & item)
If operation(item) returns true then the iterator is advanced and the next item processed. Otherwise. the traversal stops.
| [in] | operation | to be performed on each item |
true if all the items were visited (operation on each one always returned true) or false if the traversal was stoppep because there was a false result on an item. | anything | that could throw operation |
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.