TAO_CosTrader
2.1.8
|
An implementation of CosTrading::OfferIterator IDL interface appropriate when trader has Register functionality. More...
#include <Offer_Iterators_T.h>
Public Member Functions | |
TAO_Register_Offer_Iterator (TAO_Offer_Database< MAP_LOCK_TYPE > &db, const TAO_Property_Filter &pfilter) | |
virtual | ~TAO_Register_Offer_Iterator (void) |
Destructor. More... | |
virtual CORBA::Boolean | next_n (CORBA::ULong n, CosTrading::OfferSeq_out offers) |
virtual CORBA::ULong | max_left (void) |
void | add_offer (CosTrading::OfferId id, const CosTrading::Offer *) |
Add an offer the iterator should iterate over. More... | |
Public Member Functions inherited from TAO_Offer_Iterator | |
TAO_Offer_Iterator (const TAO_Property_Filter &property_filter) | |
virtual | ~TAO_Offer_Iterator (void) |
virtual void | destroy (void) |
Private Attributes | |
TAO_Offer_Database < MAP_LOCK_TYPE > & | db_ |
A reference to the trader is needed for access to the map of offers. More... | |
TAO_String_Queue | offer_ids_ |
Offer ids of offers to iterate over. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from TAO_Offer_Iterator | |
TAO_Offer_Iterator & | operator= (const TAO_Offer_Iterator &) |
Protected Attributes inherited from TAO_Offer_Iterator | |
TAO_Property_Filter | pfilter_ |
An implementation of CosTrading::OfferIterator IDL interface appropriate when trader has Register functionality.
Stores ids of offers to be iterated over. Before returning an offer, checks if the offer is still there (since it may have been removed by the Register).
TAO_Register_Offer_Iterator< MAP_LOCK_TYPE >::TAO_Register_Offer_Iterator | ( | TAO_Offer_Database< MAP_LOCK_TYPE > & | db, |
const TAO_Property_Filter & | pfilter | ||
) |
Takes service type and trader reference in order to later locate offers using their ids.
|
virtual |
Destructor.
|
virtual |
Add an offer the iterator should iterate over.
Implements TAO_Offer_Iterator.
|
virtual |
Throws CosTrading::UnknownMaxLeft since with the presence of "Register" functionality, the iterator cannot guarantee that the trader will have all the offers it has now when the time to return them comes.
Implements TAO_Offer_Iterator.
|
virtual |
Deposit at maximum n offers into the return sequence and return 1, or return 0 if the iterator is done and no offers are returned.
Implements TAO_Offer_Iterator.
|
private |
A reference to the trader is needed for access to the map of offers.
|
private |
Offer ids of offers to iterate over.