38 template<
typename T,
template<
typename>
typename C>
43 C<T>* _internalValues;
49 std::vector<std::function<bool(
const T&)>> _filters;
141 bool allMatch(std::function<
bool(
const T&)> predicate);
148 bool anyMatch(std::function<
bool(
const T&)> predicate);
155 bool noneMatch(std::function<
bool(
const T&)> predicate);
179 void collect(D& container, std::function<
void(D&,
const T&)> collector);
189 D
collect(std::function<
void(D&,
const T&)> collector);
197 template<
typename D,
typename R>
198 void collect(D& container, R(D::*collector)(
const T&));
207 template<
typename D,
typename R>
217 void forEach(std::function<
void(T&)> action,
const std::vector<std::function<
bool(
const T&)>>& filters);
225 bool allMatch(std::function<
bool(
const T&)> predicate,
const std::vector<std::function<
bool(
const T&)>>& filters);
233 bool anyMatch(std::function<
bool(
const T&)> predicate,
const std::vector<std::function<
bool(
const T&)>>& filters);
241 bool noneMatch(std::function<
bool(
const T&)> predicate,
const std::vector<std::function<
bool(
const T&)>>& filters);
248 bool limitReached()
const;
255#include "impl/fluent.hpp"
Fluent & limit(uint64_t limit)
bool anyMatch(std::function< bool(const T &)> predicate)
void collect(D &container, std::function< void(D &, const T &)> collector)
D collect(std::function< void(D &, const T &)> collector)
Fluent & skip(uint64_t skip)
Fluent & filter(std::function< bool(const T &)> predicate)
Fluent(C< T > &container)
void collect(D &container, R(D::*collector)(const T &))
D collect(R(D::*collector)(const T &))
Fluent(const Fluent &other)
Fluent & concat(Fluent< T, C > &other) noexcept
Fluent< U, std::vector > map(std::function< U(const T &)> mapper)
void forEach(std::function< void(T &)> action)
bool noneMatch(std::function< bool(const T &)> predicate)
bool allMatch(std::function< bool(const T &)> predicate)
AnCH framework base namespace.
Definition app.hpp:28