libqi-api  2.1.4.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
qi::FutureSync< T > Class Template Reference

#include <future.hpp>

Public Types

typedef Future< T >::ValueType ValueType
 
typedef Future< T >::ValueTypeCast ValueTypeCast
 
typedef Future< T >::Connection Connection
 

Public Member Functions

 FutureSync ()
 
 FutureSync (const Future< T > &b)
 
 FutureSync (const FutureSync< T > &b)
 
 FutureSync (const ValueType &v)
 
FutureSync< T > & operator= (const FutureSync< T > &b)
 
FutureSync< T > & operator= (const Future< T > &b)
 
 ~FutureSync ()
 
 operator Future< T > ()
 
bool operator< (const FutureSync< T > &b) const
 
const ValueTypevalue (int msecs=FutureTimeout_Infinite) const
 
 operator const typename Future< T >::ValueTypeCast & () const
 
FutureState wait (int msecs=FutureTimeout_Infinite) const
 
bool isRunning () const
 
bool isFinished () const
 
bool isCanceled () const
 
bool hasError (int msecs=FutureTimeout_Infinite) const
 
bool hasValue (int msecs=FutureTimeout_Infinite) const
 
const std::string & error (int msecs=FutureTimeout_Infinite) const
 
void cancel ()
 
bool isCancelable () const
 
void connect (const Connection &s)
 
void _connect (const boost::function< void()> &s)
 
template<typename FUNCTYPE , typename ARG0 >
void connect (FUNCTYPE fun, ARG0 tracked,...)
 
Future< T > async ()
 

Protected Attributes

bool _sync
 
Future< T > _future
 

Friends

class Future< T >
 

Detailed Description

template<typename T>
class qi::FutureSync< T >

this class allow throwing on error and being synchronous when the future is not handled by the client.

Definition at line 48 of file future.hpp.

Member Typedef Documentation

template<typename T>
typedef Future<T>::Connection qi::FutureSync< T >::Connection

Definition at line 335 of file future.hpp.

template<typename T>
typedef Future<T>::ValueType qi::FutureSync< T >::ValueType

Definition at line 333 of file future.hpp.

template<typename T>
typedef Future<T>::ValueTypeCast qi::FutureSync< T >::ValueTypeCast

Definition at line 334 of file future.hpp.

Constructor & Destructor Documentation

template<typename T>
qi::FutureSync< T >::FutureSync ( )
inline

Definition at line 337 of file future.hpp.

template<typename T>
qi::FutureSync< T >::FutureSync ( const Future< T > &  b)
inline

Definition at line 339 of file future.hpp.

template<typename T>
qi::FutureSync< T >::FutureSync ( const FutureSync< T > &  b)
inline

Definition at line 345 of file future.hpp.

template<typename T>
qi::FutureSync< T >::FutureSync ( const ValueType v)
inlineexplicit

Definition at line 352 of file future.hpp.

template<typename T>
qi::FutureSync< T >::~FutureSync ( )
inline

Definition at line 375 of file future.hpp.

Member Function Documentation

template<typename T>
void qi::FutureSync< T >::_connect ( const boost::function< void()> &  s)
inline

Definition at line 403 of file future.hpp.

template<typename T>
Future<T> qi::FutureSync< T >::async ( )
inline

Definition at line 426 of file future.hpp.

template<typename T>
void qi::FutureSync< T >::cancel ( )
inline

Definition at line 400 of file future.hpp.

template<typename T>
void qi::FutureSync< T >::connect ( const Connection s)
inline

Definition at line 402 of file future.hpp.

template<typename T>
template<typename FUNCTYPE , typename ARG0 >
void qi::FutureSync< T >::connect ( FUNCTYPE  fun,
ARG0  tracked,
  ... 
)

Connect a callback with binding and tracking support.

If the first argument is a weak_ptr or a pointer inheriting from qi::Trackable, the callback will not be called if tracked object was destroyed.

template<typename T>
const std::string& qi::FutureSync< T >::error ( int  msecs = FutureTimeout_Infinite) const
inline

Definition at line 399 of file future.hpp.

template<typename T>
bool qi::FutureSync< T >::hasError ( int  msecs = FutureTimeout_Infinite) const
inline

Definition at line 397 of file future.hpp.

template<typename T>
bool qi::FutureSync< T >::hasValue ( int  msecs = FutureTimeout_Infinite) const
inline

Definition at line 398 of file future.hpp.

template<typename T>
bool qi::FutureSync< T >::isCancelable ( ) const
inline

Definition at line 401 of file future.hpp.

template<typename T>
bool qi::FutureSync< T >::isCanceled ( ) const
inline

Definition at line 396 of file future.hpp.

template<typename T>
bool qi::FutureSync< T >::isFinished ( ) const
inline

Definition at line 395 of file future.hpp.

template<typename T>
bool qi::FutureSync< T >::isRunning ( ) const
inline

Definition at line 394 of file future.hpp.

template<typename T>
qi::FutureSync< T >::operator const typename Future< T >::ValueTypeCast & ( ) const
inline

Definition at line 392 of file future.hpp.

template<typename T>
qi::FutureSync< T >::operator Future< T > ( )
inline

Definition at line 381 of file future.hpp.

template<typename T>
bool qi::FutureSync< T >::operator< ( const FutureSync< T > &  b) const
inline

Definition at line 386 of file future.hpp.

template<typename T>
FutureSync<T>& qi::FutureSync< T >::operator= ( const FutureSync< T > &  b)
inline

Definition at line 360 of file future.hpp.

template<typename T>
FutureSync<T>& qi::FutureSync< T >::operator= ( const Future< T > &  b)
inline

Definition at line 368 of file future.hpp.

template<typename T>
const ValueType& qi::FutureSync< T >::value ( int  msecs = FutureTimeout_Infinite) const
inline

Definition at line 391 of file future.hpp.

template<typename T>
FutureState qi::FutureSync< T >::wait ( int  msecs = FutureTimeout_Infinite) const
inline

Definition at line 393 of file future.hpp.

Friends And Related Function Documentation

template<typename T>
friend class Future< T >
friend

Definition at line 435 of file future.hpp.

Member Data Documentation

template<typename T>
Future<T> qi::FutureSync< T >::_future
protected

Definition at line 434 of file future.hpp.

template<typename T>
bool qi::FutureSync< T >::_sync
mutableprotected

Definition at line 433 of file future.hpp.


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