Lunchbox  1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lunchbox::Request< T > Class Template Reference

A Future implementation for a RequestHandler request. More...

#include <request.h>

+ Inheritance diagram for lunchbox::Request< T >:
+ Collaboration diagram for lunchbox::Request< T >:

Classes

class  Impl
 

Public Member Functions

 Request (RequestHandler &handler, const uint32_t request)
 Construct a new request. More...
 
virtual ~Request ()
 Destruct and wait for completion of the request, unless relinquished. More...
 
uint32_t getID () const
 
void relinquish ()
 Abandon the request. More...
 
- Public Member Functions inherited from lunchbox::Future< T >
 Future (Impl impl)
 Construct a new future. More...
 
 ~Future ()
 Destruct the future. More...
 
wait (const uint32_t timeout_=LB_TIMEOUT_INDEFINITE)
 Wait for the promise to be fullfilled. More...
 
bool isReady () const
 
 operator bool_t ()
 
bool operator! ()
 
bool operator== (const T &rhs)
 
bool operator!= (const T &rhs)
 
bool operator< (const T &rhs)
 
bool operator> (const T &rhs)
 
bool operator<= (const T &rhs)
 
bool operator>= (const T &rhs)
 

Additional Inherited Members

- Public Types inherited from lunchbox::Future< T >
typedef RefPtr< FutureImpl< T > > Impl
 The wait implementation.
 
- Protected Attributes inherited from lunchbox::Future< T >
Impl impl_
 

Detailed Description

template<class T>
class lunchbox::Request< T >

A Future implementation for a RequestHandler request.

Version
1.9.1

Definition at line 32 of file request.h.

Constructor & Destructor Documentation

template<class T >
lunchbox::Request< T >::Request ( RequestHandler handler,
const uint32_t  request 
)
inline

Construct a new request.

Definition at line 127 of file request.h.

template<class T >
lunchbox::Request< T >::~Request ( )
inlinevirtual

Destruct and wait for completion of the request, unless relinquished.

Version
1.9.1

Definition at line 131 of file request.h.

Member Function Documentation

template<class T >
uint32_t lunchbox::Request< T >::getID ( ) const
inline
Returns
the identifier of the request.
Version
1.9.1

Definition at line 137 of file request.h.

template<class T >
void lunchbox::Request< T >::relinquish ( )
inline

Abandon the request.

If called, wait will not be called at destruction and wait() will throw. If the future has already been resolved this function has no effect.

Version
1.9.1

Definition at line 142 of file request.h.


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