Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Future_Set Class Template Reference

This class implements a mechanism which allows the values of a collections of objects to be accessed by reader threads as they become available. More...

#include <Future_Set.h>

Inheritance diagram for ACE_Future_Set

Inheritance graph
[legend]
Collaboration diagram for ACE_Future_Set:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_Future_Set (ACE_Message_Queue<ACE_SYNCH> *future_notification_queue_ = 0)
 Constructor.

 ~ACE_Future_Set (void)
 Destructor.

int is_empty (void) const
 Return 1 if their are no objects left on its queue and 0 otherwise.

int insert (ACE_Future<T> &future)
int next_readable (ACE_Future<T> &result, ACE_Time_Value *tv = 0)
virtual void update (const ACE_Future<T> &future)
 Called by the subject in which we are subscribed to when its value is written to.


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.


Private Types

typedef ACE_Future<T> FUTURE
typedef ACE_Future_Rep<T> FUTURE_REP
typedef ACE_Future_Holder<T> FUTURE_HOLDER
typedef ACE_Pointer_Hash<FUTURE_REP *> FUTURE_REP_HASH
typedef ACE_Equal_To<FUTURE_REP *> FUTURE_REP_COMPARE
typedef ACE_Hash_Map_Manager_Ex<
FUTURE_REP *, FUTURE_HOLDER *,
FUTURE_REP_HASH, FUTURE_REP_COMPARE,
ACE_Null_Mutex
FUTURE_HASH_MAP

Private Methods

void operator= (const ACE_Future_Set<T> &)
 ACE_Future_Set (const ACE_Future_Set<T> &)

Private Attributes

FUTURE_HASH_MAP future_map_
 Map of , subjects, which have not been written to by client's writer thread.

ACE_Message_Queue<ACE_SYNCH>* future_notification_queue_
 Message queue for notifying the reader thread of which have been written to by client's writer thread.

int delete_queue_
 Keeps track of whether we need to delete the message queue.


Detailed Description

template<class T> template class ACE_Future_Set

This class implements a mechanism which allows the values of a collections of objects to be accessed by reader threads as they become available.


Member Typedef Documentation

template<classT>
typedef ACE_Future<T> ACE_Future_Set<T>::FUTURE [private]
 

template<classT>
typedef ACE_Hash_Map_Manager_Ex<FUTURE_REP *, FUTURE_HOLDER *, FUTURE_REP_HASH, FUTURE_REP_COMPARE, ACE_Null_Mutex> ACE_Future_Set<T>::FUTURE_HASH_MAP [private]
 

template<classT>
typedef ACE_Future_Holder<T> ACE_Future_Set<T>::FUTURE_HOLDER [private]
 

template<classT>
typedef ACE_Future_Rep<T> ACE_Future_Set<T>::FUTURE_REP [private]
 

template<classT>
typedef ACE_Equal_To<FUTURE_REP *> ACE_Future_Set<T>::FUTURE_REP_COMPARE [private]
 

template<classT>
typedef ACE_Pointer_Hash<FUTURE_REP *> ACE_Future_Set<T>::FUTURE_REP_HASH [private]
 


Constructor & Destructor Documentation

template<classT>
ACE_Future_Set<T>::ACE_Future_Set<T> ( ACE_Message_Queue< ACE_SYNCH >* future_notification_queue_ = 0 ) [inline]
 

Constructor.

template<classT>
ACE_Future_Set<T>::~ACE_Future_Set<T> ( void )
 

Destructor.

template<classT>
ACE_Future_Set<T>::ACE_Future_Set<T> ( const ACE_Future_Set< T >& ) [private]
 


Member Function Documentation

template<classT>
int ACE_Future_Set<T>::insert ( ACE_Future< T >& future )
 

Enqueus the given into this objects queue when it is readable.

Returns 0 if the future is successfully inserted, 1 if the future is already inserted, and -1 if failures occur.

template<classT>
int ACE_Future_Set<T>::is_empty ( void ) const
 

Return 1 if their are no objects left on its queue and 0 otherwise.

template<classT>
int ACE_Future_Set<T>::next_readable ( ACE_Future< T >& result,
ACE_Time_Value * tv = 0 )
 

Wait up to <tv> time to get the <value>. Note that <tv> must be specified in absolute time rather than relative time.); get the next that is readable. If <tv> = 0, the will block forever.

If a readable future becomes available, then the input result will be assigned with it and 1 will will be returned. If the set is empty, then 0 is returned.

template<classT>
void ACE_Future_Set<T>::operator= ( const ACE_Future_Set< T >& ) [private]
 

template<classT>
void ACE_Future_Set<T>::update ( const ACE_Future< T >& future ) [virtual]
 

Called by the subject in which we are subscribed to when its value is written to.

Reimplemented from ACE_Future_Observer.


Member Data Documentation

template<classT>
ACE_Future_Set<T>::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Reimplemented from ACE_Future_Observer.

template<classT>
int ACE_Future_Set<T>::delete_queue_ [private]
 

Keeps track of whether we need to delete the message queue.

template<classT>
FUTURE_HASH_MAP ACE_Future_Set<T>::future_map_ [private]
 

Map of , subjects, which have not been written to by client's writer thread.

template<classT>
ACE_Message_Queue< ACE_SYNCH >* ACE_Future_Set<T>::future_notification_queue_ [private]
 

Message queue for notifying the reader thread of which have been written to by client's writer thread.


The documentation for this class was generated from the following files:
Generated at Fri Oct 5 07:02:10 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000