Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
qpid::client::TypedResult Class Reference

Returned by asynchronous commands that return a result. More...

#include <qpid/client/TypedResult.h>

List of all members.

Public Member Functions

 TypedResult (const Completion &c)
T & get ()
 Wait for the asynchronous command that returned this TypedResult to complete and return its result.
void wait ()
 Wait for the asynchronous command that returned this Completion to complete.
bool isComplete ()
QPID_CLIENT_INLINE_EXTERN bool isValid () const
QPID_CLIENT_INLINE_EXTERN bool isNull () const
QPID_CLIENT_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_CLIENT_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Member Functions

std::string getResult ()

Protected Attributes

Impl * impl

Detailed Description

Returned by asynchronous commands that return a result.

You can use get() to wait for completion and get the result value.


Constructor & Destructor Documentation

qpid::client::TypedResult::TypedResult ( const Completion c) [inline]

Definition at line 43 of file TypedResult.h.


Member Function Documentation

T& qpid::client::TypedResult::get ( ) [inline]

Wait for the asynchronous command that returned this TypedResult to complete and return its result.

Returns:
The result returned by the command.
Exceptions:
Ifthe command returns an error, get() throws an exception.

Definition at line 53 of file TypedResult.h.

References qpid::framing::StructHelper::decode(), and qpid::client::Completion::getResult().

std::string qpid::client::Completion::getResult ( ) [protected, inherited]

Referenced by get().

bool qpid::client::Completion::isComplete ( ) [inherited]
QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN qpid::client::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

void qpid::client::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.

void qpid::client::Completion::wait ( ) [inherited]

Wait for the asynchronous command that returned this Completion to complete.

Exceptions:
Ifthe command returns an error.

Member Data Documentation

Impl* qpid::client::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


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

Qpid C++ API Reference
Generated on Thu Aug 23 2012 for Qpid C++ Client API by doxygen 1.7.5