LeechCraft  0.6.70-3565-g2d86529
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LeechCraft::Util::detail::Sequencer< Executor, Args > Class Template Reference

Incapsulates the sequencing logic of asynchronous actions. More...

#include "futures.h"

+ Inheritance diagram for LeechCraft::Util::detail::Sequencer< Executor, Args >:
+ Collaboration diagram for LeechCraft::Util::detail::Sequencer< Executor, Args >:

Public Types

using FutureType_t = typename std::result_of< Executor(Args...)>::type
 The result of calling Executor with Args. More...
 
using RetType_t = UnwrapFutureType_t< FutureType_t >
 The type instantinating the QFuture returned by the Executor. More...
 

Public Member Functions

 Sequencer (Executor f, Args...args, QObject *parent)
 Constructs the sequencer. More...
 

Detailed Description

template<typename Executor, typename... Args>
class LeechCraft::Util::detail::Sequencer< Executor, Args >

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
ExecutorThe type of the initial functor in the async call chain.
ArgsThe types of the arguments that should be passed to the Executor.

Definition at line 148 of file futures.h.

Member Typedef Documentation

template<typename Executor, typename... Args>
using LeechCraft::Util::detail::Sequencer< Executor, Args >::FutureType_t = typename std::result_of<Executor (Args...)>::type

The result of calling Executor with Args.

Definition at line 153 of file futures.h.

template<typename Executor, typename... Args>
using LeechCraft::Util::detail::Sequencer< Executor, Args >::RetType_t = UnwrapFutureType_t<FutureType_t>

The type instantinating the QFuture returned by the Executor.

Definition at line 158 of file futures.h.

Constructor & Destructor Documentation

template<typename Executor, typename... Args>
LeechCraft::Util::detail::Sequencer< Executor, Args >::Sequencer ( Executor  f,
Args...  args,
QObject *  parent 
)
inline

Constructs the sequencer.

Parameters
[in]fThe first action in the chain.
[in]argsThe arguments to the action.
[in]parentThe parent object for the sequencer.

Definition at line 170 of file futures.h.


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