ACE_Hash_Multi_Map_Manager
.
More...
#include <Hash_Multi_Map_Manager_T.h>
Inheritance diagram for ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >:
Public Member Functions | |
ACE_Hash_Multi_Map_Const_Iterator_Base (const ACE_Hash_Multi_Map_Manager< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &mm, int head) | |
int | next (ACE_Hash_Multi_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_Multi_Map_Entry< EXT_ID, INT_ID > & | operator * (void) const |
Returns a reference to the interal element this object is pointing to. | |
ACE_Hash_Multi_Map_Entry< EXT_ID, INT_ID > * | operator-> (void) const |
Returns a pointer to the interal element this object is pointing to. | |
const ACE_Hash_Multi_Map_Manager< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > & | map (void) |
bool | operator== (const ACE_Hash_Multi_Map_Const_Iterator_Base< 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_Multi_Map_Const_Iterator_Base< 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_Multi_Map_Manager< 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_Multi_Map_Entry< EXT_ID, INT_ID > * | next_ |
ACE_Hash_Multi_Map_Manager
.
This class factors out common code from its templatized subclasses.
Definition at line 680 of file Hash_Multi_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 564 of file Hash_Multi_Map_Manager_T.inl. References ACE_TRACE, ssize_t, ACE_Hash_Multi_Map_Manager< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::table_, and ACE_Hash_Multi_Map_Manager< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::total_size_.
00566 : map_man_ (&mm), 00567 index_ (head != 0 ? -1 : (ssize_t) mm.total_size_), 00568 next_ (0) 00569 { 00570 ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Multi_Map_Const_Iterator_Base"); 00571 00572 if (mm.table_ != 0) 00573 this->next_ = &mm.table_[head != 0 ? 0 : mm.total_size_ - 1]; 00574 } |
|
Returns 1 when all items have been seen, else 0.
Definition at line 594 of file Hash_Multi_Map_Manager_T.inl. References ACE_TRACE, and ssize_t.
|
|
Dump the state of an object.
Definition at line 534 of file Hash_Multi_Map_Manager_T.cpp. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_TEXT, ACE_TRACE, and LM_DEBUG. Referenced by ACE_Hash_Multi_Map_Const_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::dump().
00535 { 00536 ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i"); 00537 00538 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); 00539 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_)); 00540 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_)); 00541 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); 00542 } |
|
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 545 of file Hash_Multi_Map_Manager_T.cpp. References ACE_TRACE, and ssize_t. Referenced by ACE_Hash_Multi_Map_Const_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Multi_Map_Const_Iterator(), ACE_Hash_Multi_Map_Const_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::advance(), and ACE_Hash_Multi_Map_Const_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator++().
00546 { 00547 ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i"); 00548 00549 if (this->map_man_->table_ == 0) 00550 return -1; 00551 // Handle initial case specially. 00552 else if (this->index_ == -1) 00553 { 00554 this->index_++; 00555 return this->forward_i (); 00556 } 00557 else if (this->index_ >= (ssize_t) this->map_man_->total_size_) 00558 return 0; 00559 00560 this->next_ = this->next_->next_; 00561 if (this->next_ == &this->map_man_->table_[this->index_]) 00562 { 00563 while (++this->index_ < (ssize_t) this->map_man_->total_size_) 00564 { 00565 this->next_ = this->map_man_->table_[this->index_].next_; 00566 if (this->next_ != &this->map_man_->table_[this->index_]) 00567 break; 00568 } 00569 } 00570 00571 return this->index_ < (ssize_t) this->map_man_->total_size_; 00572 } |
|
Returns reference the Definition at line 637 of file Hash_Multi_Map_Manager_T.inl. References ACE_TRACE.
|
|
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 577 of file Hash_Multi_Map_Manager_T.inl. References ACE_TRACE, and ssize_t. Referenced by ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator *(), and ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator->().
00578 { 00579 ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::next"); 00580 00581 if (this->map_man_->table_ != 0 00582 && this->index_ < (ssize_t) this->map_man_->total_size_ 00583 && this->index_ >= 0 00584 && this->next_ != &this->map_man_->table_[this->index_]) 00585 { 00586 entry = this->next_; 00587 return 1; 00588 } 00589 else 00590 return 0; 00591 } |
|
Returns a reference to the interal element this object is pointing to.
Definition at line 605 of file Hash_Multi_Map_Manager_T.inl. References ACE_ASSERT, ACE_TRACE, and ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next().
00606 { 00607 ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator*"); 00608 ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *retv = 0; 00609 00610 int result = this->next (retv); 00611 00612 ACE_UNUSED_ARG (result); 00613 ACE_ASSERT (result != 0); 00614 00615 return *retv; 00616 } |
|
|
Returns a pointer to the interal element this object is pointing to.
Definition at line 620 of file Hash_Multi_Map_Manager_T.inl. References ACE_ASSERT, ACE_TRACE, and ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next().
00621 { 00622 ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator->"); 00623 ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *retv = 0; 00624 00625 int result = this->next (retv); 00626 00627 ACE_UNUSED_ARG (result); 00628 ACE_ASSERT (result != 0); 00629 00630 return retv; 00631 } |
|
Check if two iterators point to the same position.
Definition at line 644 of file Hash_Multi_Map_Manager_T.inl. References ACE_TRACE, ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_, ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_, and ACE_Hash_Multi_Map_Const_Iterator_Base< 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 575 of file Hash_Multi_Map_Manager_T.cpp. References ACE_TRACE, and ssize_t. Referenced by ACE_Hash_Multi_Map_Const_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator--().
00576 { 00577 ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i"); 00578 00579 if (this->map_man_->table_ == 0) 00580 return -1; 00581 else if (this->index_ == (ssize_t) this->map_man_->total_size_) 00582 { 00583 this->index_--; 00584 return this->reverse_i (); 00585 } 00586 else if (this->index_ < 0) 00587 return 0; 00588 00589 this->next_ = this->next_->prev_; 00590 if (this->next_ == &this->map_man_->table_[this->index_]) 00591 { 00592 while (--this->index_ >= 0) 00593 { 00594 this->next_ = this->map_man_->table_[this->index_].prev_; 00595 if (this->next_ != &this->map_man_->table_[this->index_]) 00596 break; 00597 } 00598 } 00599 00600 return this->index_ >= 0; 00601 } |
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Hash_Multi_Map_Const_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >. Definition at line 713 of file Hash_Multi_Map_Manager_T.h. |
|
Keeps track of how far we've advanced in the table.
Definition at line 731 of file Hash_Multi_Map_Manager_T.h. Referenced by ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(). |
|
Map we are iterating over.
Definition at line 728 of file Hash_Multi_Map_Manager_T.h. Referenced by ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Multi_Map_Const_Iterator_Base< 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 735 of file Hash_Multi_Map_Manager_T.h. Referenced by ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Multi_Map_Const_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(). |