ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > Class Template Reference

Base iterator for the ACE_Hash_Map_Manager_Ex. More...

#include <Hash_Map_Manager_T.h>

Inheritance diagram for ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef ACE_Hash_Map_Manager_Ex<
EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
container_type
typedef container_type::value_type value_type
typedef container_type::reference reference
typedef container_type::pointer pointer
typedef container_type::difference_type difference_type

Public Member Functions

 ACE_Hash_Map_Iterator_Base_Ex (ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &mm, bool head)
 Contructor.
 ACE_Hash_Map_Iterator_Base_Ex (ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &mm, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *entry, size_t index)
 Contructor.
int next (ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&next_entry) const
int done (void) const
 Returns 1 when all items have been seen, else 0.
ACE_Hash_Map_Entry< EXT_ID,
INT_ID > & 
operator * (void) const
 Returns a reference to the interal element this is pointing to.
ACE_Hash_Map_Entry< EXT_ID,
INT_ID > * 
operator-> (void) const
 Returns a pointer to the interal element this is pointing to.
ACE_Hash_Map_Manager_Ex< EXT_ID,
INT_ID, HASH_KEY, COMPARE_KEYS,
ACE_LOCK > & 
map (void)
bool operator== (const ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &) const
 Check if two iterators point to the same position.
bool operator!= (const ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &) const

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.

Protected Member Functions

int forward_i (void)
int reverse_i (void)
void dump_i (void) const
 Dump the state of an object.

Protected Attributes

ACE_Hash_Map_Manager_Ex< EXT_ID,
INT_ID, HASH_KEY, COMPARE_KEYS,
ACE_LOCK > * 
map_man_
 Map we are iterating over.
ssize_t index_
 Keeps track of how far we've advanced in the table.
ACE_Hash_Map_Entry< EXT_ID,
INT_ID > * 
next_

Detailed Description

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
class ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >

Base iterator for the ACE_Hash_Map_Manager_Ex.

This class factors out common code from its templatized subclasses.

Definition at line 589 of file Hash_Map_Manager_T.h.


Member Typedef Documentation

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::container_type

Reimplemented in ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, and ACE_Hash_Map_Reverse_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >.

Definition at line 594 of file Hash_Map_Manager_T.h.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef container_type::difference_type ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::difference_type

Reimplemented in ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, and ACE_Hash_Map_Reverse_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >.

Definition at line 600 of file Hash_Map_Manager_T.h.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef container_type::pointer ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::pointer

Reimplemented in ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, and ACE_Hash_Map_Reverse_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >.

Definition at line 599 of file Hash_Map_Manager_T.h.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef container_type::reference ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reference

Reimplemented in ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, and ACE_Hash_Map_Reverse_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >.

Definition at line 598 of file Hash_Map_Manager_T.h.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef container_type::value_type ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::value_type

Reimplemented in ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, and ACE_Hash_Map_Reverse_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >.

Definition at line 597 of file Hash_Map_Manager_T.h.


Constructor & Destructor Documentation

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Map_Iterator_Base_Ex ( ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &  mm,
bool  head 
)

Contructor.

If head != false, the iterator constructed is positioned at the head of the map. It is positioned at the end otherwise.

Definition at line 491 of file Hash_Map_Manager_T.inl.

00498   : map_man_ (&mm),
00499     index_ (head ? -1 : (ssize_t) mm.total_size_),
00500     next_ (0)
00501 {
00502   if (mm.table_ != 0)
00503     this->next_ = &mm.table_[head ? 0 : mm.total_size_ - 1];
00504 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Map_Iterator_Base_Ex ( ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &  mm,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *  entry,
size_t  index 
)

Contructor.

This constructor positions the iterator to the given entry.

Definition at line 516 of file Hash_Map_Manager_T.inl.

00524   : map_man_ (&mm)
00525   , index_ (static_cast<ssize_t> (index))
00526   , next_ (entry)
00527 {
00528 }


Member Function Documentation

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE int ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::done ( void   )  const

Returns 1 when all items have been seen, else 0.

Definition at line 549 of file Hash_Map_Manager_T.inl.

References ACE_TRACE, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_.

00550 {
00551   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::done");
00552 
00553   return this->map_man_->table_ == 0
00554     || this->index_ >= static_cast<ssize_t> (this->map_man_->total_size_)
00555     || this->index_ < 0;
00556 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
void ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::dump_i ( void   )  const [protected]

Dump the state of an object.

Definition at line 384 of file Hash_Map_Manager_T.cpp.

References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_TEXT, ACE_TRACE, and LM_DEBUG.

00385 {
00386   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i");
00387 
00388   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00389   ACE_DEBUG ((LM_DEBUG,  ACE_TEXT ("index_ = %d "), this->index_));
00390   ACE_DEBUG ((LM_DEBUG,  ACE_TEXT ("next_ = %x"), this->next_));
00391   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00392 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
int ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::forward_i ( void   )  [protected]

Move forward by one element in the set. Returns 0 when there's no more item in the set after the current items, else 1.

Definition at line 395 of file Hash_Map_Manager_T.cpp.

References ACE_TRACE, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next_.

Referenced by ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Map_Iterator_Ex(), ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::advance(), ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator++(), and ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator--().

00396 {
00397   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i");
00398 
00399   if (this->map_man_->table_ == 0)
00400     return -1;
00401   // Handle initial case specially.
00402   else if (this->index_ == -1)
00403     {
00404       this->index_++;
00405       return this->forward_i ();
00406     }
00407   else if (this->index_ >= static_cast<ssize_t> (this->map_man_->total_size_))
00408     return 0;
00409 
00410   this->next_ = this->next_->next_;
00411   if (this->next_ == &this->map_man_->table_[this->index_])
00412     {
00413       while (++this->index_ < static_cast<ssize_t> (this->map_man_->total_size_))
00414         {
00415           this->next_ = this->map_man_->table_[this->index_].next_;
00416           if (this->next_ != &this->map_man_->table_[this->index_])
00417             break;
00418         }
00419     }
00420 
00421   return this->index_ < static_cast<ssize_t> (this->map_man_->total_size_);
00422 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > & ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map ( void   ) 

Returns reference the Hash_Map_Manager_Ex that is being iterated over.

Definition at line 592 of file Hash_Map_Manager_T.inl.

References ACE_TRACE, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_.

00593 {
00594   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::map");
00595   return *this->map_man_;
00596 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE int ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next ( ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  next_entry  )  const

Pass back the next <entry> that hasn't been seen in the Set. Returns 0 when all items have been seen, else 1.

Definition at line 532 of file Hash_Map_Manager_T.inl.

References ACE_TRACE, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next_.

Referenced by ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator *(), and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator->().

00533 {
00534   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::next");
00535 
00536   if (this->map_man_->table_ != 0
00537       && this->index_ < static_cast<ssize_t> (this->map_man_->total_size_)
00538       && this->index_ >= 0
00539       && this->next_ != &this->map_man_->table_[this->index_])
00540     {
00541       entry = this->next_;
00542       return 1;
00543     }
00544   else
00545     return 0;
00546 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE ACE_Hash_Map_Entry< EXT_ID, INT_ID > & ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator * ( void   )  const

Returns a reference to the interal element this is pointing to.

Definition at line 560 of file Hash_Map_Manager_T.inl.

References ACE_ASSERT, ACE_TRACE, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next().

00561 {
00562   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator*");
00563   ACE_Hash_Map_Entry<EXT_ID, INT_ID> *retv = 0;
00564 
00565   int result = this->next (retv);
00566 
00567   ACE_UNUSED_ARG (result);
00568   ACE_ASSERT (result != 0);
00569 
00570   return *retv;
00571 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE bool ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!= ( const ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &   )  const

Definition at line 608 of file Hash_Map_Manager_T.inl.

References ACE_TRACE, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next_.

00609 {
00610   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator!=");
00611   return this->next_ != rhs.next_
00612     || this->index_ != rhs.index_
00613     || this->map_man_ != rhs.map_man_;
00614 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE ACE_Hash_Map_Entry< EXT_ID, INT_ID > * ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator-> ( void   )  const

Returns a pointer to the interal element this is pointing to.

Definition at line 575 of file Hash_Map_Manager_T.inl.

References ACE_ASSERT, ACE_TRACE, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next().

00576 {
00577   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator->");
00578   ACE_Hash_Map_Entry<EXT_ID, INT_ID> *retv = 0;
00579 
00580   int result = this->next (retv);
00581 
00582   ACE_UNUSED_ARG (result);
00583   ACE_ASSERT (result != 0);
00584 
00585   return retv;
00586 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_INLINE bool ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator== ( const ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &   )  const

Check if two iterators point to the same position.

Definition at line 599 of file Hash_Map_Manager_T.inl.

References ACE_TRACE, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next_.

00600 {
00601   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator==");
00602   return this->map_man_ == rhs.map_man_
00603     && this->index_ == rhs.index_
00604     && this->next_ == rhs.next_;
00605 }

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
int ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_i ( void   )  [protected]

Move backward by one element in the set. Returns 0 when there's no more item in the set before the current item, else 1.

Definition at line 425 of file Hash_Map_Manager_T.cpp.

References ACE_TRACE, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_, ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_, and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next_.

Referenced by ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Map_Reverse_Iterator_Ex(), ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::advance(), ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator++(), and ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator--().

00426 {
00427   ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i");
00428 
00429   if (this->map_man_->table_ == 0)
00430     return -1;
00431   else if (this->index_ == static_cast<ssize_t> (this->map_man_->total_size_))
00432     {
00433       --this->index_;
00434       return this->reverse_i ();
00435     }
00436   else if (this->index_ < 0)
00437     return 0;
00438 
00439   this->next_ = this->next_->prev_;
00440   if (this->next_ == &this->map_man_->table_[this->index_])
00441     {
00442       while (--this->index_ >= 0)
00443         {
00444           this->next_ = this->map_man_->table_[this->index_].prev_;
00445           if (this->next_ != &this->map_man_->table_[this->index_])
00446             break;
00447         }
00448     }
00449 
00450   return this->index_ >= 0;
00451 }


Member Data Documentation

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

Reimplemented in ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, ACE_Hash_Map_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >, ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >, and ACE_Hash_Map_Reverse_Iterator_Ex< KEY, VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex >.

Definition at line 654 of file Hash_Map_Manager_T.h.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ssize_t ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_ [protected]

Keeps track of how far we've advanced in the table.

Definition at line 672 of file Hash_Map_Manager_T.h.

Referenced by ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::done(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::forward_i(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(), and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_i().

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>* ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_ [protected]

Map we are iterating over.

Definition at line 669 of file Hash_Map_Manager_T.h.

Referenced by ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::done(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::forward_i(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(), and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_i().

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_Hash_Map_Entry<EXT_ID, INT_ID>* ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next_ [protected]

Keeps track of how far we've advanced in a linked list in each table slot.

Definition at line 676 of file Hash_Map_Manager_T.h.

Referenced by ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::forward_i(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(), and ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_i().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:35:10 2010 for ACE by  doxygen 1.4.7