fesa-core  4.2.0
fesa::AsyncGetCallback Class Reference

#include <AsyncGetCallback.h>

Inherits AsyncGetCallback, and noncopyable.

Public Member Functions

 AsyncGetCallback (boost::shared_ptr< Semaphore > &semaphore)
 
bool isCompleted () const
 
bool isSuccessful () const
 
const
cmw::rda3::common::AcquiredData & 
getData () const
 
std::auto_ptr
< cmw::rda3::common::AcquiredData > 
releaseData ()
 
const
cmw::rda3::common::RdaException & 
getException () const
 
std::auto_ptr
< cmw::rda3::common::RdaException > 
releaseException ()
 

Detailed Description

Simple implementation of RDA3's AsyncGetCallback, with the optional ability of posting to a semaphore when a callback (successful or not) is received.

Constructor & Destructor Documentation

fesa::AsyncGetCallback::AsyncGetCallback ( boost::shared_ptr< Semaphore > &  semaphore)
explicit

Calling this constructor will cause callbacks to call post() on semaphore.

Member Function Documentation

const cmw::rda3::common::AcquiredData & fesa::AsyncGetCallback::getData ( ) const

Returns a reference to the data received.

Exceptions
FesaExceptionif isSuccessful() is false or if the data was released.
const cmw::rda3::common::RdaException & fesa::AsyncGetCallback::getException ( ) const

Returns a reference to the exception received.

Exceptions
FesaExceptionif isSuccessful() is true or if the exception was released.
bool fesa::AsyncGetCallback::isCompleted ( ) const

Returns true if the request is completed, whether it was successful or not.

bool fesa::AsyncGetCallback::isSuccessful ( ) const

Returns true if the request is completed and successful, false otherwise.

std::auto_ptr< cmw::rda3::common::AcquiredData > fesa::AsyncGetCallback::releaseData ( )

Returns an auto_ptr containing the received data. The data is not owned by this object any more, which is reset to its initial state.

std::auto_ptr< cmw::rda3::common::RdaException > fesa::AsyncGetCallback::releaseException ( )

Returns an auto_ptr containing the received exception. The exception is not owned by this object any more, which is reset to its initial state. calls to getException() will throw.


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