TAO_CosTrader  2.0.6
Public Types | Public Member Functions | Private Attributes
TAO_Service_Offer_Iterator Class 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 Member Functions

 TAO_Service_Offer_Iterator (const char *type, TAO_Offer_Database< LOCK_TYPE > &offer_database)
 ~TAO_Service_Offer_Iterator (void)
 Release all the locks acquired.
int has_more_offers (void)
 Returns 1 if there are more offers, 0 otherwise.
CosTrading::OfferId get_id (void)
 Get the id for the current offer.
CosTrading::Offerget_offer (void)
 Returns the next offer in the series.
void next_offer (void)
 Advances the iterator 1.

Private Attributes

TAO_Offer_Database< LOCK_TYPE > & stm_
 Lock the top_level map.
LOCK_TYPE * lock_
 Lock for the internal map.
TAO_Offer_Map::iteratoroffer_iter_
 Iterator over the actual offer map.
const char * type_
 The name of the type. Used for constructing offer ids.

Detailed Description

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


Constructor & Destructor Documentation

TAO_Service_Offer_Iterator::TAO_Service_Offer_Iterator ( const char *  type,
TAO_Offer_Database< LOCK_TYPE > &  offer_database 
)
TAO_Service_Offer_Iterator::~TAO_Service_Offer_Iterator ( void  )

Release all the locks acquired.


Member Function Documentation

CosTrading::OfferId TAO_Service_Offer_Iterator::get_id ( void  )

Get the id for the current offer.

CosTrading::Offer * TAO_Service_Offer_Iterator::get_offer ( void  )

Returns the next offer in the series.

int TAO_Service_Offer_Iterator::has_more_offers ( void  )

Returns 1 if there are more offers, 0 otherwise.

void TAO_Service_Offer_Iterator::next_offer ( void  )

Advances the iterator 1.


Member Data Documentation

LOCK_TYPE* TAO_Service_Offer_Iterator::lock_ [private]

Lock for the internal map.

Iterator over the actual offer map.

Lock the top_level map.

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines