Lunchbox  1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lunchbox::Request< T >::Impl Class Reference
+ Inheritance diagram for lunchbox::Request< T >::Impl:
+ Collaboration diagram for lunchbox::Request< T >::Impl:

Public Member Functions

 Impl (RequestHandler &handler, const uint32_t req)
 
void relinquish ()
 
bool isRelinquished () const
 
- Public Member Functions inherited from lunchbox::FutureImpl< T >
virtual ~FutureImpl ()
 Destruct the future. More...
 
- Public Member Functions inherited from lunchbox::Referenced
void ref (const void *holder LB_UNUSED=0) const
 Increase the reference count. More...
 
bool unref (const void *holder LB_UNUSED=0) const
 Decrease the reference count. More...
 
int32_t getRefCount () const
 
void printHolders (std::ostream &) const
 

Public Attributes

const uint32_t request
 
value_t result
 

Protected Member Functions

wait (const uint32_t timeout) final
 Wait for the promise to be fullfilled. More...
 
bool isReady () const final
 
template<>
void wait (const uint32_t timeout)
 Wait for the promise to be fullfilled. More...
 
- Protected Member Functions inherited from lunchbox::Referenced
LUNCHBOX_API Referenced ()
 Construct a new reference-counted object. More...
 
 Referenced (const Referenced &)
 Construct a new copy of a reference-counted object. More...
 
virtual LUNCHBOX_API ~Referenced ()
 Destruct a reference-counted object. More...
 
Referencedoperator= (const Referenced &)
 Assign another object to this object. More...
 
virtual LUNCHBOX_API void notifyFree ()
 

Detailed Description

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

Definition at line 66 of file request.h.

Member Function Documentation

template<class T>
bool lunchbox::Request< T >::Impl::isReady ( ) const
inlinefinalprotectedvirtual
Returns
true if the future has been fulfilled, false if it is pending.

Implements lunchbox::FutureImpl< T >.

Definition at line 102 of file request.h.

template<class T>
T lunchbox::Request< T >::Impl::wait ( const uint32_t  timeout)
inlinefinalprotectedvirtual

Wait for the promise to be fullfilled.

May be called multiple times.

Parameters
timeoutoptional timeout in milliseconds. If the future is not ready when the timer goes off a timeout exception is thrown.

Implements lunchbox::FutureImpl< T >.

Definition at line 88 of file request.h.

template<>
void lunchbox::Request::Impl< void >::wait ( const uint32_t  timeout)
inlineprotectedvirtual

Wait for the promise to be fullfilled.

May be called multiple times.

Parameters
timeoutoptional timeout in milliseconds. If the future is not ready when the timer goes off a timeout exception is thrown.

Implements lunchbox::FutureImpl< T >.

Definition at line 113 of file request.h.

References lunchbox::RequestHandler::waitRequest().

+ Here is the call graph for this function:


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