MADNESS  version 0.9
Public Member Functions | List of all members
madness::Future< detail::ReferenceWrapper< T > > Class Template Reference

Future for holding ReferenceWrapper objects. More...

#include <ref.h>

Public Member Functions

 Future (const detail::ReferenceWrapper< T > &ref)
 Constructor. More...
 
bool probe () const
 Probe set state of the future. More...
 
void register_callback (CallbackInterface *callback)
 Register a callback. More...
 
 operator T & () const
 Type convertion to the type being referenced. More...
 

Detailed Description

template<typename T>
class madness::Future< detail::ReferenceWrapper< T > >

Future for holding ReferenceWrapper objects.

This is not a standard future. It is intended to hold a ReferenceWapper in a task function. This avoids the coping data into the task.

Template Parameters
TThe type held by the reference

Constructor & Destructor Documentation

template<typename T >
madness::Future< detail::ReferenceWrapper< T > >::Future ( const detail::ReferenceWrapper< T > &  ref)
inline

Constructor.

Construct a future with a reference wrapper object

Member Function Documentation

template<typename T >
madness::Future< detail::ReferenceWrapper< T > >::operator T & ( ) const
inline

Type convertion to the type being referenced.

References madness::detail::ReferenceWrapper< T >::get().

template<typename T >
bool madness::Future< detail::ReferenceWrapper< T > >::probe ( ) const
inline

Probe set state of the future.

Returns
true
template<typename T >
void madness::Future< detail::ReferenceWrapper< T > >::register_callback ( CallbackInterface callback)
inline

Register a callback.

Since this future will never be unset, the callback notify function will always be immediately invocked and return.

Parameters
callbackThe callback object pointer

References madness::CallbackInterface::notify().


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