diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-21 16:43:02 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-21 16:43:02 +0000 |
commit | d74753619d5a8590c244a0c9eba788ba07b95d7d (patch) | |
tree | c36bf5c509face0af7daf1f1aaf03d322e74366d | |
parent | 2f7e1c254396be4b802205d0856f4c10f4c7d786 (diff) | |
download | ATCD-d74753619d5a8590c244a0c9eba788ba07b95d7d.tar.gz |
Fri May 21 11:27:44 1999 Irfan Pyarali <irfan@cs.wustl.edu>
-rw-r--r-- | ChangeLog-99b | 9 | ||||
-rw-r--r-- | ace/Map_Manager.h | 24 | ||||
-rw-r--r-- | ace/Map_Manager.i | 26 |
3 files changed, 34 insertions, 25 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b index 81fa4686a08..136c4129689 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,3 +1,12 @@ +Fri May 21 11:27:44 1999 Irfan Pyarali <irfan@cs.wustl.edu> + + * ace/Map_Manager.h (class ACE_Map_Iterator_Base): Changed the + ACE_Map_Manager reference to a pointer. This way there is no + problem in reinitializing <map_man_>, and hence the compiler + will not have a problem in providing us a default assignment + operator. Thanks to Knut Johannessen <knutj@funcom.com> for + pointing out this problem. + Fri May 21 10:34:10 1999 David L. Levine <levine@cs.wustl.edu> * ace/gethrtime.cpp,Makefile (gethrtime on Green diff --git a/ace/Map_Manager.h b/ace/Map_Manager.h index d2d7d26e303..9a7ea27de27 100644 --- a/ace/Map_Manager.h +++ b/ace/Map_Manager.h @@ -182,7 +182,7 @@ public: // attempt is made to bind an existing entry, and returns -1 if // failures occur. - int find (const EXT_ID &ext_id, + int find (const EXT_ID &ext_id, INT_ID &int_id); // Locate <ext_id> and pass out parameter via <int_id>. If found, // returns and non-negative integer; returns -1 if not found. @@ -196,7 +196,7 @@ public: // <int_id>s are *not* dynamically allocated...) Returns 0 if // successful, else -1. - int unbind (const EXT_ID &ext_id, + int unbind (const EXT_ID &ext_id, INT_ID &int_id); // Break any association of <ext_id>. Returns the value of <int_id> // in case the caller needs to deallocate memory. Returns 0 if @@ -239,40 +239,40 @@ protected: // These methods assume that the locks are held by the private // methods. - int bind_i (const EXT_ID &ext_id, + int bind_i (const EXT_ID &ext_id, const INT_ID &int_id); // Performs the binding of <ext_id> to <int_id>. Must be called // with locks held. - int shared_bind (const EXT_ID &ext_id, + int shared_bind (const EXT_ID &ext_id, const INT_ID &int_id); // Bind an entry (without finding first). Must be called with locks // held. - int rebind_i (const EXT_ID &ext_id, + int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, - EXT_ID &old_ext_id, + EXT_ID &old_ext_id, INT_ID &old_int_id); // Performs a rebinding of <ext_it> to <int_id>. Also, recovers old // values. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, + int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id); // Performs a rebinding of <ext_it> to <int_id>. Also, recovers old // values. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, + int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id); // Performs a rebinding of <ext_it> to <int_id>. Must be called // with locks held. - int trybind_i (const EXT_ID &ext_id, + int trybind_i (const EXT_ID &ext_id, INT_ID &int_id); // Performs a conditional bind of <int_id> using <ext_id> as the // key. Must be called with locks held. - int find_i (const EXT_ID &ext_id, + int find_i (const EXT_ID &ext_id, INT_ID &int_id); // Performs a find of <int_id> using <ext_id> as the key. Must be // called with locks held. @@ -282,7 +282,7 @@ protected: // Performs a find using <ext_id> as the key. Must be called with // locks held. - int unbind_i (const EXT_ID &ext_id, + int unbind_i (const EXT_ID &ext_id, INT_ID &int_id); // Performs an unbind of <int_id> using <ext_id> as the key. Must // be called with locks held. @@ -424,7 +424,7 @@ protected: void dump_i (void) const; // Dump the state of an object. - ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> &map_man_; + ACE_Map_Manager <EXT_ID, INT_ID, ACE_LOCK> *map_man_; // Map we are iterating over. size_t next_; diff --git a/ace/Map_Manager.i b/ace/Map_Manager.i index 99bd092c70c..a3570c3aa89 100644 --- a/ace/Map_Manager.i +++ b/ace/Map_Manager.i @@ -266,17 +266,17 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rend (void) template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::ACE_Map_Iterator_Base (ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm) - : map_man_ (mm), - next_ (this->map_man_.occupied_list_id ()) + : map_man_ (&mm), + next_ (this->map_man_->occupied_list_id ()) { } template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::next (ACE_Map_Entry<EXT_ID, INT_ID> *&mm) const { - if (this->next_ != this->map_man_.occupied_list_id ()) + if (this->next_ != this->map_man_->occupied_list_id ()) { - mm = &this->map_man_.search_structure_[this->next_]; + mm = &this->map_man_->search_structure_[this->next_]; return 1; } else @@ -288,37 +288,37 @@ ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::next (ACE_Map_Entry<EXT_ID, INT template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::done (void) const { - return this->next_ == this->map_man_.occupied_list_id (); + return this->next_ == this->map_man_->occupied_list_id (); } template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::forward_i (void) { - if (this->next_ == this->map_man_.occupied_list_id ()) + if (this->next_ == this->map_man_->occupied_list_id ()) { - this->next_ = this->map_man_.occupied_list_.next (); + this->next_ = this->map_man_->occupied_list_.next (); } else { - this->next_ = this->map_man_.search_structure_[this->next_].next (); + this->next_ = this->map_man_->search_structure_[this->next_].next (); } - return this->next_ != this->map_man_.occupied_list_id (); + return this->next_ != this->map_man_->occupied_list_id (); } template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE int ACE_Map_Iterator_Base<EXT_ID, INT_ID, ACE_LOCK>::reverse_i (void) { - if (this->next_ == this->map_man_.occupied_list_id ()) + if (this->next_ == this->map_man_->occupied_list_id ()) { - this->next_ = this->map_man_.occupied_list_.prev (); + this->next_ = this->map_man_->occupied_list_.prev (); } else { - this->next_ = this->map_man_.search_structure_[this->next_].prev (); + this->next_ = this->map_man_->search_structure_[this->next_].prev (); } - return this->next_ != this->map_man_.occupied_list_id (); + return this->next_ != this->map_man_->occupied_list_id (); } template <class EXT_ID, class INT_ID, class ACE_LOCK> ACE_INLINE |