A proxy object allowing type-checked sequencing of actions and responsible for starting the initial action.
More...
template<typename Ret, typename Future, typename DestructionTag>
class LeechCraft::Util::detail::SequenceProxy< Ret, Future, DestructionTag >
A proxy object allowing type-checked sequencing of actions and responsible for starting the initial action.
SequenceProxy manages a Sequencer object, which itself is directly responsible for walking the chain of sequenced actions.
Internally, objects of this class are reference-counted. As soon as the last instance is destroyed, the initial action is started.
- Template Parameters
-
Ret | The type T that QFuture<T> returned by the last chained executor is specialized with. |
E0 | The type of the first executor. |
A0 | The types of the arguments to the executor E0. |
Definition at line 422 of file futures.h.
template<typename Ret , typename Future , typename DestructionTag >
template<typename F >
Adds the functor f to the chain of actions.
The functor f should return QFuture<T0>
when called with a value of type Ret. That is, the expression f (std::declval<Ret> ())
should be well-formed, and, moreover, its return type should be QFuture<T0> for some T0.
- Parameters
-
[in] | f | The functor to chain. |
- Returns
- An object of type
SequencerProxy<T0, E0, A0>
ready for chaining new functions.
- Template Parameters
-
F | The type of the functor to chain. |
Definition at line 484 of file futures.h.
template<typename Ret , typename Future , typename DestructionTag >
template<typename F >
Adds the funtor f to the chain of actions and closes the chain.
The function f should return void
when called with a value of type Ret.
No more functors may be chained after adding a void
-returning functor.
- Parameters
-
[in] | f | The functor to chain. |
- Template Parameters
-
F | The type of the functor to chain. |
Definition at line 506 of file futures.h.