summaryrefslogtreecommitdiff
path: root/TAO/tao/IOR_LookupTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/IOR_LookupTable.cpp')
-rw-r--r--TAO/tao/IOR_LookupTable.cpp69
1 files changed, 7 insertions, 62 deletions
diff --git a/TAO/tao/IOR_LookupTable.cpp b/TAO/tao/IOR_LookupTable.cpp
index a38d57030cb..c3fe0ab115f 100644
--- a/TAO/tao/IOR_LookupTable.cpp
+++ b/TAO/tao/IOR_LookupTable.cpp
@@ -1,14 +1,12 @@
// $Id$
#include "tao/IOR_LookupTable.h"
-#include "tao/ObjectIDList.h"
#include "tao/debug.h"
ACE_RCSID(tao, IOR_TableLookup, "$Id$")
-// = Initialization and termination methods.
+ // = Initialization and termination methods.
TAO_IOR_LookupTable::TAO_IOR_LookupTable (void)
- : table_ ()
{
}
@@ -30,7 +28,7 @@ TAO_IOR_LookupTable::add_ior (const ACE_CString &object_name,
const ACE_CString &ior)
{
// Make an entry in the table.
- switch (this->table_.bind (object_name, ior))
+ switch (this->hash_map_.bind (object_name, ior))
{
case 1 : // object name already exists in the table.
if (TAO_debug_level > 0)
@@ -61,68 +59,15 @@ TAO_IOR_LookupTable::find_ior (const ACE_CString &object_name,
// returns 0 on success.
// -1 on failure.
- // @@ This debugging output should *NOT* be used since the
- // object key string is not null terminated, nor can it
- // be null terminated without copying. No copying should
- // be done since performance is somewhat important here.
- // So, just remove the debugging output entirely.
- //
- // if (TAO_debug_level > 0)
- // ACE_DEBUG ((LM_DEBUG,
- // "TAO (%P|%t) IOR Table find <%s>\n",
- // object_name.c_str ()));
-
- return this->table_.find (object_name, ior);
-
-}
-
-
-CORBA_ORB_ObjectIdList_ptr
-TAO_IOR_LookupTable::list_initial_services (CORBA::Environment &ACE_TRY_ENV)
-{
- // Unsupported initial services should NOT be included in the below list!
- const char *initial_services[] = { TAO_LIST_OF_INITIAL_SERVICES };
- // Make sure the "terminating" zero is the last array element so
- // that there is a stop condition when iterating through the list.
-
- const size_t initial_services_size =
- sizeof (initial_services) / sizeof (initial_services[0]);
-
- const size_t total_size =
- initial_services_size + this->table_.current_size ();
-
- CORBA_ORB_ObjectIdList_ptr tmp = 0;
-
- ACE_NEW_THROW_EX (tmp,
- CORBA_ORB_ObjectIdList (total_size),
- CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (0);
-
- CORBA_ORB_ObjectIdList_var list = tmp;
-
- size_t index = 0;
- // Index for ObjectIdList members.
-
- // Iterate over TAO's "built-in" initial references.
- for (index = 0; index < initial_services_size; ++index)
- list[index] = initial_services[index];
-
- // Now iterate over the initial references created by the user and
- // add them to the sequence.
- TAO_IOR_Map::iterator first = this->table_.begin ();
- TAO_IOR_Map::iterator last = this->table_.end ();
-
- for (TAO_IOR_Map::iterator i = first;
- i != last;
- ++i, ++index)
- list[index] = (*i).int_id_.c_str ();
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) IOR Table find <%s>\n",
+ object_name.c_str ()));
- list->length (total_size);
+ return this->hash_map_.find (object_name, ior);
- return list._retn ();
}
-
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_Null_Mutex>;
template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>;