summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-26 22:37:03 +0000
committervishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-26 22:37:03 +0000
commitf82b18fade1e3c06a098d9d03ee6f9c92e9c34e9 (patch)
treee474a85b2e3a986b6da63ee63bd83269b929fd3f
parentb395a19990b4b4eb953d9af88b76b1fd2e36f8ba (diff)
downloadATCD-f82b18fade1e3c06a098d9d03ee6f9c92e9c34e9.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/IOR_LookupTable.cpp8
-rw-r--r--TAO/tao/IOR_LookupTable.h32
-rw-r--r--TAO/tao/ORB.cpp6
-rw-r--r--TAO/tao/ORB.h4
4 files changed, 21 insertions, 29 deletions
diff --git a/TAO/tao/IOR_LookupTable.cpp b/TAO/tao/IOR_LookupTable.cpp
index 5ed31afa4b0..c3fe0ab115f 100644
--- a/TAO/tao/IOR_LookupTable.cpp
+++ b/TAO/tao/IOR_LookupTable.cpp
@@ -7,8 +7,6 @@ ACE_RCSID(tao, IOR_TableLookup, "$Id$")
// = Initialization and termination methods.
TAO_IOR_LookupTable::TAO_IOR_LookupTable (void)
- : object_name_ (),
- ior_ ()
{
}
@@ -26,8 +24,8 @@ return 0;
}
int
-TAO_IOR_LookupTable::add_ior (ACE_CString &object_name,
- ACE_CString &ior)
+TAO_IOR_LookupTable::add_ior (const ACE_CString &object_name,
+ const ACE_CString &ior)
{
// Make an entry in the table.
switch (this->hash_map_.bind (object_name, ior))
@@ -54,7 +52,7 @@ TAO_IOR_LookupTable::add_ior (ACE_CString &object_name,
}
int
-TAO_IOR_LookupTable::find_ior (ACE_CString &object_name,
+TAO_IOR_LookupTable::find_ior (const ACE_CString &object_name,
ACE_CString &ior)
{
// Find the IOR corresponding to the object name.
diff --git a/TAO/tao/IOR_LookupTable.h b/TAO/tao/IOR_LookupTable.h
index b15c162781c..73da0738ada 100644
--- a/TAO/tao/IOR_LookupTable.h
+++ b/TAO/tao/IOR_LookupTable.h
@@ -10,12 +10,7 @@
// IOR_LookupTable.h
//
// = DESCRIPTION
-// Represents a table for the IOR lookups, given the object keys. A
-// Hash_Map_Manager is being used currently for the table. This
-// could be changed/added-on-to by other data structures like a file
-// etc. This class is going to be used as a backing store by the
-// resolve initial references. IOR_Multicast will be responsible for
-// initialising this class.
+// Contains the class that defines the IOR lookup table.
//
// = AUTHOR
// Vishal Kachroo.
@@ -35,9 +30,14 @@
class TAO_Export TAO_IOR_LookupTable
{
- // @@ Vishal, the DESCRIPTION above belongs to the class, not to the
- // file, please move it here...
- //
+
+ // Represents a table for the IOR lookups, given the object keys. A
+ // Hash_Map_Manager is being used currently for the table. This
+ // could be changed/added-on-to by other data structures like a file
+ // etc. This class is going to be used as a backing store by the
+ // resolve initial references. IOR_Multicast will be responsible for
+ // initialising this class.
+
public:
// = Initialization and termination methods.
TAO_IOR_LookupTable (void);
@@ -50,26 +50,19 @@ public:
// This creates and initialises the table.
// Currently, the hash map manager.
- int add_ior (ACE_CString &object_name,
- ACE_CString &ior);
+ int add_ior (const ACE_CString &object_name,
+ const ACE_CString &ior);
// Associate <object_name> with <ior>. If <object_name> is already in the
// map then the <ACE_Hash_Map_Entry> is not changed. Returns 0 if a
// new IOR is bound successfully, returns 1 if an attempt is made
// to bind an existing object_name, and returns -1 if failures occur.
- int find_ior (ACE_CString &object_name,
+ int find_ior (const ACE_CString &object_name,
ACE_CString &ior);
// Locate <object_name> and pass out parameter via <ior>. If the IOR is
// found, return 0. Return -1 if not found.
private:
- // @@ Vishal the following two fields are not used in the class, do
- // you have any plans for them or should we zap them?
- ACE_CString object_name_;
- // object string to do the lookup with.
-
- ACE_CString ior_;
- // IOR returned as a result of the lookup.
ACE_Hash_Map_Manager<ACE_CString,
ACE_CString,
@@ -78,3 +71,4 @@ private:
};
#endif /* TAO_IOR_LOOKUPTABLE_H */
+
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index adff1dff9d1..d117412d31d 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -945,7 +945,7 @@ CORBA_ORB::resolve_initial_references (const char *name,
ACE_TRY_ENV);
}
- delete default_init_ref;
+ delete [] default_init_ref;
}
// Did not find it in the InitRef table, or in the DefaultInitRef
@@ -1856,7 +1856,7 @@ CORBA_ORB::_get_collocated_servant (TAO_Stub *sobj)
// Add a mapping ObjectID->IOR to the table.
int
-CORBA_ORB::_tao_add_to_IOR_table (ACE_CString &object_id,
+CORBA_ORB::_tao_add_to_IOR_table (const ACE_CString &object_id,
CORBA::Object_ptr obj)
{
if (CORBA::is_nil (obj))
@@ -1882,7 +1882,7 @@ CORBA_ORB::_tao_add_to_IOR_table (ACE_CString &object_id,
// Find an IOR in the table for the given ObjectID.
int
-CORBA_ORB::_tao_find_in_IOR_table (ACE_CString &object_id,
+CORBA_ORB::_tao_find_in_IOR_table (const ACE_CString &object_id,
CORBA::Object_ptr &obj)
{
if (TAO_debug_level > 0)
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index 0c30585f94d..e6806deea8f 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -569,11 +569,11 @@ public:
// must implement this and determine what is a collocated object
// based on information provided in the TAO_Stub.
- virtual int _tao_add_to_IOR_table (ACE_CString &object_id,
+ virtual int _tao_add_to_IOR_table (const ACE_CString &object_id,
CORBA::Object_ptr obj);
// Add a mapping ObjectID->IOR to the table.
- virtual int _tao_find_in_IOR_table (ACE_CString &object_id,
+ virtual int _tao_find_in_IOR_table (const ACE_CString &object_id,
CORBA::Object_ptr &obj);
// Find the given ObjectID in the table.