summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-03-11 06:28:40 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-03-11 06:28:40 +0000
commitb52b2a7801f2670aa2e2665b609fe0cf3066506e (patch)
tree8b879a1b3061dd16631f8e1eb9d95d520bbf4258
parenta114a45d039eb85a4119dc2df1e2b479ce597280 (diff)
downloadATCD-b52b2a7801f2670aa2e2665b609fe0cf3066506e.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/TypeCode/Value_TypeCode.cpp64
1 files changed, 51 insertions, 13 deletions
diff --git a/TAO/tao/TypeCode/Value_TypeCode.cpp b/TAO/tao/TypeCode/Value_TypeCode.cpp
index 2637cd97c2d..1ddcab31749 100644
--- a/TAO/tao/TypeCode/Value_TypeCode.cpp
+++ b/TAO/tao/TypeCode/Value_TypeCode.cpp
@@ -93,9 +93,25 @@ TAO::TypeCode::Value<StringType,
CORBA::TypeCode_ptr tc
ACE_ENV_ARG_DECL) const
{
- // This call shouldn't throw since CORBA::TypeCode::equal() verified
- // that the TCKind is the same as our's prior to invoking this
- // method, meaning that member_count() is supported.
+ // None of these calls should throw since CORBA::TypeCode::equal()
+ // verified that the TCKind is the same as our's prior to invoking
+ // this method.
+
+ CORBA::ValueModifier const tc_type_modifier =
+ tc->type_modifier (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (tc_type_modifier != this->type_modifier_)
+ return 0;
+
+ CORBA::TypeCode_var rhs_concrete_base_type =
+ tc->concrete_base_type (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Boolean const equal_concrete_base_types =
+ this->equal (rhs_concrete_base_type.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
CORBA::ULong const tc_nfields =
tc->member_count (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -173,13 +189,25 @@ TAO::TypeCode::Value<StringType,
char const * const tc_id = tc->id (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
-
-ADD MISSING ATTRIBUTES
-
-
if (ACE_OS::strlen (this_id) == 0
|| ACE_OS::strlen (tc_id) == 0)
{
+ CORBA::ValueModifier const tc_type_modifier =
+ tc->type_modifier (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (tc_type_modifier != this->type_modifier_)
+ return 0;
+
+ CORBA::TypeCode_var rhs_concrete_base_type =
+ tc->concrete_base_type (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Boolean const equivalent_concrete_base_types =
+ this->equivalent (rhs_concrete_base_type.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
// Perform a structural comparison, excluding the name() and
// member_name() operations.
@@ -192,18 +220,28 @@ ADD MISSING ATTRIBUTES
for (CORBA::ULong i = 0; i < this->nfields_; ++i)
{
- CORBA::TypeCode_ptr const lhs = *(this->fields_[i].type);
- CORBA::TypeCode_var const rhs =
+ CORBA::Visibility const lhs_visibility =
+ this->fields_[i].visibility;
+ CORBA::Visibility const rhs_visibility =
+ tc->member_visibility (i
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ if (lhs_visibility != rhs_visibility)
+ return 0;
+
+ CORBA::TypeCode_ptr const lhs_tc = *(this->fields_[i].type);
+ CORBA::TypeCode_var const rhs_tc =
tc->member_type (i
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- CORBA::Boolean const equiv_members =
- lhs->equivalent (rhs.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::Boolean const equiv_types =
+ lhs_tc->equivalent (rhs_tc.in ()
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
- if (!equiv_members)
+ if (!equiv_types)
return 0;
}
}