|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
CRTP Mixin providing traversal operations. More...
#include <ah-dry-mixin.H>
Public Member Functions | |
| template<class Operation > | |
| bool | traverse (Operation &operation) const |
| Traverse all elements, applying an operation to each. | |
| template<class Operation > | |
| bool | traverse (Operation &operation) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<class Operation > | |
| bool | traverse (Operation and operation=Operation()) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<class Operation > | |
| bool | traverse (Operation and operation=Operation()) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Protected Member Functions | |
| const Derived & | self () const noexcept |
| Access the derived class (const version). | |
| Derived & | self () noexcept |
| Access the derived class (mutable version). | |
CRTP Mixin providing traversal operations.
This mixin adds the traverse() method to containers, which is the foundation for all other functional operations.
| Derived | The derived container class (CRTP pattern). |
| Type | The element type stored in the container. |
Iterator nested typeget_it() method returning an IteratorDefinition at line 115 of file ah-dry-mixin.H.
|
inlineprotectednoexcept |
Access the derived class (const version).
Definition at line 119 of file ah-dry-mixin.H.
References Aleph::maps().
Referenced by Aleph::TraverseMixin< Derived, Type >::traverse(), and Aleph::TraverseMixin< Derived, Type >::traverse().
|
inlineprotectednoexcept |
Access the derived class (mutable version).
Definition at line 125 of file ah-dry-mixin.H.
References Aleph::maps().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 176 of file ah-dry-mixin.H.
References Aleph::maps(), and Aleph::TraverseMixin< Derived, Type >::self().
|
inline |
Traverse all elements, applying an operation to each.
Iterates through all elements in the container, calling the operation on each element. The traversal stops early if the operation returns false.
| Operation | Callable type with signature bool(const Type&) or bool(Type&). |
| operation | The operation to apply to each element. |
Definition at line 166 of file ah-dry-mixin.H.
References Aleph::maps(), and Aleph::TraverseMixin< Derived, Type >::self().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 194 of file ah-dry-mixin.H.
References Aleph::maps().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Version accepting rvalue operation (temporary lambdas).
Definition at line 187 of file ah-dry-mixin.H.
References Aleph::maps().