Base iterator for the ACE_Hash_Map_Manager_Ex. More...
#include <Hash_Map_Manager_T.h>

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_ |
Base iterator for the ACE_Hash_Map_Manager_Ex.
This class factors out common code from its templatized subclasses.
Definition at line 592 of file Hash_Map_Manager_T.h.
| 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 597 of file Hash_Map_Manager_T.h.
| 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 603 of file Hash_Map_Manager_T.h.
| 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 602 of file Hash_Map_Manager_T.h.
| 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 601 of file Hash_Map_Manager_T.h.
| 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 600 of file Hash_Map_Manager_T.h.
| 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 | |||
| ) | [inline] |
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 484 of file Hash_Map_Manager_T.inl.
00491 : map_man_ (&mm), 00492 index_ (head ? -1 : (ssize_t) mm.total_size_), 00493 next_ (0) 00494 { 00495 if (mm.table_ != 0) 00496 this->next_ = &mm.table_[head ? 0 : mm.total_size_ - 1]; 00497 }
| 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 | |||
| ) | [inline] |
Contructor.
This constructor positions the iterator to the given entry.
Definition at line 509 of file Hash_Map_Manager_T.inl.
| int ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::done | ( | void | ) | const [inline] |
Returns 1 when all items have been seen, else 0.
Definition at line 542 of file Hash_Map_Manager_T.inl.
| void ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::dump_i | ( | void | ) | const [inline, protected] |
Dump the state of an object.
Definition at line 397 of file Hash_Map_Manager_T.cpp.
00398 { 00399 ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i"); 00400 00401 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); 00402 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_)); 00403 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_)); 00404 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); 00405 }
| int ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::forward_i | ( | void | ) | [inline, 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 408 of file Hash_Map_Manager_T.cpp.
00409 { 00410 ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i"); 00411 00412 if (this->map_man_->table_ == 0) 00413 return -1; 00414 // Handle initial case specially. 00415 else if (this->index_ == -1) 00416 { 00417 this->index_++; 00418 return this->forward_i (); 00419 } 00420 else if (this->index_ >= static_cast<ssize_t> (this->map_man_->total_size_)) 00421 return 0; 00422 00423 this->next_ = this->next_->next_; 00424 if (this->next_ == &this->map_man_->table_[this->index_]) 00425 { 00426 while (++this->index_ < static_cast<ssize_t> (this->map_man_->total_size_)) 00427 { 00428 this->next_ = this->map_man_->table_[this->index_].next_; 00429 if (this->next_ != &this->map_man_->table_[this->index_]) 00430 break; 00431 } 00432 } 00433 00434 return this->index_ < static_cast<ssize_t> (this->map_man_->total_size_); 00435 }
| 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 | ) | [inline] |
Returns reference the Hash_Map_Manager_Ex that is being iterated over.
Definition at line 585 of file Hash_Map_Manager_T.inl.
| 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 [inline] |
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 525 of file Hash_Map_Manager_T.inl.
00526 { 00527 ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::next"); 00528 00529 if (this->map_man_->table_ != 0 00530 && this->index_ < static_cast<ssize_t> (this->map_man_->total_size_) 00531 && this->index_ >= 0 00532 && this->next_ != &this->map_man_->table_[this->index_]) 00533 { 00534 entry = this->next_; 00535 return 1; 00536 } 00537 else 00538 return 0; 00539 }
| 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 > & | rhs | ) | const [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 [inline] |
Returns a reference to the interal element this is pointing to.
Definition at line 553 of file Hash_Map_Manager_T.inl.
00554 { 00555 ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator*"); 00556 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *retv = 0; 00557 00558 int result = this->next (retv); 00559 00560 ACE_UNUSED_ARG (result); 00561 ACE_ASSERT (result != 0); 00562 00563 return *retv; 00564 }
| 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 [inline] |
Returns a pointer to the interal element this is pointing to.
Definition at line 568 of file Hash_Map_Manager_T.inl.
00569 { 00570 ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator->"); 00571 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *retv = 0; 00572 00573 int result = this->next (retv); 00574 00575 ACE_UNUSED_ARG (result); 00576 ACE_ASSERT (result != 0); 00577 00578 return retv; 00579 }
| 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 > & | rhs | ) | const [inline] |
Check if two iterators point to the same position.
Definition at line 592 of file Hash_Map_Manager_T.inl.
| int ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_i | ( | void | ) | [inline, 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 438 of file Hash_Map_Manager_T.cpp.
00439 { 00440 ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i"); 00441 00442 if (this->map_man_->table_ == 0) 00443 return -1; 00444 else if (this->index_ == static_cast<ssize_t> (this->map_man_->total_size_)) 00445 { 00446 --this->index_; 00447 return this->reverse_i (); 00448 } 00449 else if (this->index_ < 0) 00450 return 0; 00451 00452 this->next_ = this->next_->prev_; 00453 if (this->next_ == &this->map_man_->table_[this->index_]) 00454 { 00455 while (--this->index_ >= 0) 00456 { 00457 this->next_ = this->map_man_->table_[this->index_].prev_; 00458 if (this->next_ != &this->map_man_->table_[this->index_]) 00459 break; 00460 } 00461 } 00462 00463 return this->index_ >= 0; 00464 }
| 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 657 of file Hash_Map_Manager_T.h.
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 675 of file Hash_Map_Manager_T.h.
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 672 of file Hash_Map_Manager_T.h.
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 679 of file Hash_Map_Manager_T.h.
1.6.1