#include <Hash_Map_Manager_T.h>
Inheritance diagram for ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >:
Public Member Functions | |
ACE_Hash_Map_Const_Iterator_Base_Ex (const ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &mm, int head) | |
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 is pointing to. | |
ACE_Hash_Map_Entry< EXT_ID, INT_ID > * | operator-> (void) const |
Returns a pointer to the interal element is pointing to. | |
const ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > & | map (void) |
bool | operator== (const ACE_Hash_Map_Const_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_Const_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 | |
const 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_ |
This class factors out common code from its templatized subclasses.
Definition at line 606 of file Hash_Map_Manager_T.h.
|
Contructor. If head != 0, the iterator constructed is positioned at the head of the map, it is positioned at the end otherwise. Definition at line 496 of file Hash_Map_Manager_T.inl. References ACE_TRACE, ssize_t, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::table_, and ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::total_size_.
00498 : map_man_ (&mm), 00499 index_ (head != 0 ? -1 : (ssize_t) mm.total_size_), 00500 next_ (0) 00501 { 00502 ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Map_Const_Iterator_Base_Ex"); 00503 00504 if (mm.table_ != 0) 00505 this->next_ = &mm.table_[head != 0 ? 0 : mm.total_size_ - 1]; 00506 } |
|
Returns 1 when all items have been seen, else 0.
Definition at line 526 of file Hash_Map_Manager_T.inl. References ACE_TRACE, and ssize_t.
|
|
Dump the state of an object.
Definition at line 464 of file Hash_Map_Manager_T.cpp. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, and LM_DEBUG. Referenced by ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::dump().
00465 { 00466 ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i"); 00467 00468 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); 00469 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("index_ = %d "), this->index_)); 00470 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("next_ = %x"), this->next_)); 00471 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); 00472 } |
|
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 475 of file Hash_Map_Manager_T.cpp. References ACE_TRACE, and ssize_t. Referenced by ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Map_Const_Iterator_Ex(), ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::advance(), and ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator++().
00476 { 00477 ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i"); 00478 00479 if (this->map_man_->table_ == 0) 00480 return -1; 00481 // Handle initial case specially. 00482 else if (this->index_ == -1) 00483 { 00484 this->index_++; 00485 return this->forward_i (); 00486 } 00487 else if (this->index_ >= (ssize_t) this->map_man_->total_size_) 00488 return 0; 00489 00490 this->next_ = this->next_->next_; 00491 if (this->next_ == &this->map_man_->table_[this->index_]) 00492 { 00493 while (++this->index_ < (ssize_t) this->map_man_->total_size_) 00494 { 00495 this->next_ = this->map_man_->table_[this->index_].next_; 00496 if (this->next_ != &this->map_man_->table_[this->index_]) 00497 break; 00498 } 00499 } 00500 00501 return this->index_ < (ssize_t) this->map_man_->total_size_; 00502 } |
|
Returns reference the Hash_Map_Manager_Ex that is being iterated over. Definition at line 569 of file Hash_Map_Manager_T.inl. References ACE_TRACE.
|
|
Pass back the next that hasn't been seen in the Set. Returns 0 when all items have been seen, else 1. Definition at line 509 of file Hash_Map_Manager_T.inl. References ACE_TRACE, and ssize_t. Referenced by ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator *(), and ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator->().
00510 { 00511 ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::next"); 00512 00513 if (this->map_man_->table_ != 0 00514 && this->index_ < (ssize_t) this->map_man_->total_size_ 00515 && this->index_ >= 0 00516 && this->next_ != &this->map_man_->table_[this->index_]) 00517 { 00518 entry = this->next_; 00519 return 1; 00520 } 00521 else 00522 return 0; 00523 } |
|
Returns a reference to the interal element is pointing to.
Definition at line 537 of file Hash_Map_Manager_T.inl. References ACE_ASSERT, ACE_TRACE, and ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next().
00538 { 00539 ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator*"); 00540 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *retv = 0; 00541 00542 int result = this->next (retv); 00543 00544 ACE_UNUSED_ARG (result); 00545 ACE_ASSERT (result != 0); 00546 00547 return *retv; 00548 } |
|
|
Returns a pointer to the interal element is pointing to.
Definition at line 552 of file Hash_Map_Manager_T.inl. References ACE_ASSERT, ACE_TRACE, and ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next().
00553 { 00554 ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator->"); 00555 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *retv = 0; 00556 00557 int result = this->next (retv); 00558 00559 ACE_UNUSED_ARG (result); 00560 ACE_ASSERT (result != 0); 00561 00562 return retv; 00563 } |
|
Check if two iterators point to the same position.
Definition at line 576 of file Hash_Map_Manager_T.inl. References ACE_TRACE, ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_, ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_, and ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next_.
|
|
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 505 of file Hash_Map_Manager_T.cpp. References ACE_TRACE, and ssize_t. Referenced by ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator--().
00506 { 00507 ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i"); 00508 00509 if (this->map_man_->table_ == 0) 00510 return -1; 00511 else if (this->index_ == (ssize_t) this->map_man_->total_size_) 00512 { 00513 this->index_--; 00514 return this->reverse_i (); 00515 } 00516 else if (this->index_ < 0) 00517 return 0; 00518 00519 this->next_ = this->next_->prev_; 00520 if (this->next_ == &this->map_man_->table_[this->index_]) 00521 { 00522 while (--this->index_ >= 0) 00523 { 00524 this->next_ = this->map_man_->table_[this->index_].prev_; 00525 if (this->next_ != &this->map_man_->table_[this->index_]) 00526 break; 00527 } 00528 } 00529 00530 return this->index_ >= 0; 00531 } |
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, and ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >. Definition at line 639 of file Hash_Map_Manager_T.h. |
|
Keeps track of how far we've advanced in the table.
Definition at line 657 of file Hash_Map_Manager_T.h. Referenced by ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(). |
|
Map we are iterating over.
Definition at line 654 of file Hash_Map_Manager_T.h. Referenced by ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(). |
|
Keeps track of how far we've advanced in a linked list in each table slot. Definition at line 661 of file Hash_Map_Manager_T.h. Referenced by ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(). |