Lunchbox  1.13.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
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 unregister ()
 Unregister this request from the request handler. 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 39 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 154 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 158 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 164 of file request.h.

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

Unregister this request from the request handler.

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.13

Definition at line 169 of file request.h.


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