|
| Sequencer (const Future &future, QObject *parent) |
| Constructs the sequencer. More...
|
|
void | Start () |
| Starts the first action in the chain. More...
|
|
template<typename RetT , typename ArgT > |
void | Then (const std::function< QFuture< RetT >(ArgT)> &action) |
| Chains the given asynchronous action. More...
|
|
template<typename ArgT > |
void | Then (const std::function< void(ArgT)> &action) |
| Chains the given asynchronous action and closes the chain. More...
|
|
void | Then (const std::function< void()> &action) |
|
template<typename Future>
class LeechCraft::Util::detail::Sequencer< Future >
Incapsulates the sequencing logic of asynchronous actions.
The objects of this class are expected to be created on heap. They will delete themselves automatically after the chain is walked (or an exception is thrown).
- Template Parameters
-
Executor | The type of the initial functor in the async call chain. |
Args | The types of the arguments that should be passed to the Executor. |
Definition at line 237 of file futures.h.
template<typename Future>
template<typename RetT , typename ArgT >
Chains the given asynchronous action.
The action is a functor callable with a single parameter of type ArgT and returning a value of type QFuture<RetT>
for some RetT.
The parameter type ArgT should match exactly the "unwrapped" RetT for the previous call of Then() (or RetType_t if this is the second action in the asynchronous chain). Otherwise, an exception will be thrown at runtime.
- Note
- The SequenceProxy class takes care of compile-time type-checking of arguments and return types.
- Parameters
-
[in] | action | The action to add to the sequence chain. |
- Template Parameters
-
RetT | The type instantiating the return type QFuture<RetT> of the action. |
ArgT | The type of the argument passed to the action. |
Definition at line 293 of file futures.h.
template<typename Future>
template<typename ArgT >
Chains the given asynchronous action and closes the chain.
The action is a functor callable with a single parameter of type ArgT and returning void
.
No more functors may be chained after adding a void
-returning functor.
The parameter type ArgT should match exactly the "unwrapped" RetT for the previous call of Then() (or RetType_t if this is the second action in the asynchronous chain). Otherwise, an exception will be thrown at runtime.
- Note
- The SequenceProxy class takes care of compile-time type-checking of arguments and return types.
- Template Parameters
-
ArgT | The type of the argument passed to the action. |
Definition at line 340 of file futures.h.