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

# TAO_Register_Offer_Iterator Class Template Reference

An implementation of CosTrading::OfferIterator IDL interface appropriate when trader has Register functionality. More...

`#include <Offer_Iterators_T.h>`

Inheritance diagram for TAO_Register_Offer_Iterator:

[legend]
Collaboration diagram for TAO_Register_Offer_Iterator:

[legend]
List of all members.

## Public Methods
| 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. More...
virtual | ~TAO_Register_Offer_Iterator (void)
| Destructor. More...
virtual CORBA::Boolean | next_n (CORBA::ULong n, CosTrading::OfferSeq_out offers ACE_ENV_ARG_DECL_NOT_USED) throw (CORBA::SystemException)
| 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. More...
virtual CORBA::ULong | max_left (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) throw (CORBA::SystemException, CosTrading::UnknownMaxLeft)
| 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. More...
void | add_offer (CosTrading::OfferId id, const CosTrading::Offer *)
| Add an offer the iterator should iterate over. More...
## 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...

## Detailed Description

### template<class MAP_LOCK_TYPE>
class TAO_Register_Offer_Iterator< MAP_LOCK_TYPE >

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).

## Constructor & Destructor Documentation

template<class MAP_LOCK_TYPE>
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.

template<class MAP_LOCK_TYPE>
TAO_Register_Offer_Iterator< MAP_LOCK_TYPE >::~TAO_Register_Offer_Iterator | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

template<class MAP_LOCK_TYPE>
void TAO_Register_Offer_Iterator< MAP_LOCK_TYPE >::add_offer | ( | CosTrading::OfferId | id,
|  | const CosTrading::Offer * | offer
| ) | `[virtual]`

| Add an offer the iterator should iterate over. Reimplemented from TAO_Offer_Iterator.

template<class MAP_LOCK_TYPE>
CORBA::ULong TAO_Register_Offer_Iterator< MAP_LOCK_TYPE >::max_left | ( | ACE_ENV_SINGLE_ARG_DECL_NOT_USED |  | ) | throw (CORBA::SystemException, CosTrading::UnknownMaxLeft)`[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. Reimplemented from TAO_Offer_Iterator.

template<class MAP_LOCK_TYPE>
CORBA::Boolean TAO_Register_Offer_Iterator< MAP_LOCK_TYPE >::next_n | ( | CORBA::ULong | n,
|  | CosTrading::OfferSeq_out offers | ACE_ENV_ARG_DECL
| ) | throw (CORBA::SystemException)`[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. Reimplemented from TAO_Offer_Iterator.

## Member Data Documentation

template<class MAP_LOCK_TYPE>
TAO_Offer_Database<MAP_LOCK_TYPE>& TAO_Register_Offer_Iterator::db_`[private]`

| A reference to the trader is needed for access to the map of offers.

template<class MAP_LOCK_TYPE>
TAO_String_Queue TAO_Register_Offer_Iterator::offer_ids_`[private]`

| Offer ids of offers to iterate over.

The documentation for this class was generated from the following files:

- Offer_Iterators_T.h
- Offer_Iterators_T.cpp