Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ah-dry.H File Reference

Container traversal and functional operation mixins. More...

#include "ahFunctional.H"
#include <utility>
#include <vector>
#include <ah-errors.H>
Include dependency graph for ah-dry.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GenericTraverse< Container >
 Generic traversal of the container through its iterator. More...
 
class  LocateFunctions< Container, Type >
 Common sequential searching methods on containers. More...
 
struct  SpecialCtors< Container, T >
 Special constructors common to Aleph-w ( \(\aleph_\omega\)) containers. More...
 
class  FunctionalMethods< Container, T >
 Common methods to the Aleph-w ( \(\aleph_\omega\)) containers. More...
 
struct  GenericItems< Container, T >
 Generic list of items stored in a container. More...
 
class  EqualToMethod< Container >
 Equality test for containers. More...
 
class  MapSequencesMethods< Container, Key, Data >
 Common methods to mapping containers. More...
 

Typedefs

template<class Container , typename T >
using GenericKeys = GenericItems< Container, T >
 Alias to GenricItems functor.
 

Functions

template<class Container , class Operation >
bool traverse (const Container &c, Operation &op) noexcept(noexcept(c.traverse(op)))
 
template<class Container , class Operation >
bool traverse (const Container &c, Operation &&op) noexcept(noexcept(c.traverse(std::forward< Operation >(op))))
 

Detailed Description

Container traversal and functional operation mixins.

This file provides generic traversal classes and mixins that implement functional operations (for_each, exists, all, filter, map, etc.) for containers through their iterators. These follow the DRY principle.

Author
Leandro Rabindranath León

Definition in file ah-dry.H.

Typedef Documentation

◆ GenericKeys

template<class Container , typename T >
using GenericKeys = GenericItems<Container, T>

Alias to GenricItems functor.

Definition at line 1525 of file ah-dry.H.

Function Documentation

◆ traverse() [1/2]

template<class Container , class Operation >
bool traverse ( const Container c,
Operation &&  op 
)
noexcept

Definition at line 134 of file ah-dry.H.

◆ traverse() [2/2]

template<class Container , class Operation >
bool traverse ( const Container c,
Operation &  op 
)
noexcept

Definition at line 127 of file ah-dry.H.

Referenced by FunctionalMethods< Container, T >::exists().