toast::async::promise< T > Class Template Reference
[toast asynchronous library]

#include <toast/async/promise.hpp>

List of all members.


Detailed Description

template<typename T>
class toast::async::promise< T >

Represents a value that will eventually be defined.

This implements the OptionalPointee concept (http://www.boost.org/libs/utility/OptionalPointee.html) and should behave like a boost::optional, except that access is thread safe & locked, and there is only single assignment.

Public Types

typedef void(promise::* unspecified_bool_type )() const

Public Member Functions

 promise ()
 default constructor
 promise (boost::shared_ptr< detail::promise_data< T > > data)
promiseoperator= (T const &t)
 sets the value of this promise, or does nothing if the value is already set
const T & operator* () const
 get's the value
const T * operator-> () const
 get methods and attributes from underlying
 operator unspecified_bool_type () const
 caster into a bool for comparisons


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

SourceForge.net Logo