#include <Future.h>
Collaboration diagram for ACE_Future< T >:
Public Methods | |
ACE_Future (void) | |
Constructor. | |
ACE_Future (const ACE_Future< T > &r) | |
ACE_Future (const T &r) | |
~ACE_Future (void) | |
Destructor. | |
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 |
Inequality operator, which is the opposite of equality. | |
int | set (const T &r) |
int | get (T &value, ACE_Time_Value *tv=0) const |
operator T () | |
int | ready (void) const |
Check if the result is available. | |
int | attach (ACE_Future_Observer< T > *observer) |
int | detach (ACE_Future_Observer< T > *observer) |
void | dump (void) const |
Dump the state of an object. | |
ACE_Future_Rep< T > * | get_rep (void) |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Private Types | |
typedef ACE_Future_Rep< T > | FUTURE_REP |
Protect operations on the <Future>. | |
Private Attributes | |
FUTURE_REP * | future_rep_ |
|
Protect operations on the <Future>.
|
|
Constructor.
|
|
Copy constructor binds this and r to the same ACE_Future_Rep. An ACE_Future_Rep is created if necessary. |
|
Constructor that initialises an ACE_Future to point to the result r immediately. |
|
Destructor.
|
|
Attaches the specified observer to a subject (this ACE_Future). The update method of the specified subject will be invoked with a copy of the associated ACE_Future as input when the result gets set. If the result is already set when this method gets invoked, then the update method of the specified subject will be invoked immediately.
|
|
Cancel an ACE_Future. Put the future into its initial state. Returns 0 on succes and -1 on failure. It is now possible to reuse the ACE_Future. But remember, the ACE_Future is now bound to a new ACE_Future_Rep. |
|
Cancel an ACE_Future and assign the value r. It is used if a client does not want to wait for the value to be produced. |
|
Detaches the specified observer from a subject (this ACE_Future). The update method of the specified subject will not be invoked when the ACE_Future_Rep result gets set.
|
|
Dump the state of an object.
|
|
Wait to get the object's value.
|
|
Get the underlying ACE_Future_Rep pointer. Note that this method should rarely, if ever, be used and that modifying the underlying ACE_Future_Rep should be done with extreme caution. |
|
|
|
Inequality operator, which is the opposite of equality.
|
|
Assignment operator that binds this and r to the same ACE_Future_Rep. An ACE_Future_Rep is created if necessary. |
|
Equality operator that returns 1 if both ACE_Future objects point to the same ACE_Future_Rep object. Attention: It also returns 1 if both objects have just been instantiated and not used yet. |
|
Check if the result is available.
|
|
Make the result available. Is used by the server thread to give the result to all waiting clients. Returns 0 for success, -1 on failure. This function only has an effect the first time it is called for the object (actually, the first time the underlying ACE_Future_Rep has a value assigned to it). Subsequent calls return 0 (success) but have no effect. |
|
Declare the dynamic allocation hooks.
|
|
|