summaryrefslogtreecommitdiff
path: root/ace/Map_Manager.cpp
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-02-06 04:25:54 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-02-06 04:25:54 +0000
commit0d8ee7e4258f06f26d0a9dbb467ecf573dc5d689 (patch)
treea00a40326372f5fade152590802b12891788f2a3 /ace/Map_Manager.cpp
parent93735413191d08c245df27e593d79aba9482efc2 (diff)
downloadATCD-0d8ee7e4258f06f26d0a9dbb467ecf573dc5d689.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Map_Manager.cpp')
-rw-r--r--ace/Map_Manager.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
index 781b5af7d53..92ddb7572bd 100644
--- a/ace/Map_Manager.cpp
+++ b/ace/Map_Manager.cpp
@@ -245,6 +245,38 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
template <class EXT_ID, class INT_ID, class ACE_LOCK> int
ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
+ const INT_ID &int_id,
+ INT_ID &old_int_id)
+{
+ // First try to find the key.
+ size_t index = 0;
+ int result = this->find_and_return_index (ext_id,
+ index);
+
+ if (result == 0)
+ {
+ // We found it, so make copies of the old entries and rebind
+ // current entries.
+ ENTRY &ss = this->search_structure_[index];
+ old_int_id = ss.int_id_;
+ ss.ext_id_ = ext_id;
+ ss.int_id_ = int_id;
+
+ // Sync changed entry.
+ this->allocator_->sync (&ss, sizeof ss);
+
+ return 1;
+ }
+ else
+ {
+ // We didn't find it, so let's add it.
+ return this->shared_bind (ext_id,
+ int_id);
+ }
+}
+
+template <class EXT_ID, class INT_ID, class ACE_LOCK> int
+ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::rebind_i (const EXT_ID &ext_id,
const INT_ID &int_id)
{