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

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

#include <thread_registry.hpp>

Inheritance diagram for threadschedule::detail::QueryFacadeMixin< 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, RegisteredThreadInfo const & > >
template<typename Predicate>
auto find_if (Predicate &&pred) const -> std::optional< RegisteredThreadInfo >
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::QueryFacadeMixin< Derived >

CRTP mixin that provides functional-style query facade methods.

The derived class must implement a public query() method returning a QueryView-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 QueryView type is fully defined (CRTP).

Template Parameters
DerivedCRTP derived type.

Definition at line 236 of file thread_registry.hpp.

Member Function Documentation

◆ all()

template<typename Derived>
template<typename Predicate>
auto threadschedule::detail::QueryFacadeMixin< Derived >::all ( Predicate && pred) const -> bool
inlinenodiscard

Definition at line 282 of file thread_registry.hpp.

◆ any()

template<typename Derived>
template<typename Predicate>
auto threadschedule::detail::QueryFacadeMixin< Derived >::any ( Predicate && pred) const -> bool
inlinenodiscard

Definition at line 276 of file thread_registry.hpp.

◆ apply()

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

Definition at line 258 of file thread_registry.hpp.

◆ count()

template<typename Derived>
auto threadschedule::detail::QueryFacadeMixin< Derived >::count ( ) const -> size_t
inlinenodiscard

Definition at line 247 of file thread_registry.hpp.

◆ empty()

template<typename Derived>
auto threadschedule::detail::QueryFacadeMixin< Derived >::empty ( ) const -> bool
inlinenodiscard

Definition at line 249 of file thread_registry.hpp.

◆ filter()

template<typename Derived>
template<typename Predicate>
auto threadschedule::detail::QueryFacadeMixin< Derived >::filter ( Predicate && pred) const
inlinenodiscard

Definition at line 242 of file thread_registry.hpp.

◆ find_if()

template<typename Derived>
template<typename Predicate>
auto threadschedule::detail::QueryFacadeMixin< Derived >::find_if ( Predicate && pred) const -> std::optional<RegisteredThreadInfo>
inlinenodiscard

Definition at line 270 of file thread_registry.hpp.

◆ for_each()

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

Definition at line 252 of file thread_registry.hpp.

◆ map()

template<typename Derived>
template<typename Fn>
auto threadschedule::detail::QueryFacadeMixin< Derived >::map ( Fn && fn) const -> std::vector<std::invoke_result_t<Fn, RegisteredThreadInfo const&>>
inlinenodiscard

Definition at line 264 of file thread_registry.hpp.

◆ none()

template<typename Derived>
template<typename Predicate>
auto threadschedule::detail::QueryFacadeMixin< Derived >::none ( Predicate && pred) const -> bool
inlinenodiscard

Definition at line 288 of file thread_registry.hpp.

◆ skip()

template<typename Derived>
auto threadschedule::detail::QueryFacadeMixin< Derived >::skip ( size_t n) const
inlinenodiscard

Definition at line 295 of file thread_registry.hpp.

◆ take()

template<typename Derived>
auto threadschedule::detail::QueryFacadeMixin< Derived >::take ( size_t n) const
inlinenodiscard

Definition at line 293 of file thread_registry.hpp.


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