summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-08-25 19:56:43 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-08-25 19:56:43 +0000
commit20c32b845acd9a64aa8dcfc9dc18f9aa939e39da (patch)
tree1e62d5ab4bcea8baa25e16ed540c0c1a83c36945
parent2ba21484da0a176c7b084b3dc956e61be7e8bb2c (diff)
downloadATCD-20c32b845acd9a64aa8dcfc9dc18f9aa939e39da.tar.gz
ChangeLogTag: TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp:
-rw-r--r--ChangeLog59
-rw-r--r--TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp26
-rw-r--r--TAO_IDL/be/be_visitor_sequence/buffer_type.cpp11
-rw-r--r--tao/GIOP_Message_Base.cpp5
-rw-r--r--tao/IIOP_Profile.cpp2
-rw-r--r--tao/LocalObject.cpp1
-rw-r--r--tao/LocalObject.h5
-rw-r--r--tao/MProfile.cpp28
-rw-r--r--tao/MProfile.h8
-rw-r--r--tao/MProfile.inl8
-rw-r--r--tao/ORB.h3
-rw-r--r--tao/ORB_Core.cpp4
-rw-r--r--tao/ORB_Core.h4
-rw-r--r--tao/ObjRefTemplate/ORT_Adapter_Impl.cpp2
-rw-r--r--tao/ObjRefTemplate/ORT_Adapter_Impl.h2
-rw-r--r--tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp8
-rw-r--r--tao/ObjRefTemplate/ObjectReferenceTemplate_i.h6
-rw-r--r--tao/Object.cpp2
-rw-r--r--tao/Object_KeyC.cpp5
-rw-r--r--tao/Object_KeyC.h1
-rw-r--r--tao/PortableServer/Active_Object_Map.cpp9
-rw-r--r--tao/PortableServer/Active_Object_Map.h2
-rw-r--r--tao/PortableServer/Active_Object_Map.inl2
-rw-r--r--tao/PortableServer/Default_Servant_Dispatcher.cpp2
-rw-r--r--tao/PortableServer/Default_Servant_Dispatcher.h2
-rw-r--r--tao/PortableServer/Key_Adapters.cpp60
-rw-r--r--tao/PortableServer/ORT_Adapter.h2
-rw-r--r--tao/PortableServer/Object_Adapter.cpp32
-rw-r--r--tao/PortableServer/Object_Adapter.inl3
-rw-r--r--tao/PortableServer/POAManager.cpp2
-rw-r--r--tao/PortableServer/POAManagerFactory.cpp16
-rw-r--r--tao/PortableServer/POAManagerFactory.h4
-rw-r--r--tao/PortableServer/POA_Current.cpp2
-rw-r--r--tao/PortableServer/POA_Current.h2
-rw-r--r--tao/PortableServer/POA_Current_Impl.cpp11
-rw-r--r--tao/PortableServer/POA_Current_Impl.h8
-rw-r--r--tao/PortableServer/POA_Current_Impl.inl30
-rw-r--r--tao/PortableServer/POA_Policy_Set.cpp4
-rw-r--r--tao/PortableServer/PortableServer_Functions.cpp26
-rw-r--r--tao/PortableServer/PortableServer_Functions.h2
-rw-r--r--tao/PortableServer/PortableServer_WFunctions.cpp7
-rw-r--r--tao/PortableServer/Root_POA.cpp54
-rw-r--r--tao/PortableServer/Root_POA.h4
-rw-r--r--tao/PortableServer/ServantRetentionStrategy.h2
-rw-r--r--tao/PortableServer/ServantRetentionStrategyNonRetain.cpp20
-rw-r--r--tao/PortableServer/ServantRetentionStrategyNonRetain.h2
-rw-r--r--tao/PortableServer/ServantRetentionStrategyRetain.cpp66
-rw-r--r--tao/PortableServer/ServantRetentionStrategyRetain.h4
-rw-r--r--tao/PortableServer/Servant_Dispatcher.h2
-rw-r--r--tao/PortableServer/Servant_Upcall.cpp4
-rw-r--r--tao/PortableServer/Servant_Upcall.h4
-rw-r--r--tao/PortableServer/Servant_Upcall.inl4
-rw-r--r--tao/Profile.cpp12
-rw-r--r--tao/Profile.h2
54 files changed, 398 insertions, 200 deletions
diff --git a/ChangeLog b/ChangeLog
index 53ad5204e16..8bdaaf85154 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,62 @@
+Wed Aug 25 19:55:18 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp:
+ * TAO_IDL/be/be_visitor_sequence/buffer_type.cpp:
+ * tao/ORB_Core.cpp:
+ * tao/GIOP_Message_Base.cpp:
+ * tao/PortableServer/ServantRetentionStrategyNonRetain.cpp:
+ * tao/PortableServer/POA_Current.h:
+ * tao/PortableServer/Key_Adapters.cpp:
+ * tao/PortableServer/PortableServer_WFunctions.cpp:
+ * tao/PortableServer/Default_Servant_Dispatcher.cpp:
+ * tao/PortableServer/Servant_Upcall.inl:
+ * tao/PortableServer/ServantRetentionStrategyRetain.cpp:
+ * tao/PortableServer/POAManager.cpp:
+ * tao/PortableServer/PortableServer_Functions.cpp:
+ * tao/PortableServer/POA_Current_Impl.inl:
+ * tao/PortableServer/Active_Object_Map.h:
+ * tao/PortableServer/Active_Object_Map.inl:
+ * tao/PortableServer/ServantRetentionStrategy.h:
+ * tao/PortableServer/Object_Adapter.inl:
+ * tao/PortableServer/Servant_Upcall.cpp:
+ * tao/PortableServer/POAManagerFactory.cpp:
+ * tao/PortableServer/ServantRetentionStrategyRetain.h:
+ * tao/PortableServer/ORT_Adapter.h:
+ * tao/PortableServer/Servant_Upcall.h:
+ * tao/PortableServer/POAManagerFactory.h:
+ * tao/PortableServer/PortableServer_Functions.h:
+ * tao/PortableServer/POA_Current_Impl.cpp:
+ * tao/PortableServer/Active_Object_Map.cpp:
+ * tao/PortableServer/Object_Adapter.cpp:
+ * tao/PortableServer/POA_Current_Impl.h:
+ * tao/PortableServer/POA_Current.cpp:
+ * tao/PortableServer/Root_POA.cpp:
+ * tao/PortableServer/Root_POA.h:
+ * tao/PortableServer/Servant_Dispatcher.h:
+ * tao/PortableServer/Default_Servant_Dispatcher.h:
+ * tao/PortableServer/POA_Policy_Set.cpp:
+ * tao/PortableServer/ServantRetentionStrategyNonRetain.h:
+ * tao/Object_KeyC.cpp:
+ * tao/MProfile.inl:
+ * tao/MProfile.h:
+ * tao/Object_KeyC.h:
+ * tao/ObjRefTemplate/ObjectReferenceTemplate_i.h:
+ * tao/ObjRefTemplate/ORT_Adapter_Impl.cpp:
+ * tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp:
+ * tao/ObjRefTemplate/ORT_Adapter_Impl.h:
+ * tao/Profile.cpp:
+ * tao/ORB.h:
+ * tao/Profile.h:
+ * tao/ORB_Core.h:
+ * tao/IIOP_Profile.cpp:
+ * tao/Object.cpp:
+ * tao/LocalObject.cpp:
+ * tao/LocalObject.h:
+ * tao/MProfile.cpp:
+
+ More changes to make the ORB and POA compatible with the
+ alternate IDL to C++ mapping.
+
Tue Aug 24 18:13:42 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp:
diff --git a/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
index c4236637691..ec1ded0b19f 100644
--- a/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
+++ b/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
@@ -63,20 +63,28 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
{
ANY_VALUE,
ANY_OBJREF,
- ANY_ARRAY
+ ANY_ARRAY,
+ ANY_STRING
};
type_category tc = ANY_VALUE;
+ AST_Decl::NodeType nt = bt->node_type ();
- if (bt->node_type () == AST_Decl::NT_array)
+ if (nt == AST_Decl::NT_array)
{
tc = ANY_ARRAY;
}
- else if (be_interface::narrow_from_decl (bt) != 0
- && be_valuetype::narrow_from_decl (bt) == 0)
+ else if ((be_interface::narrow_from_decl (bt) != 0
+ && be_valuetype::narrow_from_decl (bt) == 0)
+ || (be_interface_fwd::narrow_from_decl (bt) != 0
+ && be_valuetype_fwd::narrow_from_decl (bt) == 0))
{
tc = ANY_OBJREF;
}
+ else if (nt == AST_Decl::NT_string)
+ {
+ tc = ANY_STRING;
+ }
if (bt->node_type () == AST_Decl::NT_pre_defined)
{
@@ -108,17 +116,20 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
case ANY_OBJREF:
*os << "insert_objref_vector<"
<< bt->full_name () << "_ptr> (";
-
+ ACE_DEBUG ((LM_DEBUG, "objref: %s\n", bt->local_name ()->get_string ()));
break;
case ANY_ARRAY:
*os << "insert_array_vector<"
<< bt->full_name () << "_forany> (";
break;
+ case ANY_STRING:
+ *os << "insert_value_vector<std::string> (";
+ break;
default:
*os << "insert_value_vector<"
<< bt->full_name () << "> (";
-
+ ACE_DEBUG ((LM_DEBUG, "default: %s\n", bt->local_name ()->get_string ()));
break;
}
@@ -147,6 +158,9 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
<< bt->full_name () << "_forany> (";
break;
+ case ANY_STRING:
+ *os << "extract_value_vector<std::string> (";
+ break;
default:
*os << "extract_value_vector<"
<< bt->full_name () << "> (";
diff --git a/TAO_IDL/be/be_visitor_sequence/buffer_type.cpp b/TAO_IDL/be/be_visitor_sequence/buffer_type.cpp
index f442e4d5ca6..06f0651b8da 100644
--- a/TAO_IDL/be/be_visitor_sequence/buffer_type.cpp
+++ b/TAO_IDL/be/be_visitor_sequence/buffer_type.cpp
@@ -202,10 +202,19 @@ int
be_visitor_sequence_buffer_type::visit_string (be_string *node)
{
TAO_OutStream *os = this->ctx_->stream ();
+ AST_Sequence *s =
+ AST_Sequence::narrow_from_decl (this->ctx_->node ());
if (node->width () == (long) sizeof (char))
{
- *os << "::CORBA::Char *";
+ if (be_global->alt_mapping () && s->unbounded ())
+ {
+ *os << "std::string";
+ }
+ else
+ {
+ *os << "::CORBA::Char *";
+ }
}
else
{
diff --git a/tao/GIOP_Message_Base.cpp b/tao/GIOP_Message_Base.cpp
index 4f6a477fc22..30bfe178489 100644
--- a/tao/GIOP_Message_Base.cpp
+++ b/tao/GIOP_Message_Base.cpp
@@ -1167,10 +1167,7 @@ TAO_GIOP_Message_Base::process_locate_request (TAO_Transport *transport,
throw ::CORBA::MARSHAL (0, CORBA::COMPLETED_NO);
}
- TAO::ObjectKey tmp_key (locate_request.object_key ().length (),
- locate_request.object_key ().length (),
- locate_request.object_key ().get_buffer (),
- 0);
+ TAO::ObjectKey tmp_key (locate_request.object_key ());
// Set it to an error state
parse_error = 1;
diff --git a/tao/IIOP_Profile.cpp b/tao/IIOP_Profile.cpp
index 0033a53f3cf..8e836a9837b 100644
--- a/tao/IIOP_Profile.cpp
+++ b/tao/IIOP_Profile.cpp
@@ -365,7 +365,7 @@ TAO_IIOP_Profile::hash (CORBA::ULong max)
const TAO::ObjectKey &ok =
this->ref_object_key_->object_key ();
- if (ok.length () >= 4)
+ if (ok.size () >= 4)
{
hashval += ok[1];
hashval += ok[3];
diff --git a/tao/LocalObject.cpp b/tao/LocalObject.cpp
index f4bfa50db97..8331a61434c 100644
--- a/tao/LocalObject.cpp
+++ b/tao/LocalObject.cpp
@@ -9,6 +9,7 @@
#include "tao/SystemException.h"
#include "tao/debug.h"
#include "tao/ORB_Constants.h"
+#include "tao/Object_KeyC.h"
#include "ace/Log_Msg.h"
#include "ace/Guard_T.h"
diff --git a/tao/LocalObject.h b/tao/LocalObject.h
index f1eff1d422e..cf7246ef144 100644
--- a/tao/LocalObject.h
+++ b/tao/LocalObject.h
@@ -33,6 +33,11 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+namespace TAO
+{
+ class ObjectKey;
+}
+
namespace CORBA
{
class LocalObject;
diff --git a/tao/MProfile.cpp b/tao/MProfile.cpp
index 4480787b92c..b3e44e89494 100644
--- a/tao/MProfile.cpp
+++ b/tao/MProfile.cpp
@@ -23,14 +23,14 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_MProfile::~TAO_MProfile (void)
{
- if (this->policy_list_ != 0)
+ if (!this->policy_list_.empty ())
{
- CORBA::ULong const len = this->policy_list_->size ();
+ CORBA::ULong const len = this->policy_list_.size ();
for (CORBA::ULong i = 0; i < len; ++i)
{
try
{
- CORBA::Policy_ptr policy = (*this->policy_list_)[i];
+ CORBA::Policy_ptr policy = this->policy_list_[i];
policy->destroy ();
}
catch (const ::CORBA::Exception&)
@@ -40,7 +40,7 @@ TAO_MProfile::~TAO_MProfile (void)
}
}
- delete this->policy_list_;
+// delete this->policy_list_;
}
this->cleanup ();
@@ -304,7 +304,7 @@ TAO_MProfile::hash (CORBA::ULong max)
// Changed to a mod value instead of an average.
return hashval % max;
}
-
+/*
void
TAO_MProfile::create_policy_list (void)
{
@@ -314,7 +314,7 @@ TAO_MProfile::create_policy_list (void)
CORBA::COMPLETED_NO)
);
}
-
+*/
void
TAO_MProfile::init_policy_list (void)
{
@@ -322,12 +322,12 @@ TAO_MProfile::init_policy_list (void)
// it causes the initialization of the policies
// for the current profile.
- this->get_current_profile ()->get_policies (*this->policy_list_);
+ this->get_current_profile ()->get_policies (this->policy_list_);
this->is_policy_list_initialized_ = true;
}
-CORBA::PolicyList *
+CORBA::PolicyList
TAO_MProfile::policy_list (void)
{
if (!this->is_policy_list_initialized_)
@@ -335,22 +335,24 @@ TAO_MProfile::policy_list (void)
ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
guard,
this->mutex_,
- 0);
+ CORBA::PolicyList ());
- if (this->policy_list_ == 0)
+ if (this->policy_list_.empty ())
{
- this->create_policy_list ();
+// this->create_policy_list ();
this->init_policy_list ();
}
}
+ /*
CORBA::PolicyList *ret_val = 0;
ACE_NEW_THROW_EX (ret_val,
CORBA::PolicyList (*this->policy_list_),
CORBA::NO_MEMORY (0,
CORBA::COMPLETED_NO));
-
- return ret_val;
+ */
+// return ret_val;
+ return this->policy_list_;
}
int
diff --git a/tao/MProfile.h b/tao/MProfile.h
index 8972b4193b3..ebeaa027dd6 100644
--- a/tao/MProfile.h
+++ b/tao/MProfile.h
@@ -179,17 +179,17 @@ protected:
/// This method handle the dynamic allocation of the data member
/// <policy_list_>.
- void create_policy_list (void);
+// void create_policy_list (void);
public:
/// Sets the policies list associated with the profiles
/// owned by the TAO_MProfile.
- void policy_list (CORBA::PolicyList *policy_list);
+ void policy_list (CORBA::PolicyList policy_list);
/// Gets the policies list associated with the profiles
/// owned by the TAO_MProfile.
- CORBA::PolicyList *policy_list (void);
+ CORBA::PolicyList policy_list (void);
protected:
@@ -199,7 +199,7 @@ protected:
protected:
/// Stores the policy list for the profile of this MProfile.
friend class TAO_Profile;
- CORBA::PolicyList *policy_list_;
+ CORBA::PolicyList policy_list_;
CORBA::Boolean is_policy_list_initialized_;
diff --git a/tao/MProfile.inl b/tao/MProfile.inl
index 2a999b71b60..a64e977143e 100644
--- a/tao/MProfile.inl
+++ b/tao/MProfile.inl
@@ -7,8 +7,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
TAO_MProfile::TAO_MProfile (CORBA::ULong sz)
- : policy_list_ (0),
- is_policy_list_initialized_ (false),
+ : is_policy_list_initialized_ (false),
forward_from_(0),
pfiles_ (0),
current_ (0),
@@ -20,8 +19,7 @@ TAO_MProfile::TAO_MProfile (CORBA::ULong sz)
ACE_INLINE
TAO_MProfile::TAO_MProfile (const TAO_MProfile &mprofiles)
- : policy_list_ (0),
- is_policy_list_initialized_ (false),
+ : is_policy_list_initialized_ (false),
forward_from_(0),
pfiles_ (0),
current_ (0),
@@ -197,7 +195,7 @@ TAO_MProfile::pfiles (void) const
}
ACE_INLINE void
-TAO_MProfile::policy_list (CORBA::PolicyList *policy_list)
+TAO_MProfile::policy_list (CORBA::PolicyList policy_list)
{
this->policy_list_ = policy_list;
}
diff --git a/tao/ORB.h b/tao/ORB.h
index b4417cb93e1..1ed894080c5 100644
--- a/tao/ORB.h
+++ b/tao/ORB.h
@@ -34,6 +34,7 @@
#include "tao/Sequence_T.h"
#include "tao/Policy_ForwardC.h"
#include "tao/ServicesC.h"
+#include "tao/StringSeqC.h"
#include "ace/Thread_Mutex.h"
#include "ace/Guard_T.h"
@@ -69,7 +70,7 @@ namespace CORBA
class StructMemberSeq;
class UnionMemberSeq;
class ValueMemberSeq;
- typedef std::vector<char *> ORB_ObjectIdList;
+ typedef StringSeq ORB_ObjectIdList;
class Object;
typedef Object * Object_ptr;
diff --git a/tao/ORB_Core.cpp b/tao/ORB_Core.cpp
index 7e4ef6b12b8..abf0a372bb7 100644
--- a/tao/ORB_Core.cpp
+++ b/tao/ORB_Core.cpp
@@ -1936,7 +1936,7 @@ TAO_ORB_Core::request_dispatcher (TAO_Request_Dispatcher *request_dispatcher)
TAO_Stub *
TAO_ORB_Core::create_stub_object (TAO_MProfile &mprofile,
const char *type_id,
- CORBA::PolicyList *policy_list)
+ CORBA::PolicyList &policy_list)
{
// Add the Polices contained in "policy_list" to each profile so
// that those policies will be exposed to the client in the IOR. In
@@ -1946,7 +1946,7 @@ TAO_ORB_Core::create_stub_object (TAO_MProfile &mprofile,
// became in turns the "body" of the IOP::TaggedComponent. This
// conversion is a responsability of the CORBA::Profile class. (See
// orbos\98-05-05.pdf Section 5.4)
- if (policy_list->size () != 0)
+ if (policy_list.size () != 0)
{
TAO_Profile * profile = 0;
diff --git a/tao/ORB_Core.h b/tao/ORB_Core.h
index aafbd4d4cd1..e98ec52dc79 100644
--- a/tao/ORB_Core.h
+++ b/tao/ORB_Core.h
@@ -114,7 +114,7 @@ namespace TAO
namespace CORBA
{
- typedef std::vector<char *> ORB_ObjectIdList;
+ typedef StringSeq ORB_ObjectIdList;
class ORB;
typedef ORB *ORB_ptr;
@@ -598,7 +598,7 @@ public:
/// based on the endpoint.
TAO_Stub *create_stub_object (TAO_MProfile &mprofile,
const char *type_id,
- CORBA::PolicyList *policy_list);
+ CORBA::PolicyList &policy_list);
/// Factory method that create the "right" Stub depending on
/// wheather RTCORBA is loaded or not. The factory used to create
diff --git a/tao/ObjRefTemplate/ORT_Adapter_Impl.cpp b/tao/ObjRefTemplate/ORT_Adapter_Impl.cpp
index 266ed9542f6..ee93e473e04 100644
--- a/tao/ObjRefTemplate/ORT_Adapter_Impl.cpp
+++ b/tao/ObjRefTemplate/ORT_Adapter_Impl.cpp
@@ -79,7 +79,7 @@ int
TAO::ORT_Adapter_Impl::activate (
const char *server_id,
const char *orb_id,
- PortableInterceptor::AdapterName *adapter_name,
+ PortableInterceptor::AdapterName &adapter_name,
PortableServer::POA_ptr poa)
{
// No need to lock here, there is one instance for each POA and
diff --git a/tao/ObjRefTemplate/ORT_Adapter_Impl.h b/tao/ObjRefTemplate/ORT_Adapter_Impl.h
index bdc9af25c20..243630ba765 100644
--- a/tao/ObjRefTemplate/ORT_Adapter_Impl.h
+++ b/tao/ObjRefTemplate/ORT_Adapter_Impl.h
@@ -42,7 +42,7 @@ namespace TAO
/// Activate this adapter
virtual int activate (const char *server_id,
const char *orb_id,
- PortableInterceptor::AdapterName *adapter_name,
+ PortableInterceptor::AdapterName adapter_name,
PortableServer::POA_ptr poa);
/// Accessor methods to ObjectReferenceTemplate template
diff --git a/tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp b/tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp
index 6dffcaa45b2..846b41478c0 100644
--- a/tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp
+++ b/tao/ObjRefTemplate/ObjectReferenceTemplate_i.cpp
@@ -15,7 +15,7 @@ namespace TAO
ObjectReferenceTemplate::ObjectReferenceTemplate (
const char *server_id,
const char *orb_id,
- PortableInterceptor::AdapterName *adapter_name,
+ PortableInterceptor::AdapterName &adapter_name,
PortableServer::POA_ptr poa)
: server_id_ (server_id),
orb_id_ (orb_id),
@@ -40,9 +40,10 @@ namespace TAO
return CORBA::string_dup (this->orb_id_);
}
- PortableInterceptor::AdapterName *
+ PortableInterceptor::AdapterName
ObjectReferenceTemplate::adapter_name (void)
{
+ /*
PortableInterceptor::AdapterName *adapter_name = 0;
ACE_NEW_THROW_EX (adapter_name,
@@ -55,6 +56,9 @@ namespace TAO
CORBA::COMPLETED_NO));
return adapter_name;
+ */
+
+ return this->adapter_name_;
}
CORBA::Object_ptr
diff --git a/tao/ObjRefTemplate/ObjectReferenceTemplate_i.h b/tao/ObjRefTemplate/ObjectReferenceTemplate_i.h
index e97ac59a3b0..ea73d58be29 100644
--- a/tao/ObjRefTemplate/ObjectReferenceTemplate_i.h
+++ b/tao/ObjRefTemplate/ObjectReferenceTemplate_i.h
@@ -58,7 +58,7 @@ namespace TAO
/// Constructor
ObjectReferenceTemplate (const char *server_id,
const char *orb_id,
- PortableInterceptor::AdapterName *adapter_name,
+ PortableInterceptor::AdapterName &adapter_name,
PortableServer::POA_ptr poa);
/**
@@ -72,7 +72,7 @@ namespace TAO
virtual char * orb_id (void);
- virtual PortableInterceptor::AdapterName * adapter_name (void);
+ virtual PortableInterceptor::AdapterName adapter_name (void);
//@}
/**
@@ -99,7 +99,7 @@ namespace TAO
private:
const char *server_id_;
const char *orb_id_;
- PortableInterceptor::AdapterName_var adapter_name_;
+ PortableInterceptor::AdapterName adapter_name_;
PortableServer::POA_var poa_;
};
}
diff --git a/tao/Object.cpp b/tao/Object.cpp
index 465cf1c86e3..b5c769e5745 100644
--- a/tao/Object.cpp
+++ b/tao/Object.cpp
@@ -324,7 +324,7 @@ CORBA::Object::_is_equivalent (CORBA::Object_ptr other_obj)
TAO::ObjectKey
CORBA::Object::_key (void)
{
- TAO_OBJECT_IOR_EVALUATE_RETURN(0);
+ TAO_OBJECT_IOR_EVALUATE_RETURN(TAO::ObjectKey ());
if (this->_stubobj () && this->_stubobj ()->profile_in_use ())
return this->_stubobj ()->profile_in_use ()->_key ();
diff --git a/tao/Object_KeyC.cpp b/tao/Object_KeyC.cpp
index 126a298022a..3e5fe7641a1 100644
--- a/tao/Object_KeyC.cpp
+++ b/tao/Object_KeyC.cpp
@@ -58,6 +58,11 @@ namespace TAO
TAO::ObjectKey::ObjectKey (void)
{}
+TAO::ObjectKey::ObjectKey (const TAO::ObjectKey &rhs)
+ : std::vector< ::CORBA::Octet> (rhs)
+{
+}
+
TAO::ObjectKey::~ObjectKey (void)
{}
diff --git a/tao/Object_KeyC.h b/tao/Object_KeyC.h
index 2521b475b43..ae0728a4baa 100644
--- a/tao/Object_KeyC.h
+++ b/tao/Object_KeyC.h
@@ -74,6 +74,7 @@ namespace TAO
{
public:
ObjectKey (void);
+ ObjectKey (const ObjectKey &rhs);
~ObjectKey (void);
/*
#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
diff --git a/tao/PortableServer/Active_Object_Map.cpp b/tao/PortableServer/Active_Object_Map.cpp
index 95ff4af547e..63da2a07575 100644
--- a/tao/PortableServer/Active_Object_Map.cpp
+++ b/tao/PortableServer/Active_Object_Map.cpp
@@ -1050,12 +1050,19 @@ int
TAO_No_Hint_Strategy::recover_key (const PortableServer::ObjectId &system_id,
PortableServer::ObjectId &user_id)
{
+ user_id.resize (system_id.size ());
+
+ for (CORBA::ULong i = 0; i < system_id.size (); ++i)
+ {
+ user_id[i] = system_id[i];
+ }
+/*
// Smartly copy all the data; <user_id does not own the data>.
user_id.replace (system_id.maximum (),
system_id.length (),
const_cast<CORBA::Octet *> (system_id.get_buffer ()),
0);
-
+*/
return 0;
}
diff --git a/tao/PortableServer/Active_Object_Map.h b/tao/PortableServer/Active_Object_Map.h
index 98943ef0cf8..4ee12e85f50 100644
--- a/tao/PortableServer/Active_Object_Map.h
+++ b/tao/PortableServer/Active_Object_Map.h
@@ -166,7 +166,7 @@ public:
/// the @a system_id is identical to @a user_id.
int
find_user_id_using_system_id (const PortableServer::ObjectId &system_id,
- const PortableServer::ObjectId &user_id);
+ PortableServer::ObjectId &user_id);
/// Are there any remaining activations of @a servant in the active
/// object map? Can be used with any policy.
diff --git a/tao/PortableServer/Active_Object_Map.inl b/tao/PortableServer/Active_Object_Map.inl
index b21fa16b32a..5fda24e7eb1 100644
--- a/tao/PortableServer/Active_Object_Map.inl
+++ b/tao/PortableServer/Active_Object_Map.inl
@@ -256,7 +256,7 @@ TAO_Active_Object_Map::find_servant_and_system_id_using_user_id (
ACE_INLINE int
TAO_Active_Object_Map::find_user_id_using_system_id (
const PortableServer::ObjectId &system_id,
- const PortableServer::ObjectId &user_id)
+ PortableServer::ObjectId &user_id)
{
return this->id_hint_strategy_->recover_key (system_id, user_id);
}
diff --git a/tao/PortableServer/Default_Servant_Dispatcher.cpp b/tao/PortableServer/Default_Servant_Dispatcher.cpp
index 284fb7e1dd9..867ca5dcf33 100644
--- a/tao/PortableServer/Default_Servant_Dispatcher.cpp
+++ b/tao/PortableServer/Default_Servant_Dispatcher.cpp
@@ -17,7 +17,7 @@ TAO_Default_Servant_Dispatcher::~TAO_Default_Servant_Dispatcher (void)
}
TAO_Root_POA *
-TAO_Default_Servant_Dispatcher::create_Root_POA (const ACE_CString &name,
+TAO_Default_Servant_Dispatcher::create_Root_POA (const std::string &name,
PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
diff --git a/tao/PortableServer/Default_Servant_Dispatcher.h b/tao/PortableServer/Default_Servant_Dispatcher.h
index 5b988184834..1f5c300ecb0 100644
--- a/tao/PortableServer/Default_Servant_Dispatcher.h
+++ b/tao/PortableServer/Default_Servant_Dispatcher.h
@@ -59,7 +59,7 @@ public:
/// Factory method for creating new POA's.
TAO_Root_POA *create_Root_POA (
- const ACE_CString &name,
+ const std::string &name,
PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
diff --git a/tao/PortableServer/Key_Adapters.cpp b/tao/PortableServer/Key_Adapters.cpp
index bd9fae695d4..01938ffe814 100644
--- a/tao/PortableServer/Key_Adapters.cpp
+++ b/tao/PortableServer/Key_Adapters.cpp
@@ -23,13 +23,20 @@ int
TAO_Incremental_Key_Generator::operator() (PortableServer::ObjectId &id)
{
// Resize to accommodate the counter.
- id.length (sizeof this->counter_);
-
+ id.resize (sizeof this->counter_);
+
+ char *tmp = reinterpret_cast<char *> (&this->counter_);
+
+ for (CORBA::ULong i = 0; i < id.size (); ++i)
+ {
+ id[i] = tmp[i];
+ }
+/*
// Add new key data.
ACE_OS::memcpy (id.get_buffer (),
&++this->counter_,
sizeof this->counter_);
-
+*/
// Success.
return 0;
}
@@ -39,8 +46,8 @@ TAO_Incremental_Key_Generator::operator() (PortableServer::ObjectId &id)
u_long
TAO_ObjectId_Hash::operator () (const PortableServer::ObjectId &id) const
{
- return ACE::hash_pjw ((const char *) id.get_buffer (),
- id.length ());
+ return ACE::hash_pjw ((const char *) id.get_allocator ().address (*id.begin ()),
+ id.size ());
}
////////////////////////////////////////////////////////////////////////////////
@@ -54,10 +61,10 @@ TAO_Ignore_Original_Key_Adapter::encode (const PortableServer::ObjectId &,
size_t const active_key_size = active_key.size ();
// Resize to accommodate both the original data and the new active key.
- modified_key.length (static_cast <CORBA::ULong> (active_key_size));
+ modified_key.resize (active_key_size);
// Copy active key data into user key.
- active_key.encode (modified_key.get_buffer ());
+ active_key.encode (modified_key.get_allocator ().address (*modified_key.begin ()));
// Success.
return 0;
@@ -68,7 +75,7 @@ TAO_Ignore_Original_Key_Adapter::decode (const PortableServer::ObjectId &modifie
ACE_Active_Map_Manager_Key &active_key)
{
// Read off value of index and generation.
- active_key.decode (modified_key.get_buffer ());
+ active_key.decode (modified_key.get_allocator ().address (*modified_key.begin ()));
// Success.
return 0;
@@ -78,13 +85,20 @@ int
TAO_Ignore_Original_Key_Adapter::decode (const PortableServer::ObjectId &modified_key,
PortableServer::ObjectId &original_key)
{
+ original_key.resize (modified_key.size ());
+
+ for (CORBA::ULong i = 0; i < modified_key.size (); ++i)
+ {
+ original_key[i] = modified_key[i];
+ }
+/*
// Smartly copy all the data; <original_key does not own the data>.
original_key.replace (modified_key.maximum (),
modified_key.length (),
const_cast <CORBA::Octet *>
(modified_key.get_buffer ()),
0);
-
+*/
// Success.
return 0;
}
@@ -100,17 +114,22 @@ TAO_Preserve_Original_Key_Adapter::encode (const PortableServer::ObjectId &origi
size_t const active_key_size = active_key.size ();
// Resize to accommodate both the original data and the new active key.
- modified_key.length (static_cast <CORBA::ULong> (active_key_size)
- + original_key.length ());
+ modified_key.resize (static_cast <CORBA::ULong> (active_key_size)
+ + original_key.size ());
// Copy active key data into user key.
- active_key.encode (modified_key.get_buffer ());
-
+ active_key.encode (modified_key.get_allocator ().address (*modified_key.begin ()));
+
+ for (CORBA::ULong i = 0; i < original_key.size (); ++i)
+ {
+ modified_key[i + active_key_size] = original_key[i];
+ }
+/*
// Copy the original key after the active key.
ACE_OS::memcpy (modified_key.get_buffer () + active_key_size,
original_key.get_buffer (),
original_key.length ());
-
+*/
// Success.
return 0;
}
@@ -120,7 +139,7 @@ TAO_Preserve_Original_Key_Adapter::decode (const PortableServer::ObjectId &modif
ACE_Active_Map_Manager_Key &active_key)
{
// Read off value of index and generation.
- active_key.decode (modified_key.get_buffer ());
+ active_key.decode (modified_key.get_allocator ().address (*modified_key.begin ()));
// Success.
return 0;
@@ -132,7 +151,14 @@ TAO_Preserve_Original_Key_Adapter::decode (const PortableServer::ObjectId &modif
{
// Size of active key.
size_t const active_key_size = ACE_Active_Map_Manager_Key::size ();
-
+ size_t newsize = modified_key.size () - active_key_size;
+ original_key.resize (newsize);
+
+ for (CORBA::ULong i = 0; i < newsize; ++i)
+ {
+ original_key[i] = modified_key[i + active_key_size];
+ }
+/*
// Smartly copy all the data; <original_key does not own the data>.
original_key.replace (static_cast <CORBA::ULong>
(modified_key.maximum () - active_key_size),
@@ -141,7 +167,7 @@ TAO_Preserve_Original_Key_Adapter::decode (const PortableServer::ObjectId &modif
const_cast <CORBA::Octet *>
(modified_key.get_buffer ()) + active_key_size,
0);
-
+*/
// Success.
return 0;
}
diff --git a/tao/PortableServer/ORT_Adapter.h b/tao/PortableServer/ORT_Adapter.h
index 96918af52df..bf78e86af8c 100644
--- a/tao/PortableServer/ORT_Adapter.h
+++ b/tao/PortableServer/ORT_Adapter.h
@@ -61,7 +61,7 @@ namespace TAO
/// Activate the ORT library
virtual int activate (const char *server_id,
const char *orb_id,
- PortableInterceptor::AdapterName *,
+ PortableInterceptor::AdapterName,
PortableServer::POA_ptr poa) = 0;
/// Set a different ort_factory to be used.
diff --git a/tao/PortableServer/Object_Adapter.cpp b/tao/PortableServer/Object_Adapter.cpp
index ee487547996..6a5c8edcc2c 100644
--- a/tao/PortableServer/Object_Adapter.cpp
+++ b/tao/PortableServer/Object_Adapter.cpp
@@ -445,7 +445,7 @@ TAO_Object_Adapter::activate_poa (const poa_name &folded_name,
iteratable_poa_name::iterator end = ipn.end ();
TAO_Root_POA *parent = this->root_;
- if (parent == 0 || parent->name () != *iterator)
+ if (parent == 0 || parent->name () != (*iterator).c_str ())
throw ::CORBA::OBJ_ADAPTER ();
else
++iterator;
@@ -458,7 +458,7 @@ TAO_Object_Adapter::activate_poa (const poa_name &folded_name,
try
{
- current = parent->find_POA_i (*iterator, 1);
+ current = parent->find_POA_i ((*iterator).c_str (), 1);
}
catch (const PortableServer::POA::AdapterNonExistent&)
{
@@ -715,8 +715,8 @@ TAO_Object_Adapter::dispatch (TAO::ObjectKey &key,
TAO_ServerRequest &request,
CORBA::Object_out forward_to)
{
- if (key.length() < TAO_Root_POA::TAO_OBJECTKEY_PREFIX_SIZE
- || ACE_OS::memcmp (key.get_buffer (),
+ if (key.size() < TAO_Root_POA::TAO_OBJECTKEY_PREFIX_SIZE
+ || ACE_OS::memcmp (key.get_allocator ().address (*key.begin ()),
&TAO_Root_POA::objectkey_prefix[0],
TAO_Root_POA::TAO_OBJECTKEY_PREFIX_SIZE) != 0)
{
@@ -924,10 +924,10 @@ TAO_Object_Adapter::get_collocated_servant (const TAO_MProfile &mp)
++j)
{
const TAO_Profile *profile = mp.get_profile (j);
- TAO::ObjectKey_var objkey = profile->_key ();
+ TAO::ObjectKey objkey = profile->_key ();
- if (objkey->length() < TAO_Root_POA::TAO_OBJECTKEY_PREFIX_SIZE
- || ACE_OS::memcmp (objkey->get_buffer (),
+ if (objkey.size() < TAO_Root_POA::TAO_OBJECTKEY_PREFIX_SIZE
+ || ACE_OS::memcmp (objkey.get_allocator ().address (*objkey.begin ()),
&TAO_Root_POA::objectkey_prefix[0],
TAO_Root_POA::TAO_OBJECTKEY_PREFIX_SIZE) != 0)
continue;
@@ -936,7 +936,7 @@ TAO_Object_Adapter::get_collocated_servant (const TAO_MProfile &mp)
try
{
- this->find_servant (objkey.in (), servant);
+ this->find_servant (objkey, servant);
}
catch (const ::CORBA::Exception&)
{
@@ -1016,9 +1016,12 @@ TAO_Object_Adapter::Active_Hint_Strategy::bind_persistent_poa (
if (result != 0)
this->persistent_poa_system_map_.unbind (name);
else
+ system_name = name;
+ /*
ACE_NEW_RETURN (system_name,
poa_name (name),
-1);
+ */
}
return result;
@@ -1068,9 +1071,12 @@ TAO_Object_Adapter::No_Hint_Strategy::bind_persistent_poa (
int result =
this->object_adapter_->persistent_poa_name_map_->bind (folded_name, poa);
if (result == 0)
+ system_name = folded_name;
+ /*
ACE_NEW_RETURN (system_name,
poa_name (folded_name),
-1);
+ */
return result;
}
@@ -1158,16 +1164,18 @@ TAO_Object_Adapter::iteratable_poa_name::iterator
TAO_Object_Adapter::iteratable_poa_name::begin (void) const
{
return iterator (1,
- this->folded_name_.length (),
- this->folded_name_.get_buffer ());
+ this->folded_name_.size (),
+ this->folded_name_.get_allocator ().address (
+ *this->folded_name_.begin ()));
}
TAO_Object_Adapter::iteratable_poa_name::iterator
TAO_Object_Adapter::iteratable_poa_name::end (void) const
{
return iterator (0,
- this->folded_name_.length (),
- this->folded_name_.get_buffer ());
+ this->folded_name_.size (),
+ this->folded_name_.get_allocator ().address (
+ *this->folded_name_.begin ()));
}
void
diff --git a/tao/PortableServer/Object_Adapter.inl b/tao/PortableServer/Object_Adapter.inl
index 2d4414b1b93..a123261bfc9 100644
--- a/tao/PortableServer/Object_Adapter.inl
+++ b/tao/PortableServer/Object_Adapter.inl
@@ -105,9 +105,12 @@ TAO_Object_Adapter::bind_transient_poa (TAO_Root_POA *poa,
if (result == 0)
{
+ system_name = name;
+ /*
ACE_NEW_RETURN (system_name,
poa_name (name),
-1);
+ */
}
return result;
diff --git a/tao/PortableServer/POAManager.cpp b/tao/PortableServer/POAManager.cpp
index 675857c1007..02ab343da6e 100644
--- a/tao/PortableServer/POAManager.cpp
+++ b/tao/PortableServer/POAManager.cpp
@@ -167,7 +167,7 @@ TAO_POA_Manager::adapter_manager_state_changed (PortableServer::POAManager::Stat
if (ior_adapter)
{
- ior_adapter->adapter_manager_state_changed (this->id_,
+ ior_adapter->adapter_manager_state_changed (this->id_.c_str (),
adapter_state);
}
}
diff --git a/tao/PortableServer/POAManagerFactory.cpp b/tao/PortableServer/POAManagerFactory.cpp
index a595b7f9bf0..c9d0e57702a 100644
--- a/tao/PortableServer/POAManagerFactory.cpp
+++ b/tao/PortableServer/POAManagerFactory.cpp
@@ -26,7 +26,7 @@ TAO_POAManager_Factory::~TAO_POAManager_Factory (void)
::PortableServer::POAManager_ptr
TAO_POAManager_Factory::create_POAManager (
- const char * id,
+ const std::string id,
const ::CORBA::PolicyList & policies
)
{
@@ -50,7 +50,7 @@ TAO_POAManager_Factory::create_POAManager (
PortableServer::POAManager_var poamanager;
- if (id != 0)
+ if (!id.empty ())
{
poamanager = this->find (id);
@@ -66,7 +66,7 @@ TAO_POAManager_Factory::create_POAManager (
{
PortableServer::POAManager_ptr pm = 0;
ACE_NEW_THROW_EX (pm,
- TAO_POA_Manager (object_adapter_, id, policies, this),
+ TAO_POA_Manager (object_adapter_, id.c_str (), policies, this),
CORBA::NO_MEMORY
(CORBA::SystemException::_tao_minor_code (0, ENOMEM),
CORBA::COMPLETED_NO));
@@ -90,7 +90,7 @@ TAO_POAManager_Factory::list (void)
number_of_poamanagers),
CORBA::NO_MEMORY ());
*/
- poamanagers->resize (number_of_poamanagers);
+ poamanagers.resize (number_of_poamanagers);
CORBA::ULong index = 0;
for (POAMANAGERSET::iterator iterator = this->poamanager_set_.begin ();
@@ -102,11 +102,11 @@ TAO_POAManager_Factory::list (void)
// PortableServer::POAManager::_duplicate (poamanager);
}
- return poamanagers._retn ();
+ return poamanagers;
}
::PortableServer::POAManager_ptr
-TAO_POAManager_Factory::find (const char * id)
+TAO_POAManager_Factory::find (const std::string id)
{
::PortableServer::POAManager_ptr poamanager =
::PortableServer::POAManager::_nil();
@@ -115,9 +115,9 @@ TAO_POAManager_Factory::find (const char * id)
iterator != this->poamanager_set_.end ();
++iterator)
{
- CORBA::String_var poamanagerid = (*iterator)->get_id ();
+ CORBA::String_var poamanagerid = (*iterator)->get_id ().c_str ();
- if (ACE_OS::strcmp (id, poamanagerid.in()) == 0)
+ if (ACE_OS::strcmp (id.c_str (), poamanagerid.in()) == 0)
{
poamanager = PortableServer::POAManager::_duplicate (*iterator);
break;
diff --git a/tao/PortableServer/POAManagerFactory.h b/tao/PortableServer/POAManagerFactory.h
index 6476bc223c1..fe251352315 100644
--- a/tao/PortableServer/POAManagerFactory.h
+++ b/tao/PortableServer/POAManagerFactory.h
@@ -48,12 +48,12 @@ public:
virtual ~TAO_POAManager_Factory (void);
virtual ::PortableServer::POAManager_ptr create_POAManager (
- const char * id,
+ const std::string id,
const ::CORBA::PolicyList & policies);
virtual ::PortableServer::POAManagerFactory::POAManagerSeq list (void);
- virtual ::PortableServer::POAManager_ptr find (const char * id);
+ virtual ::PortableServer::POAManager_ptr find (const std::string id);
void remove_all_poamanagers (void);
diff --git a/tao/PortableServer/POA_Current.cpp b/tao/PortableServer/POA_Current.cpp
index defd9558ce1..3ba22eb2f89 100644
--- a/tao/PortableServer/POA_Current.cpp
+++ b/tao/PortableServer/POA_Current.cpp
@@ -27,7 +27,7 @@ namespace TAO
return impl->get_POA ();
}
- PortableServer::ObjectId *
+ PortableServer::ObjectId
POA_Current::get_object_id (void)
{
POA_Current_Impl *impl = this->implementation ();
diff --git a/tao/PortableServer/POA_Current.h b/tao/PortableServer/POA_Current.h
index 4c08ad16c2a..c77f098186f 100644
--- a/tao/PortableServer/POA_Current.h
+++ b/tao/PortableServer/POA_Current.h
@@ -55,7 +55,7 @@ namespace TAO
* raise the @c NoContext exception if this function is not
* invoked in the context of an upcall.
*/
- PortableServer::ObjectId *get_object_id (void);
+ PortableServer::ObjectId get_object_id (void);
/**
* This operation returns a locally manufactured reference to the object
diff --git a/tao/PortableServer/POA_Current_Impl.cpp b/tao/PortableServer/POA_Current_Impl.cpp
index 87c214651a5..5350ae60e6c 100644
--- a/tao/PortableServer/POA_Current_Impl.cpp
+++ b/tao/PortableServer/POA_Current_Impl.cpp
@@ -23,8 +23,8 @@ namespace TAO
{
POA_Current_Impl::POA_Current_Impl (void)
: poa_ (0),
- object_id_ (TAO_POA_OBJECT_ID_BUF_SIZE, 0, object_id_buf_),
- object_key_ (0),
+// object_id_ (TAO_POA_OBJECT_ID_BUF_SIZE, 0, object_id_buf_),
+// object_key_ (0),
servant_ (0),
priority_ (TAO_INVALID_PRIORITY),
previous_current_impl_ (0),
@@ -37,7 +37,7 @@ namespace TAO
{
// Remember information about this upcall.
this->poa_ = p;
- this->object_key_ = &key;
+ this->object_key_ = key;
// Set the current context and remember the old one.
this->tss_resources_ = TAO_TSS_Resources::instance ();
@@ -73,15 +73,18 @@ namespace TAO
return PortableServer::POA::_duplicate (this->poa_);
}
- PortableServer::ObjectId *
+ PortableServer::ObjectId
POA_Current_Impl::get_object_id (void)
{
+ PortableServer::ObjectId objid;
+ /*
PortableServer::ObjectId *objid = 0;
// Create a new one and pass it back
ACE_NEW_RETURN (objid,
PortableServer::ObjectId (this->object_id_),
0);
+ */
return objid;
}
diff --git a/tao/PortableServer/POA_Current_Impl.h b/tao/PortableServer/POA_Current_Impl.h
index a03e6077233..68a584e7769 100644
--- a/tao/PortableServer/POA_Current_Impl.h
+++ b/tao/PortableServer/POA_Current_Impl.h
@@ -22,6 +22,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/PortableServer/PS_ForwardC.h"
+#include "tao/Object_KeyC.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -77,7 +78,7 @@ namespace TAO
* This may be necessary in cases where a <Servant> is serving under
* the guise of multiple object ids.
*/
- PortableServer::ObjectId *get_object_id (void);
+ PortableServer::ObjectId get_object_id (void);
/**
* Returns a reference to the servant that hosts the object in whose
@@ -151,7 +152,8 @@ namespace TAO
/// In order to avoid memory allocations, we will populate
/// the object id with this buffer.
- CORBA::Octet object_id_buf_[TAO_POA_OBJECT_ID_BUF_SIZE];
+// CORBA::Octet object_id_buf_[TAO_POA_OBJECT_ID_BUF_SIZE];
+ PortableServer::ObjectId object_id_buf_;
/**
* The object ID of the current context. This is the user id and
@@ -161,7 +163,7 @@ namespace TAO
PortableServer::ObjectId object_id_;
/// The object key of the current context.
- const TAO::ObjectKey *object_key_;
+ TAO::ObjectKey object_key_;
/// The servant for the current upcall.
PortableServer::Servant servant_;
diff --git a/tao/PortableServer/POA_Current_Impl.inl b/tao/PortableServer/POA_Current_Impl.inl
index cf3fee49d65..d8077bc29a8 100644
--- a/tao/PortableServer/POA_Current_Impl.inl
+++ b/tao/PortableServer/POA_Current_Impl.inl
@@ -25,17 +25,23 @@ namespace TAO
ACE_INLINE void
POA_Current_Impl::object_id (const PortableServer::ObjectId &id)
{
- if (this->object_id_.release () ||
- this->object_id_.get_buffer() == this->object_id_buf_)
+// if (this->object_id_.release () ||
+// this->object_id_.get_buffer() == this->object_id_buf_)
+ if (this->object_id_ == this->object_id_buf_)
{
// Resize the current object_id_. If it is less than the
// length of the current buffer, no allocation will take place.
- size_t id_size = id.length ();
- this->object_id_.length (id_size);
+ size_t id_size = id.size ();
+ this->object_id_.resize (id_size);
+
+ for (CORBA::ULong i = 0; i < id_size; ++i)
+ {
+ this->object_id_[i] = id[i];
+ }
// Get the buffer and copy the new object id in it's place.
- ACE_OS::memcpy (this->object_id_.get_buffer (),
- id.get_buffer (), id_size);
+// ACE_OS::memcpy (this->object_id_.get_buffer (),
+// id.get_buffer (), id_size);
}
else
{
@@ -53,24 +59,32 @@ namespace TAO
POA_Current_Impl::replace_object_id (
const PortableServer::ObjectId &system_id)
{
+ this->object_id_.resize (system_id.size ());
+
+ for (CORBA::ULong i = 0; i < system_id.size (); ++i)
+ {
+ this->object_id_[i] = system_id[i];
+ }
+ /*
// This has the effect of replacing the underlying buffer
// with that of another object id without copying.
object_id_.replace (system_id.maximum (),
system_id.length (),
const_cast <CORBA::Octet *> (system_id.get_buffer ()),
0);
+ */
}
ACE_INLINE void
POA_Current_Impl::object_key (const TAO::ObjectKey &key)
{
- this->object_key_ = &key;
+ this->object_key_ = key;
}
ACE_INLINE const TAO::ObjectKey &
POA_Current_Impl::object_key (void) const
{
- return *this->object_key_;
+ return this->object_key_;
}
ACE_INLINE void
diff --git a/tao/PortableServer/POA_Policy_Set.cpp b/tao/PortableServer/POA_Policy_Set.cpp
index cc4dcde4925..b0eabe6df89 100644
--- a/tao/PortableServer/POA_Policy_Set.cpp
+++ b/tao/PortableServer/POA_Policy_Set.cpp
@@ -47,8 +47,8 @@ TAO_POA_Policy_Set::add_client_exposed_fixed_policies (
// If this policy is client exposed, add it to the list.
if (policy->_tao_scope () & TAO_POLICY_CLIENT_EXPOSED)
{
- client_exposed_policies->length (cep_index + 1);
- (*client_exposed_policies)[cep_index] = policy->copy ();
+ client_exposed_policies.resize (cep_index + 1);
+ client_exposed_policies[cep_index] = policy->copy ();
++cep_index;
}
}
diff --git a/tao/PortableServer/PortableServer_Functions.cpp b/tao/PortableServer/PortableServer_Functions.cpp
index ac70be706c3..4c0eb618345 100644
--- a/tao/PortableServer/PortableServer_Functions.cpp
+++ b/tao/PortableServer/PortableServer_Functions.cpp
@@ -10,7 +10,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace PortableServer
{
- PortableServer::ObjectId *
+ PortableServer::ObjectId
string_to_ObjectId (const char *string)
{
// Size of string
@@ -20,7 +20,15 @@ namespace PortableServer
//
CORBA::ULong buffer_size = static_cast <CORBA::ULong>
(ACE_OS::strlen (string));
-
+
+ PortableServer::ObjectId id;
+ id.resize (buffer_size);
+
+ for (CORBA::ULong i = 0; i < buffer_size; ++i)
+ {
+ id[i] = string[i];
+ }
+/*
// Create the buffer for the Id
CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (buffer_size);
@@ -35,21 +43,27 @@ namespace PortableServer
buffer,
1),
0);
-
+*/
return id;
}
char *
ObjectId_to_string (const PortableServer::ObjectId &id)
{
+ CORBA::ULong length = id.size ();
// Create space
- char * string = CORBA::string_alloc (id.length ());
+ char * string = CORBA::string_alloc (length);
// Copy the data
- ACE_OS::memcpy (string, id.get_buffer (), id.length ());
+// ACE_OS::memcpy (string, id.get_buffer (), id.length ());
+
+ for (CORBA::ULong i = 0; i < length; ++i)
+ {
+ string[i] = id[i];
+ }
// Null terminate the string
- string[id.length ()] = '\0';
+ string[length] = '\0';
// Return string
return string;
diff --git a/tao/PortableServer/PortableServer_Functions.h b/tao/PortableServer/PortableServer_Functions.h
index e14222ac6b9..047b5550884 100644
--- a/tao/PortableServer/PortableServer_Functions.h
+++ b/tao/PortableServer/PortableServer_Functions.h
@@ -48,7 +48,7 @@ namespace PortableServer
TAO_NAMESPACE_STORAGE_CLASS char* ObjectId_to_string (
const PortableServer::ObjectId &id);
- TAO_NAMESPACE_STORAGE_CLASS PortableServer::ObjectId *string_to_ObjectId (
+ TAO_NAMESPACE_STORAGE_CLASS PortableServer::ObjectId string_to_ObjectId (
const char *id);
}
diff --git a/tao/PortableServer/PortableServer_WFunctions.cpp b/tao/PortableServer/PortableServer_WFunctions.cpp
index d980f303b74..6bd25c45aaa 100644
--- a/tao/PortableServer/PortableServer_WFunctions.cpp
+++ b/tao/PortableServer/PortableServer_WFunctions.cpp
@@ -13,6 +13,8 @@ namespace PortableServer
PortableServer::ObjectId *
wstring_to_ObjectId (const CORBA::WChar *string)
{
+ throw ::CORBA::NO_IMPLEMENT ();
+/*
// Size of Id
//
// We DO NOT include the zero terminator, as this is simply an
@@ -38,11 +40,15 @@ namespace PortableServer
0);
return id;
+*/
}
CORBA::WChar *
ObjectId_to_wstring (const PortableServer::ObjectId &id)
{
+ throw ::CORBA::NO_IMPLEMENT ();
+
+ /*
// Compute resulting wide string's length.
CORBA::ULong string_length =
id.length () / sizeof (CORBA::WChar);
@@ -65,6 +71,7 @@ namespace PortableServer
// Return string.
return string;
+ */
}
}
diff --git a/tao/PortableServer/Root_POA.cpp b/tao/PortableServer/Root_POA.cpp
index 9161f443fc3..c21d9a8036e 100644
--- a/tao/PortableServer/Root_POA.cpp
+++ b/tao/PortableServer/Root_POA.cpp
@@ -471,8 +471,9 @@ TAO_Root_POA::create_POA_i (const char *adapter_name,
// The POAManager name will be generated when the POAManager instance
// is created.
+ std::string dummy;
the_poa_manager
- = tao_poa_manager_factory->create_POAManager (0, empty_policies);
+ = tao_poa_manager_factory->create_POAManager (dummy, empty_policies);
#else
PortableServer::POAManager_ptr the_poa_manager_ptr;
@@ -714,7 +715,7 @@ TAO_Root_POA::servant_to_id (PortableServer::Servant servant)
return this->servant_to_id_i (servant);
}
-PortableServer::ObjectId *
+PortableServer::ObjectId
TAO_Root_POA::servant_to_user_id (PortableServer::Servant servant)
{
return this->active_policy_strategies_.servant_retention_strategy()->
@@ -1046,7 +1047,7 @@ TAO_Root_POA::adapter_name_i (void)
for (CORBA::ULong i = 1; i < len; ++i)
{
// (*names)[--ilen] = poa->the_name ().c_str ();
- names[--ilen].assign (poa->the_name);
+ names[--ilen].assign (poa->the_name ());
poa = poa->the_parent ();
@@ -1656,7 +1657,7 @@ TAO_Root_POA::parse_key (const TAO::ObjectKey &key,
if (!is_persistent)
{
// Take the creation time for the timestamp
- poa_creation_time.creation_time (key_data + starting_at);
+ poa_creation_time.creation_time (&key + starting_at);
// Skip past the timestamp
starting_at += TAO::Portable_Server::Creation_Time::creation_time_length ();
@@ -1676,15 +1677,20 @@ TAO_Root_POA::parse_key (const TAO::ObjectKey &key,
{
// System ids have fixed size.
poa_name_size = static_cast <CORBA::ULong>
- (key.length () - starting_at -
+ (key.size () - starting_at -
TAO_Active_Object_Map::system_id_size ());
}
else
{
+ poa_name_size =
+ *(reinterpret_cast<const CORBA::ULong *> (
+ key.get_allocator ().address (key[starting_at])));
+ /*
// Get the size from the object key.
ACE_OS::memcpy (&poa_name_size,
key_data + starting_at,
sizeof (poa_name_size));
+ */
poa_name_size = ACE_NTOHL (poa_name_size);
starting_at += sizeof (poa_name_size);
@@ -1854,19 +1860,27 @@ TAO_Root_POA::set_id (TAO_Root_POA *parent)
starting_at += this->root_key_type_length ();
// Add the id_assignment part
- this->active_policy_strategies_.id_assignment_strategy()->create_key (buffer, starting_at);
+ this->active_policy_strategies_.id_assignment_strategy()->create_key (
+ this->id_.get_allocator ().address (*this->id_.begin ()),
+ starting_at);
// Add the lifespan part
- this->active_policy_strategies_.lifespan_strategy()->create_key (buffer, starting_at);
+ this->active_policy_strategies_.lifespan_strategy()->create_key (
+ this->id_.get_allocator ().address (*this->id_.begin ()),
+ starting_at);
// Check if we need to added the length of the POA name.
if (add_poa_name_length)
{
poa_name_length = ACE_HTONL (poa_name_length);
+ const char *tbuf =
+ reinterpret_cast<const char *> (&poa_name_length);
for (CORBA::ULong i = 0; i < sizeof (poa_name_length); ++i)
{
- buffer[starting_at++] = poa_name_length[i];
+ CORBA::OctetSeq::iterator it = this->id_.begin ();
+ this->id_.insert (it + starting_at, tbuf[i]);
+ ++starting_at;
}
/*
@@ -1883,7 +1897,9 @@ TAO_Root_POA::set_id (TAO_Root_POA *parent)
{
for (CORBA::ULong i = 0; i < this->system_name_.size (); ++i)
{
- buffer[starting_at++] = this->system_name_[i];
+ CORBA::OctetSeq::iterator it = this->id_.begin ();
+ this->id_.insert (it + starting_at, this->system_name_[i]);
+ ++starting_at;
}
/*
@@ -2171,7 +2187,7 @@ TAO_Root_POA::key_to_stub_i (const TAO::ObjectKey &key,
this->create_stub_object (
key,
type_id,
- client_exposed_policies._retn (),
+ client_exposed_policies,
filter,
this->orb_core_.lane_resources ().acceptor_registry ());
@@ -2205,9 +2221,9 @@ TAO_Root_POA::components_established (PortableInterceptor::IORInfo_ptr info)
void
TAO_Root_POA::save_ior_component (const IOP::TaggedComponent &component)
{
- CORBA::ULong const old_len = this->tagged_component_.length ();
+ CORBA::ULong const old_len = this->tagged_component_.size ();
- this->tagged_component_.length (old_len + 1);
+ this->tagged_component_.resize (old_len + 1);
this->tagged_component_[old_len] = component;
}
@@ -2222,11 +2238,11 @@ save_ior_component_and_profile_id (const IOP::TaggedComponent &component,
// this->tagged_component_id_ is increased, we need to increase the
// size of this->profile_id_array_ also.
- CORBA::ULong const old_len = this->tagged_component_id_.length ();
+ CORBA::ULong const old_len = this->tagged_component_id_.size ();
CORBA::ULong const new_len = old_len + 1;
- this->tagged_component_id_.length (new_len);
+ this->tagged_component_id_.resize (new_len);
this->tagged_component_id_[old_len] = component;
this->profile_id_array_.size (new_len);
@@ -2236,7 +2252,7 @@ save_ior_component_and_profile_id (const IOP::TaggedComponent &component,
TAO_Stub *
TAO_Root_POA::create_stub_object (const TAO::ObjectKey &object_key,
const char *type_id,
- CORBA::PolicyList *policy_list,
+ CORBA::PolicyList &policy_list,
TAO_Acceptor_Filter *filter,
TAO_Acceptor_Registry &acceptor_registry)
{
@@ -2294,13 +2310,13 @@ TAO_Root_POA::create_stub_object (const TAO::ObjectKey &object_key,
this->orb_core_.create_stub_object (mprofile, type_id, policy_list);
// Add the saved tagged components methods to the profiles.
- CORBA::ULong len = this->tagged_component_.length ();
+ CORBA::ULong len = this->tagged_component_.size ();
for (CORBA::ULong i = 0; i != len; ++i)
{
this->add_ior_component (mprofile, this->tagged_component_[i]);
}
- len = this->tagged_component_id_.length ();
+ len = this->tagged_component_id_.size ();
for (CORBA::ULong k = 0; k != len; ++k)
{
@@ -2330,7 +2346,7 @@ TAO_Root_POA::client_exposed_policies (CORBA::Short /* object_priority */)
this->policies_.add_client_exposed_fixed_policies (client_exposed_policies);
// return policies._retn ();
- return policies;
+ return client_exposed_policies;
}
TAO_SERVANT_LOCATION
@@ -2394,7 +2410,7 @@ TAO_Root_POA::ORT_adapter_i (void)
// Get the full adapter name of this POA, do this before we
// create the adapter so that in case this fails, we just
// return 0 and not a not activated adapter
- PortableInterceptor::AdapterName *adapter_name = this->adapter_name_i ();
+ PortableInterceptor::AdapterName adapter_name = this->adapter_name_i ();
this->ort_adapter_ = ort_ap_factory->create ();
diff --git a/tao/PortableServer/Root_POA.h b/tao/PortableServer/Root_POA.h
index 014c9d89be2..f9be43b8492 100644
--- a/tao/PortableServer/Root_POA.h
+++ b/tao/PortableServer/Root_POA.h
@@ -232,7 +232,7 @@ public:
PortableServer::ObjectId servant_to_id (PortableServer::Servant p_servant);
- PortableServer::ObjectId *servant_to_user_id (PortableServer::Servant p_servant);
+ PortableServer::ObjectId servant_to_user_id (PortableServer::Servant p_servant);
CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant);
@@ -540,7 +540,7 @@ protected:
TAO_Stub *create_stub_object (const TAO::ObjectKey &object_key,
const char *type_id,
- CORBA::PolicyList *policy_list,
+ CORBA::PolicyList &policy_list,
TAO_Acceptor_Filter *filter,
TAO_Acceptor_Registry &acceptor_registry);
diff --git a/tao/PortableServer/ServantRetentionStrategy.h b/tao/PortableServer/ServantRetentionStrategy.h
index b30e023e96b..4a4bda7b212 100644
--- a/tao/PortableServer/ServantRetentionStrategy.h
+++ b/tao/PortableServer/ServantRetentionStrategy.h
@@ -85,7 +85,7 @@ namespace TAO
virtual void deactivate_all_objects (void) = 0;
- virtual PortableServer::ObjectId *servant_to_user_id (
+ virtual PortableServer::ObjectId servant_to_user_id (
PortableServer::Servant servant) = 0;
virtual CORBA::Object_ptr servant_to_reference (
diff --git a/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp b/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp
index b8ed38698ee..403199f6456 100644
--- a/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp
+++ b/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp
@@ -114,7 +114,7 @@ namespace TAO
// not own the data.
poa_current_impl.replace_object_id (system_id);
- servant_upcall.user_id (&system_id);
+ servant_upcall.user_id (system_id);
return 0;
}
@@ -146,7 +146,7 @@ namespace TAO
{
}
- PortableServer::ObjectId *
+ PortableServer::ObjectId
ServantRetentionStrategyNonRetain::servant_to_user_id (
PortableServer::Servant /*servant*/)
{
@@ -193,20 +193,22 @@ namespace TAO
// available. The generated Object Id value may be obtained by
// invoking POA::reference_to_id with the created reference.
- PortableServer::ObjectId_var system_id;
+ PortableServer::ObjectId system_id;
PortableServer::ObjectId user_id;
// Otherwise, it is the NON_RETAIN policy. Therefore, any ol'
// object id will do (even an empty one).
+ /*
PortableServer::ObjectId *sys_id = 0;
ACE_NEW_THROW_EX (sys_id,
PortableServer::ObjectId,
CORBA::NO_MEMORY ());
-
+
system_id = sys_id;
-
+ */
+
// User id is the same as system id.
- user_id = system_id.in ();
+ user_id = system_id;
// Remember params for potentially invoking <key_to_object> later.
this->poa_->key_to_object_params_.set (system_id,
@@ -235,8 +237,8 @@ namespace TAO
// the applicable policies.
PortableServer::Servant servant = 0;
- PortableServer::ObjectId_var system_id;
-
+ PortableServer::ObjectId system_id;
+/*
// Otherwise, it is the NON_RETAIN policy. Therefore, user id
// is the same as system id.
PortableServer::ObjectId *sys_id = 0;
@@ -245,7 +247,7 @@ namespace TAO
CORBA::NO_MEMORY ());
system_id = sys_id;
-
+*/
// Remember params for potentially invoking <key_to_object> later.
this->poa_->key_to_object_params_.set (system_id,
intf,
diff --git a/tao/PortableServer/ServantRetentionStrategyNonRetain.h b/tao/PortableServer/ServantRetentionStrategyNonRetain.h
index 8d5713f90d9..ddb4c057f79 100644
--- a/tao/PortableServer/ServantRetentionStrategyNonRetain.h
+++ b/tao/PortableServer/ServantRetentionStrategyNonRetain.h
@@ -89,7 +89,7 @@ namespace TAO
virtual void deactivate_all_objects (void);
- virtual PortableServer::ObjectId *servant_to_user_id (
+ virtual PortableServer::ObjectId servant_to_user_id (
PortableServer::Servant servant);
virtual CORBA::Object_ptr servant_to_reference (
diff --git a/tao/PortableServer/ServantRetentionStrategyRetain.cpp b/tao/PortableServer/ServantRetentionStrategyRetain.cpp
index e98f22958cc..20db848f97d 100644
--- a/tao/PortableServer/ServantRetentionStrategyRetain.cpp
+++ b/tao/PortableServer/ServantRetentionStrategyRetain.cpp
@@ -141,9 +141,9 @@ namespace TAO
const PortableServer::ObjectId &system_id)
{
// Find user id from system id.
- PortableServer::ObjectId_var user_id;
+ PortableServer::ObjectId user_id;
if (active_object_map_->
- find_user_id_using_system_id (system_id, user_id.out()) != 0)
+ find_user_id_using_system_id (system_id, user_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
}
@@ -158,7 +158,7 @@ namespace TAO
int const result =
active_object_map_->
find_servant_using_system_id_and_user_id (system_id,
- user_id.in(),
+ user_id,
servant,
entry);
@@ -212,14 +212,14 @@ namespace TAO
// If an object with the specified Object Id value is currently
// active, a reference encapsulating the information used to
// activate the object is returned.
- PortableServer::ObjectId_var system_id;
+ PortableServer::ObjectId system_id;
PortableServer::Servant servant;
CORBA::Short priority;
if (this->active_object_map_->
find_servant_and_system_id_using_user_id (id,
servant,
- system_id.out (),
+ system_id,
priority) == 0)
{
// Remember params for potentially invoking <key_to_object> later.
@@ -247,9 +247,9 @@ namespace TAO
PortableServer::Servant &servant)
{
// Find user id from system id.
- PortableServer::ObjectId_var user_id;
+ PortableServer::ObjectId user_id;
if (this->active_object_map_->
- find_user_id_using_system_id (system_id, user_id.out()) != 0)
+ find_user_id_using_system_id (system_id, user_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
}
@@ -257,7 +257,7 @@ namespace TAO
TAO_Active_Object_Map_Entry *entry = 0;
int const result = this->active_object_map_->
find_servant_using_system_id_and_user_id (system_id,
- user_id.in(),
+ user_id,
servant,
entry);
if (result == 0)
@@ -288,7 +288,7 @@ namespace TAO
}
poa_current_impl.object_id(user_id);
- servant_upcall.user_id (&poa_current_impl.object_id());
+ servant_upcall.user_id (poa_current_impl.object_id());
// If the POA has the RETAIN policy, the POA looks in the Active
// Object Map to find if there is a servant associated with the
@@ -491,7 +491,7 @@ namespace TAO
}
}
- PortableServer::ObjectId *
+ PortableServer::ObjectId
ServantRetentionStrategyRetain::servant_to_user_id (
PortableServer::Servant servant)
{
@@ -519,12 +519,12 @@ namespace TAO
// If the POA has the UNIQUE_ID policy and the specified servant is
// active, the Object Id associated with that servant is returned.
- PortableServer::ObjectId_var user_id;
+ PortableServer::ObjectId user_id;
if (!this->poa_->allow_multiple_activations () &&
this->active_object_map_->
- find_user_id_using_servant (servant, user_id.out ()) != -1)
+ find_user_id_using_servant (servant, user_id) != -1)
{
- return user_id._retn ();
+ return user_id;
}
// If the POA has the IMPLICIT_ACTIVATION policy and either the POA
@@ -537,11 +537,11 @@ namespace TAO
// If we reach here, then we either have the MULTIPLE_ID policy
// or we have the UNIQUE_ID policy and we are not in the active
// object map.
- PortableServer::ObjectId_var user_id;
+ PortableServer::ObjectId user_id;
if (this->active_object_map_->
bind_using_system_id_returning_user_id (servant,
this->poa_->server_priority (),
- user_id.out ()) != 0)
+ user_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
}
@@ -552,7 +552,7 @@ namespace TAO
// Inform the custom servant dispatching (CSD) strategy that the
// sevant is activated.
- this->poa_->servant_activated_hook (servant, user_id.in ());
+ this->poa_->servant_activated_hook (servant, user_id);
// ATTENTION: Trick locking here, see class header for details
Non_Servant_Upcall non_servant_upcall (*this->poa_);
@@ -564,7 +564,7 @@ namespace TAO
// the reference count of the Servant passed to this function.
servant->_add_ref ();
- return user_id._retn ();
+ return user_id;
}
/*
@@ -573,7 +573,7 @@ namespace TAO
throw PortableServer::POA::ServantNotActive ();
}
- PortableServer::ObjectId *
+ PortableServer::ObjectId
ServantRetentionStrategyRetain::servant_to_system_id_i (
PortableServer::Servant servant,
CORBA::Short &priority)
@@ -591,14 +591,14 @@ namespace TAO
// If the POA has the UNIQUE_ID policy and the specified servant is
// active, the Object Id associated with that servant is returned.
- PortableServer::ObjectId_var system_id;
+ PortableServer::ObjectId system_id;
if (!this->poa_->allow_multiple_activations () &&
this->active_object_map_->
find_system_id_using_servant (servant,
- system_id.out (),
+ system_id,
priority) != -1)
{
- return system_id._retn ();
+ return system_id;
}
#if defined (CORBA_E_COMPACT) || defined (CORBA_E_MICRO)
@@ -617,11 +617,11 @@ namespace TAO
// If we reach here, then we either have the MULTIPLE_ID policy
// or we have the UNIQUE_ID policy and we are not in the active
// object map.
- PortableServer::ObjectId_var system_id;
+ PortableServer::ObjectId system_id;
if (this->active_object_map_->
bind_using_system_id_returning_system_id (servant,
priority,
- system_id.out ()) != 0)
+ system_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
}
@@ -632,7 +632,7 @@ namespace TAO
// Inform the custom servant dispatching (CSD) strategy that the
// sevant is activated.
- this->poa_->servant_activated_hook (servant, system_id.in ());
+ this->poa_->servant_activated_hook (servant, system_id);
// ATTENTION: Trick locking here, see class header for details
Non_Servant_Upcall non_servant_upcall (*this->poa_);
@@ -644,7 +644,7 @@ namespace TAO
// the reference count of the Servant passed to this function.
servant->_add_ref ();
- return system_id._retn ();
+ return system_id;
}
// Otherwise, the ServantNotActive exception is raised.
@@ -663,7 +663,7 @@ namespace TAO
// consistent Object Id value when asked politely).
CORBA::Short priority = this->poa_->server_priority ();
- PortableServer::ObjectId_var system_id =
+ PortableServer::ObjectId system_id =
this->servant_to_system_id_i (servant, priority);
PortableServer::ObjectId user_id;
@@ -671,7 +671,7 @@ namespace TAO
// This operation requires the RETAIN, therefore don't worry about
// the NON_RETAIN case.
if (this->active_object_map_->
- find_user_id_using_system_id (system_id.in (), user_id) != 0)
+ find_user_id_using_system_id (system_id, user_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
}
@@ -712,7 +712,7 @@ namespace TAO
{
if (wait_occurred_restart_call)
{
- return 0;
+ return PortableServer::ObjectId ();
}
else
{
@@ -870,20 +870,20 @@ namespace TAO
// available. The generated Object Id value may be obtained by
// invoking POA::reference_to_id with the created reference.
- PortableServer::ObjectId_var system_id;
+ PortableServer::ObjectId system_id;
PortableServer::ObjectId user_id;
if (this->active_object_map_->
bind_using_system_id_returning_system_id (0,
priority,
- system_id.out ()) != 0)
+ system_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
}
// Find user id from system id.
if (this->active_object_map_->
- find_user_id_using_system_id (system_id.in (),
+ find_user_id_using_system_id (system_id,
user_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
@@ -917,7 +917,7 @@ namespace TAO
// the applicable policies.
PortableServer::Servant servant = 0;
- PortableServer::ObjectId_var system_id;
+ PortableServer::ObjectId system_id;
// @@ We need something that can find the system id using
// appropriate strategy, at the same time, return the servant if
@@ -928,7 +928,7 @@ namespace TAO
if (this->active_object_map_->
find_system_id_using_user_id (oid,
priority,
- system_id.out ()) != 0)
+ system_id) != 0)
{
throw ::CORBA::OBJ_ADAPTER ();
}
diff --git a/tao/PortableServer/ServantRetentionStrategyRetain.h b/tao/PortableServer/ServantRetentionStrategyRetain.h
index 218ee4b5224..1a49304fb04 100644
--- a/tao/PortableServer/ServantRetentionStrategyRetain.h
+++ b/tao/PortableServer/ServantRetentionStrategyRetain.h
@@ -89,7 +89,7 @@ namespace TAO
virtual void deactivate_all_objects (void);
- virtual PortableServer::ObjectId *servant_to_user_id (
+ virtual PortableServer::ObjectId servant_to_user_id (
PortableServer::Servant servant);
virtual
@@ -120,7 +120,7 @@ namespace TAO
void
deactivate_map_entry (TAO_Active_Object_Map_Entry *active_object_map_entry);
- PortableServer::ObjectId *servant_to_system_id_i (
+ PortableServer::ObjectId servant_to_system_id_i (
PortableServer::Servant p_servant,
CORBA::Short &priority);
diff --git a/tao/PortableServer/Servant_Dispatcher.h b/tao/PortableServer/Servant_Dispatcher.h
index 1d7a368a914..4f10b36d2f6 100644
--- a/tao/PortableServer/Servant_Dispatcher.h
+++ b/tao/PortableServer/Servant_Dispatcher.h
@@ -74,7 +74,7 @@ public:
/// Factory method for creating new POA's.
virtual TAO_Root_POA *create_Root_POA (
- const ACE_CString &name,
+ const std::string &name,
PortableServer::POAManager_ptr poa_manager,
const TAO_POA_Policy_Set &policies,
ACE_Lock &lock,
diff --git a/tao/PortableServer/Servant_Upcall.cpp b/tao/PortableServer/Servant_Upcall.cpp
index b3c62852440..a8bde892350 100644
--- a/tao/PortableServer/Servant_Upcall.cpp
+++ b/tao/PortableServer/Servant_Upcall.cpp
@@ -34,8 +34,8 @@ namespace TAO
poa_ (0),
servant_ (0),
state_ (INITIAL_STAGE),
- system_id_ (TAO_POA_OBJECT_ID_BUF_SIZE, 0, system_id_buf_),
- user_id_ (0),
+// system_id_ (TAO_POA_OBJECT_ID_BUF_SIZE, 0, system_id_buf_),
+// user_id_ (0),
current_context_ (),
#if (TAO_HAS_MINIMUM_POA == 0)
cookie_ (0),
diff --git a/tao/PortableServer/Servant_Upcall.h b/tao/PortableServer/Servant_Upcall.h
index 91fc90260f3..d8ee2e815ca 100644
--- a/tao/PortableServer/Servant_Upcall.h
+++ b/tao/PortableServer/Servant_Upcall.h
@@ -131,7 +131,7 @@ namespace TAO
/// User ID accessors. This is the same value returned by
/// PortableServer::Current::get_object_id().
- void user_id (const PortableServer::ObjectId *);
+ void user_id (const PortableServer::ObjectId &);
const PortableServer::ObjectId &user_id (void) const;
/// Servant accessor.
@@ -204,7 +204,7 @@ namespace TAO
CORBA::Octet system_id_buf_[TAO_POA_OBJECT_ID_BUF_SIZE];
PortableServer::ObjectId system_id_;
- const PortableServer::ObjectId *user_id_;
+ PortableServer::ObjectId user_id_;
POA_Current_Impl current_context_;
diff --git a/tao/PortableServer/Servant_Upcall.inl b/tao/PortableServer/Servant_Upcall.inl
index 5f016db3fe6..5508d2c3f38 100644
--- a/tao/PortableServer/Servant_Upcall.inl
+++ b/tao/PortableServer/Servant_Upcall.inl
@@ -34,7 +34,7 @@ namespace TAO
ACE_INLINE void
Servant_Upcall::user_id (
- const PortableServer::ObjectId *id)
+ const PortableServer::ObjectId &id)
{
this->user_id_ = id;
}
@@ -42,7 +42,7 @@ namespace TAO
ACE_INLINE const PortableServer::ObjectId &
Servant_Upcall::user_id (void) const
{
- return *(this->user_id_);
+ return this->user_id_;
}
#if (TAO_HAS_MINIMUM_POA == 0)
diff --git a/tao/Profile.cpp b/tao/Profile.cpp
index 40e8dfab153..1cf86cb2950 100644
--- a/tao/Profile.cpp
+++ b/tao/Profile.cpp
@@ -342,9 +342,9 @@ TAO_Profile::set_tagged_components (TAO_OutputCDR &out_cdr)
void
-TAO_Profile::policies (CORBA::PolicyList *policy_list)
+TAO_Profile::policies (CORBA::PolicyList &policy_list)
{
- if (policy_list == 0)
+ if (policy_list.empty ())
{
if (TAO_debug_level)
{
@@ -363,19 +363,19 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list)
// This loop iterates through CORBA::PolicyList to convert
// each CORBA::Policy into a CORBA::PolicyValue
- CORBA::ULong const plen = policy_list->size ();
+ CORBA::ULong const plen = policy_list.size ();
policy_value_seq.resize (plen);
for (CORBA::ULong i = 0; i < plen; ++i)
{
TAO_OutputCDR out_CDR;
- policy_value_seq[i].ptype = (*policy_list)[i]->policy_type ();
+ policy_value_seq[i].ptype = policy_list[i]->policy_type ();
if (!(out_CDR << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER)))
return;
- if (!((*policy_list)[i]->_tao_encode (out_CDR)))
+ if (!(policy_list[i]->_tao_encode (out_CDR)))
return;
length = out_CDR.total_length ();
@@ -433,7 +433,7 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list)
}
void
-TAO_Profile::get_policies (CORBA::PolicyList& pl)
+TAO_Profile::get_policies (CORBA::PolicyList & pl)
{
#if !defined(CORBA_E_MICRO)
if (!this->are_policies_parsed_)
diff --git a/tao/Profile.h b/tao/Profile.h
index fa4ecbf16d0..9967dc9a59d 100644
--- a/tao/Profile.h
+++ b/tao/Profile.h
@@ -134,7 +134,7 @@ public:
/// This method sets the client exposed policies, i.e., the ones
/// propagated in the IOR, for this profile.
- virtual void policies (CORBA::PolicyList *policy_list);
+ virtual void policies (CORBA::PolicyList &policy_list);
/// Accessor for the client exposed policies of this profile.
virtual void get_policies (CORBA::PolicyList &policy_list);