ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::detail::query_facade_mixin< Derived > Class Template Reference

CRTP mixin that provides functional-style query facade methods. More...

#include <query_facade_mixin.hpp>

Inheritance diagram for threadschedule::detail::query_facade_mixin< Derived >:
[legend]

Public Member Functions

template<typename Predicate >
auto filter (Predicate &&pred) const
 
auto count () const -> size_t
 
auto empty () const -> bool
 
template<typename Fn >
void for_each (Fn &&fn) const
 
template<typename Predicate , typename Fn >
void apply (Predicate &&pred, Fn &&fn) const
 
template<typename Fn >
auto map (Fn &&fn) const -> std::vector< std::invoke_result_t< Fn, registered_thread_info_backend const & > >
 
template<typename Predicate >
auto find_if (Predicate &&pred) const -> std::optional< registered_thread_info_backend >
 
template<typename Predicate >
auto any (Predicate &&pred) const -> bool
 
template<typename Predicate >
auto all (Predicate &&pred) const -> bool
 
template<typename Predicate >
auto none (Predicate &&pred) const -> bool
 
auto take (size_t n) const
 
auto skip (size_t n) const
 

Detailed Description

template<typename Derived>
class threadschedule::detail::query_facade_mixin< Derived >

CRTP mixin that provides functional-style query facade methods.

The derived class must implement a public query() method returning a query_view-like object. All facade methods (filter, map, for_each, find_if, any, all, none, take, skip, count, empty, apply) delegate to it.

Return types are deduced via auto so the mixin can be used as a base class before the concrete query_view type is fully defined (CRTP).

Template Parameters
DerivedCRTP derived type.

Definition at line 31 of file query_facade_mixin.hpp.

Member Function Documentation

◆ all()

◆ any()

◆ apply()

template<typename Derived >
template<typename Predicate , typename Fn >
void threadschedule::detail::query_facade_mixin< Derived >::apply ( Predicate &&  pred,
Fn &&  fn 
) const
inline

◆ count()

Definition at line 48 of file query_facade_mixin.hpp.

◆ empty()

template<typename Derived >
auto threadschedule::detail::query_facade_mixin< Derived >::empty ( ) const -> bool
inline

Definition at line 54 of file query_facade_mixin.hpp.

◆ filter()

◆ find_if()

◆ for_each()

template<typename Derived >
template<typename Fn >
void threadschedule::detail::query_facade_mixin< Derived >::for_each ( Fn &&  fn) const
inline

◆ map()

◆ none()

◆ skip()

◆ take()


The documentation for this class was generated from the following file: