ACE_Hash_Multi_Map_Manager.
More...
#include <Hash_Multi_Map_Manager_T.h>
Inheritance diagram for ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >:

Public Member Functions | |
| ACE_Hash_Multi_Map_Iterator_Base (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. | |
| ACE_Hash_Multi_Map_Manager< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > & | map (void) |
| bool | operator== (const ACE_Hash_Multi_Map_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_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 | |
| 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 613 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 466 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_.
00468 : map_man_ (&mm), 00469 index_ (head != 0 ? -1 : (ssize_t) mm.total_size_), 00470 next_ (0) 00471 { 00472 ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::ACE_Hash_Multi_Map_Iterator_Base"); 00473 00474 if (mm.table_ != 0) 00475 this->next_ = &mm.table_[head != 0 ? 0 : mm.total_size_ - 1]; 00476 } |
|
||||||||||
|
Returns 1 when all items have been seen, else 0.
Definition at line 496 of file Hash_Multi_Map_Manager_T.inl. References ACE_TRACE.
|
|
||||||||||
|
Dump the state of an object.
Definition at line 460 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_Reverse_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::dump(), and ACE_Hash_Multi_Map_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::dump().
00461 {
00462 ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::dump_i");
00463
00464 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00465 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_));
00466 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_));
00467 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00468 }
|
|
||||||||||
|
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 471 of file Hash_Multi_Map_Manager_T.cpp. References ACE_TRACE. Referenced by ACE_Hash_Multi_Map_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Multi_Map_Iterator(), ACE_Hash_Multi_Map_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::advance(), ACE_Hash_Multi_Map_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator++(), and ACE_Hash_Multi_Map_Reverse_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator--().
00472 {
00473 ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::forward_i");
00474
00475 if (this->map_man_->table_ == 0)
00476 return -1;
00477 // Handle initial case specially.
00478 else if (this->index_ == -1)
00479 {
00480 this->index_++;
00481 return this->forward_i ();
00482 }
00483 else if (this->index_ >= static_cast<ssize_t> (this->map_man_->total_size_))
00484 return 0;
00485
00486 this->next_ = this->next_->next_;
00487 if (this->next_ == &this->map_man_->table_[this->index_])
00488 {
00489 while (++this->index_ < static_cast<ssize_t> (this->map_man_->total_size_))
00490 {
00491 this->next_ = this->map_man_->table_[this->index_].next_;
00492 if (this->next_ != &this->map_man_->table_[this->index_])
00493 break;
00494 }
00495 }
00496
00497 return this->index_ < static_cast<ssize_t> (this->map_man_->total_size_);
00498 }
|
|
||||||||||
|
Returns reference the Definition at line 539 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 479 of file Hash_Multi_Map_Manager_T.inl. References ACE_TRACE. Referenced by ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator *(), and ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator->().
00480 {
00481 ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::next");
00482
00483 if (this->map_man_->table_ != 0
00484 && this->index_ < static_cast<ssize_t> (this->map_man_->total_size_)
00485 && this->index_ >= 0
00486 && this->next_ != &this->map_man_->table_[this->index_])
00487 {
00488 entry = this->next_;
00489 return 1;
00490 }
00491 else
00492 return 0;
00493 }
|
|
||||||||||
|
Returns a reference to the interal element this object is pointing to.
Definition at line 507 of file Hash_Multi_Map_Manager_T.inl. References ACE_ASSERT, ACE_TRACE, and ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next().
00508 {
00509 ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator*");
00510 ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *retv = 0;
00511
00512 int result = this->next (retv);
00513
00514 ACE_UNUSED_ARG (result);
00515 ACE_ASSERT (result != 0);
00516
00517 return *retv;
00518 }
|
|
||||||||||
|
||||||||||
|
Returns a pointer to the interal element this object is pointing to.
Definition at line 522 of file Hash_Multi_Map_Manager_T.inl. References ACE_ASSERT, ACE_TRACE, and ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::next().
00523 {
00524 ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::operator->");
00525 ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *retv = 0;
00526
00527 int result = this->next (retv);
00528
00529 ACE_UNUSED_ARG (result);
00530 ACE_ASSERT (result != 0);
00531
00532 return retv;
00533 }
|
|
||||||||||
|
Check if two iterators point to the same position.
Definition at line 546 of file Hash_Multi_Map_Manager_T.inl. References ACE_TRACE, ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::index_, ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::map_man_, and ACE_Hash_Multi_Map_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 501 of file Hash_Multi_Map_Manager_T.cpp. References ACE_TRACE. Referenced by ACE_Hash_Multi_Map_Reverse_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Multi_Map_Reverse_Iterator(), ACE_Hash_Multi_Map_Reverse_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::advance(), ACE_Hash_Multi_Map_Reverse_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator++(), and ACE_Hash_Multi_Map_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator--().
00502 {
00503 ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>::reverse_i");
00504
00505 if (this->map_man_->table_ == 0)
00506 return -1;
00507 else if (this->index_ == static_cast<ssize_t> (this->map_man_->total_size_))
00508 {
00509 this->index_--;
00510 return this->reverse_i ();
00511 }
00512 else if (this->index_ < 0)
00513 return 0;
00514
00515 this->next_ = this->next_->prev_;
00516 if (this->next_ == &this->map_man_->table_[this->index_])
00517 {
00518 while (--this->index_ >= 0)
00519 {
00520 this->next_ = this->map_man_->table_[this->index_].prev_;
00521 if (this->next_ != &this->map_man_->table_[this->index_])
00522 break;
00523 }
00524 }
00525
00526 return this->index_ >= 0;
00527 }
|
|
|||||
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Hash_Multi_Map_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >, and ACE_Hash_Multi_Map_Reverse_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >. Definition at line 646 of file Hash_Multi_Map_Manager_T.h. |
|
|||||
|
Keeps track of how far we've advanced in the table.
Definition at line 664 of file Hash_Multi_Map_Manager_T.h. Referenced by ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(). |
|
|||||
|
Map we are iterating over.
Definition at line 661 of file Hash_Multi_Map_Manager_T.h. Referenced by ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Multi_Map_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 668 of file Hash_Multi_Map_Manager_T.h. Referenced by ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator!=(), and ACE_Hash_Multi_Map_Iterator_Base< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator==(). |
1.3.6