summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/tao/MProfile.cpp3
-rw-r--r--TAO/tao/Profile.cpp33
-rw-r--r--TAO/tao/Profile.h15
-rw-r--r--TAO/tao/Stub.cpp7
5 files changed, 26 insertions, 43 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 94fa9791bfa..d77150d2318 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,14 @@
+Fri May 20 20:47:00 2005 Huang-Ming Huang <hh1@cse.wustl.edu>
+
+ * tao/MProfile.cpp:
+ * tao/Profile.h:
+ * tao/Profile.cpp
+ * tao/Stub.cpp:
+
+ Removed the association of TAO_Profile to TAO_Stub. This allows an
+ instance of TAO_Profile to be shared between different TAO_MProfile
+ objects.
+
Fri May 20 16:51:35 2005 J.T. Conklin <jtc@acorntoolworks.com>
* orbsvcs/orbsvcs/Log/LogRecordStore.cpp (TAO_LogRecoreStore::log):
diff --git a/TAO/tao/MProfile.cpp b/TAO/tao/MProfile.cpp
index 6e761046cc3..cc6fb34f23d 100644
--- a/TAO/tao/MProfile.cpp
+++ b/TAO/tao/MProfile.cpp
@@ -325,7 +325,8 @@ TAO_MProfile::init_policy_list (ACE_ENV_SINGLE_ARG_DECL)
// it causes the initialization of the policies
// for the current profile.
- this->get_current_profile ()->policies (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->get_current_profile ()->get_policies (*this->policy_list_
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
this->is_policy_list_initialized_ = 1;
diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp
index 1daa1beab44..f2442ca1c5d 100644
--- a/TAO/tao/Profile.cpp
+++ b/TAO/tao/Profile.cpp
@@ -31,8 +31,6 @@ TAO_Profile::TAO_Profile (CORBA::ULong tag,
const TAO::ObjectKey &obj_key,
const TAO_GIOP_Message_Version &version)
: version_ (version)
- , stub_ (0)
- , policy_list_ (0)
, are_policies_parsed_ (false)
, addressing_mode_ (0)
, tagged_profile_ (0)
@@ -55,8 +53,6 @@ TAO_Profile::TAO_Profile (CORBA::ULong tag,
TAO_ORB_Core *orb_core,
const TAO_GIOP_Message_Version &version)
: version_ (version)
- , stub_ (0)
- , policy_list_ (0)
, are_policies_parsed_ (false)
, addressing_mode_ (0)
, tagged_profile_ (0)
@@ -340,6 +336,7 @@ TAO_Profile::set_tagged_components (TAO_OutputCDR &out_cdr)
tagged_components_.set_component (tagged_component);
}
+
void
TAO_Profile::policies (CORBA::PolicyList *policy_list
ACE_ENV_ARG_DECL)
@@ -435,12 +432,13 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list
}
-CORBA::PolicyList &
-TAO_Profile::policies (ACE_ENV_SINGLE_ARG_DECL)
+
+void
+TAO_Profile::get_policies (CORBA::PolicyList& pl
+ ACE_ENV_ARG_DECL)
{
#if (TAO_HAS_CORBA_MESSAGING == 1)
- CORBA::PolicyList * pl = this->stub_->base_profiles ().policy_list_;
if (!this->are_policies_parsed_)
// None has already parsed the policies.
@@ -463,7 +461,7 @@ TAO_Profile::policies (ACE_ENV_SINGLE_ARG_DECL)
if ((in_cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0)
{
- return *(stub_->base_profiles ().policy_list_);
+ return ;
}
in_cdr.reset_byte_order (static_cast <int> (byte_order));
@@ -474,8 +472,7 @@ TAO_Profile::policies (ACE_ENV_SINGLE_ARG_DECL)
if (!(in_cdr >> policy_value_seq))
{
- ACE_THROW_RETURN (CORBA::INV_OBJREF (),
- *(stub_->base_profiles ().policy_list_));
+ ACE_THROW (CORBA::INV_OBJREF ());
}
// Here we extract the Messaging::PolicyValue out of the sequence
@@ -485,7 +482,7 @@ TAO_Profile::policies (ACE_ENV_SINGLE_ARG_DECL)
CORBA::ULong length = policy_value_seq.length ();
// Set the policy list length.
- pl->length (length);
+ pl.length (length);
for (CORBA::ULong i = 0; i < length; ++i)
{
@@ -512,7 +509,7 @@ TAO_Profile::policies (ACE_ENV_SINGLE_ARG_DECL)
in_cdr.reset_byte_order (static_cast <int> (byte_order));
policy->_tao_decode (in_cdr);
- (*pl)[i] = policy._retn ();
+ pl[i] = policy._retn ();
}
else
{
@@ -549,20 +546,8 @@ TAO_Profile::policies (ACE_ENV_SINGLE_ARG_DECL)
ACE_ENV_ARG_NOT_USED; // FUZZ: ignore check_for_ace_check
#endif /* (TAO_HAS_CORBA_MESSAGING == 1) */
- return *(stub_->base_profiles ().policy_list_);
-}
-
-void
-TAO_Profile::the_stub (TAO_Stub *stub)
-{
- this->stub_ = stub;
}
-TAO_Stub*
-TAO_Profile::the_stub (void)
-{
- return stub_;
-}
void
TAO_Profile::verify_orb_configuration (ACE_ENV_SINGLE_ARG_DECL)
diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h
index de87556f881..654fd278911 100644
--- a/TAO/tao/Profile.h
+++ b/TAO/tao/Profile.h
@@ -139,13 +139,9 @@ public:
ACE_ENV_ARG_DECL);
/// Accessor for the client exposed policies of this profile.
- virtual CORBA::PolicyList& policies (ACE_ENV_SINGLE_ARG_DECL);
-
- /// Sets the TAO_Stub to which this profile is associated.
- virtual void the_stub (TAO_Stub *stub);
-
- /// Gets the TAO_MProfile that holds the TAO_Profile instance.
- virtual TAO_Stub* the_stub (void);
+ //virtual CORBA::PolicyList& policies (ACE_ENV_SINGLE_ARG_DECL);
+ virtual void get_policies (CORBA::PolicyList &policy_list
+ ACE_ENV_ARG_DECL);
/// Returns true if this profile can specify multicast endpoints.
virtual int supports_multicast (void) const;
@@ -308,11 +304,8 @@ protected:
/// The tagged components
TAO_Tagged_Components tagged_components_;
- /// Pointer to the TAO_Stub to which this profile is related.
- TAO_Stub *stub_;
-
/// Client exposed policies of this profile.
- CORBA::PolicyList *policy_list_;
+ //CORBA::PolicyList *policy_list_;
// NOTE: In this implementation it is assumed that the <policy_list>
// is exactly the same for each profile.
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index 95a9634eb1f..f12431211a8 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -74,13 +74,6 @@ TAO_Stub::TAO_Stub (const char *repository_id,
this->orb_core_->client_factory ()->create_profile_lock ();
this->base_profiles (profiles);
- TAO_Profile *profile = 0;
- for (CORBA::ULong i = 0; i < this->base_profiles_.profile_count (); ++i)
- {
- // Get the ith profile
- profile = this->base_profiles_.get_profile (i);
- profile->the_stub (this);
- }
}
TAO_Stub::~TAO_Stub (void)