NAME

ACE_Future - This class implements a ``single write, multiple read'' pattern that can be used to return results from asynchronous method invocations.

SYNOPSIS

#include <ace/Future.h>

template<class T> class ACE_Future { public: ACE_Future (void); ACE_Future (const ACE_Future<T> &r); ACE_Future (const T &r); ~ACE_Future (void); void operator = (const ACE_Future<T> &r); int cancel (const T &r); int cancel (void); int operator == (const ACE_Future<T> &r) const; int operator != (const ACE_Future<T> &r) const; int set (const T &r); int get (T &value, ACE_Time_Value *tv = 0); operator T (); int ready (void); int attach (ACE_Future_Observer<T> *observer); int detach (ACE_Future_Observer<T> *observer); void dump (void) const; ACE_Future_Rep<T> *get_rep (void); ACE_ALLOC_HOOK_DECLARE; private: void *operator new (size_t nbytes); void operator delete (void *); void operator & (); typedef ACE_Future_Rep<T> FUTURE_REP; FUTURE_REP *future_rep_; };

Initialization and termination methods.

ACE_Future (void);

ACE_Future (const ACE_Future<T> &r);

ACE_Future (const T &r);

~ACE_Future (void);

void operator = (const ACE_Future<T> &r);

int cancel (const T &r);

int cancel (void);

int operator == (const ACE_Future<T> &r) const;

int operator != (const ACE_Future<T> &r) const;

int set (const T &r);

int get (T &value, ACE_Time_Value *tv = 0);

operator T ();

int ready (void);

int attach (ACE_Future_Observer<T> *observer);

int detach (ACE_Future_Observer<T> *observer);

void dump (void) const;

ACE_Future_Rep<T> *get_rep (void);

ACE_ALLOC_HOOK_DECLARE;

AUTHOR (S)

Andres Kruse Andres.Kruse@cern.ch, Douglas C. Schmidt schmidt@cs.wustl.edu, Per Andersson Per.Andersson@hfera.ericsson.se, and John Tucker jtucker@infoglide.com

LIBRARY

ace