![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/iter-explorer.hpp"
technical details of binding a functor into the IterExplorer. Notably, this happens when adapting an _"expansion functor"_ to allow expanding a given element from the TreeExploer (iterator) into a sequence of child elements. A quite similar situation arises when binding a transformation function to be mapped onto each result element.
The IterExplorer::expand() operation accepts various flavours of functors, and depending on the signature of such a functor, an appropriate adapter will be constructed here, allowing to write a generic Expander::expandChildren() operation. The following details are handled here:
SRC. Thus we instantiate a templated functor with this argument type to find out about its result type (and this instantiation may fail)| FUN | either the signature, or something _"function-like"_ passed as functor to be bound |
| SRC | source type to feed to the function to be adapted. |
SRC& as argument. This instantiation may fail (and abort compilation), but when it succeeds, the result type Res can be inferred from the generic lambda. Definition at line 386 of file iter-explorer.hpp.
Classes | |
| struct | ArgAdapter |
| adapt to a functor, which accesses the source iterator or embedded "state core" More... | |
| struct | ArgAdapter< IT, enable_if< __and_< is_base_of< IterSource< typename IT::value_type >, typename IT::Source >, is_base_of< IterSource< typename IT::value_type >, remove_reference_t< Arg > > > > > |
| adapt to a functor collaborating with an IterSource based iterator pipeline More... | |
| struct | ArgAdapter< IT, enable_if< __and_< is_convertible< iter::Yield< IT >, Arg >, __not_< is_convertible< IT, Arg > > > > > |
| adapt to a functor, which accepts the value type of the source sequence ("monadic" usage pattern) More... | |
| struct | FunDetector |
| handle all regular "function-like" entities More... | |
| struct | FunDetector< F, disable_if< _Fun< F > > > |
handle a generic lambda, accepting a reference to the SRC iterator More... | |
Public Types | |
| using | Sig = FunDetector< FUN >::Sig |
| using | Arg = _Fun< Sig >::Args::List::Head |
| using | Res = _Fun< Sig >::Ret |
Static Public Member Functions | |
| static auto | adaptFunctor (FUN &&rawFunctor) |
| builder to create a nested/wrapping functor, suitably adapting the arguments | |
| struct lib::iter_explorer::_FunTraits::FunDetector |
| Class Members | ||
|---|---|---|
| typedef Sig | Sig | |
Collaboration diagram for _FunTraits< FUN, SRC >::FunDetector< F, SEL >:| using Sig = FunDetector<FUN>::Sig |
Definition at line 405 of file iter-explorer.hpp.
Definition at line 406 of file iter-explorer.hpp.
Definition at line 407 of file iter-explorer.hpp.
|
inlinestatic |
builder to create a nested/wrapping functor, suitably adapting the arguments
Definition at line 458 of file iter-explorer.hpp.
References _FunTraits< FUN, SRC >::ArgAdapter< ARG, SEL >::wrap().
Here is the call graph for this function:
Collaboration diagram for _FunTraits< FUN, SRC >: