Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TAO_Service_Offer_Iterator Class Template Reference

TAO_Service_Offer_Iterator iterates over the set of exported offers for a given type. Handily, it takes care of all the necessary locking, acquiring them in the constructor, and releasing them in the destructor. More...

#include <Offer_Database.h>

Collaboration diagram for TAO_Service_Offer_Iterator:

Collaboration graph
[legend]
List of all members.

Public Types

typedef TAO_Offer_Database<
LOCK_TYPE > 
Offer_Database

Public Methods

 TAO_Service_Offer_Iterator (const char *type, TAO_Offer_Database< LOCK_TYPE > &offer_database)
 ~TAO_Service_Offer_Iterator (void)
 Release all the locks acquired. More...

int has_more_offers (void)
 Returns 1 if there are more offers, 0 otherwise. More...

CosTrading::OfferId get_id (void)
 Get the id for the current offer. More...

CosTrading::Offerget_offer (void)
 Returns the next offer in the series. More...

void next_offer (void)
 Advances the iterator 1. More...


Private Attributes

TAO_Offer_Database< LOCK_TYPE > & stm_
 Lock the top_level map. More...

LOCK_TYPE * lock_
 Lock for the internal map. More...

TAO_Offer_Map::iteratoroffer_iter_
 Iterator over the actual offer map. More...

const char * type_
 The name of the type. Used for constructing offer ids. More...


Detailed Description

template<class LOCK_TYPE>
class TAO_Service_Offer_Iterator< LOCK_TYPE >

TAO_Service_Offer_Iterator iterates over the set of exported offers for a given type. Handily, it takes care of all the necessary locking, acquiring them in the constructor, and releasing them in the destructor.


Member Typedef Documentation

template<class LOCK_TYPE>
typedef TAO_Offer_Database<LOCK_TYPE> TAO_Service_Offer_Iterator::Offer_Database
 


Constructor & Destructor Documentation

template<class LOCK_TYPE>
TAO_Service_Offer_Iterator< LOCK_TYPE >::TAO_Service_Offer_Iterator const char *    type,
TAO_Offer_Database< LOCK_TYPE > &    offer_database
 

template<class LOCK_TYPE>
TAO_Service_Offer_Iterator< LOCK_TYPE >::~TAO_Service_Offer_Iterator void   
 

Release all the locks acquired.


Member Function Documentation

template<class LOCK_TYPE>
CosTrading::OfferId TAO_Service_Offer_Iterator< LOCK_TYPE >::get_id void   
 

Get the id for the current offer.

template<class LOCK_TYPE>
CosTrading::Offer * TAO_Service_Offer_Iterator< LOCK_TYPE >::get_offer void   
 

Returns the next offer in the series.

template<class LOCK_TYPE>
int TAO_Service_Offer_Iterator< LOCK_TYPE >::has_more_offers void   
 

Returns 1 if there are more offers, 0 otherwise.

template<class LOCK_TYPE>
void TAO_Service_Offer_Iterator< LOCK_TYPE >::next_offer void   
 

Advances the iterator 1.


Member Data Documentation

template<class LOCK_TYPE>
LOCK_TYPE* TAO_Service_Offer_Iterator::lock_ [private]
 

Lock for the internal map.

template<class LOCK_TYPE>
TAO_Offer_Map::iterator* TAO_Service_Offer_Iterator::offer_iter_ [private]
 

Iterator over the actual offer map.

template<class LOCK_TYPE>
TAO_Offer_Database<LOCK_TYPE>& TAO_Service_Offer_Iterator::stm_ [private]
 

Lock the top_level map.

template<class LOCK_TYPE>
const char* TAO_Service_Offer_Iterator::type_ [private]
 

The name of the type. Used for constructing offer ids.


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 22:24:01 2002 for TAO_CosTrader by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001