Public Member Functions

Result< T > Class Template Reference

Encapsulates a result from an operation, such as getting an object's color, executed remotely on the server. More...

Inheritance diagram for Result< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Result ()
 Create an unused result object, not associated with the result from an operation.
 Result (boost::shared_ptr< OperationResult > result)
 Create a result object from an OperationResult.
const T get_result () const
 Return a copy of the result stored in the Result object.

Detailed Description

template<class T>
class peekabot::client::Result< T >

Encapsulates a result from an operation, such as getting an object's color, executed remotely on the server.

It is built on top of Status -- which provide a mean to know whether the result is available for reading. The actual result cannot be gotten from the Result object until get_outcome() signals success.


Member Function Documentation

const T get_result (  )  const [inline]

Return a copy of the result stored in the Result object.

Exceptions:
std::logic_error Thrown if 1) the operation failed or 2) the outcome operation is still pending.
std::runtime_error Thrown if the actual type of the result and the requested type T doesn't match (this implies a bug is lurking elsewhere).

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