libqi-api  2.4.3.28
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
future_fwd.hpp File Reference
#include <qi/api.hpp>
#include <vector>
#include <qi/atomic.hpp>
#include <qi/config.hpp>
#include <qi/trackable.hpp>
#include <qi/clock.hpp>
#include <qi/detail/mpl.hpp>
#include <qi/anyvalue.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/thread/recursive_mutex.hpp>

Go to the source code of this file.

Classes

struct  qi::detail::FutureType< T >
 
struct  qi::detail::FutureHasNoValue
 
struct  qi::detail::FutureType< void >
 
class  qi::detail::AddUnwrap< T >
 
class  qi::Future< T >
 
class  qi::FutureSync< T >
 
class  qi::Promise< T >
 
class  qi::detail::FutureBaseTyped< T >
 
class  qi::FutureException
 
class  qi::FutureUserException
 
class  qi::Future< T >
 
class  qi::FutureSync< T >
 
class  qi::Promise< T >
 
struct  qi::FutureValueConverter< FT, PT >
 Specialize this struct to provide conversion between future values. More...
 

Namespaces

 qi
 
 qi::detail
 

Macros

#define _QI_FUTURE_HPP_
 
#define genCall(n, ATYPEDECL, ATYPES, ADECL, AUSE, comma)
 

Typedefs

typedef void * qi::FutureUniqueId
 

Enumerations

enum  qi::FutureState {
  qi::FutureState_None, qi::FutureState_Running, qi::FutureState_Canceled, qi::FutureState_FinishedWithError,
  qi::FutureState_FinishedWithValue
}
 
enum  qi::FutureCallbackType { qi::FutureCallbackType_Sync = 0, qi::FutureCallbackType_Async = 1 }
 
enum  qi::FutureTimeout { qi::FutureTimeout_Infinite = ((int) 0x7fffffff), qi::FutureTimeout_None = 0 }
 

Functions

template<typename FT >
void qi::detail::futureCancelAdapter (boost::weak_ptr< detail::FutureBaseTyped< FT > > wf)
 
template<typename T >
qi::Future< T > qi::makeFutureError (const std::string &error)
 Helper function to return a future with the error set. More...
 
template<typename T >
void qi::PromiseNoop (qi::Promise< T > &)
 Helper function that does nothing on future cancelation. More...
 
template<typename R >
void qi::adaptFutureUnwrap (Future< AnyReference > &f, Promise< R > &p)
 Feed a promise from a generic future which may be unwrapped if it contains itself a future. More...
 
template<typename FT , typename PT >
void qi::adaptFuture (const Future< FT > &f, Promise< PT > &p)
 Feed a promise from a future of possibly different type. More...
 
template<typename R >
void qi::adaptFuture (Future< AnyReference > &f, Promise< R > &p)
 
template<typename FT , typename PT , typename CONV >
void qi::adaptFuture (const Future< FT > &f, Promise< PT > &p, CONV converter)
 Similar to adaptFuture(f, p) but with a custom converter. More...
 
template<typename T >
boost::function< void()> qi::makeCanceler (Future< T > &future)
 

Macro Definition Documentation

#define _QI_FUTURE_HPP_

Definition at line 8 of file future_fwd.hpp.

#define genCall (   n,
  ATYPEDECL,
  ATYPES,
  ADECL,
  AUSE,
  comma 
)
Value:
template <typename R, typename AF, typename ARG0 comma ATYPEDECL> \
Future<R> thenR(const AF& func, const ARG0& arg0 comma ADECL) \
{ \
return this->thenR<R>(FutureCallbackType_Async, func, arg0 comma AUSE); \
} \
template <typename R, typename AF, typename ARG0 comma ATYPEDECL> \
Future<R> thenR(FutureCallbackType type, const AF& func, \
const ARG0& arg0 comma ADECL) \
{ \
return _thenMaybeActor<R, ARG0>( \
arg0, ::qi::bind<R(const Future<T>&)>(func, arg0 comma AUSE), type); \
}
FutureCallbackType
Definition: future_fwd.hpp:83

Definition at line 337 of file future_fwd.hpp.