diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-03-08 06:01:23 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-03-08 06:01:23 +0000 |
commit | 2f39456fe4697b12afb82160a0fa129ffd6096cf (patch) | |
tree | f7decd51f42281d86eb72fa4b29cae92898c1470 | |
parent | a5b9e3c3fa2e72accb89032e25b20a38d3f3c025 (diff) | |
download | ATCD-2f39456fe4697b12afb82160a0fa129ffd6096cf.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/tao/TypeCode/Objref_TypeCode.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/TypeCode/Objref_TypeCode.h | 12 | ||||
-rw-r--r-- | TAO/tao/TypeCode/Struct_TypeCode.cpp | 17 | ||||
-rw-r--r-- | TAO/tao/TypeCode/Struct_TypeCode.h | 15 | ||||
-rw-r--r-- | TAO/tao/TypeCode/Value_TypeCode.cpp | 28 |
5 files changed, 16 insertions, 60 deletions
diff --git a/TAO/tao/TypeCode/Objref_TypeCode.cpp b/TAO/tao/TypeCode/Objref_TypeCode.cpp index 701673df7b2..fdd760ce8dd 100644 --- a/TAO/tao/TypeCode/Objref_TypeCode.cpp +++ b/TAO/tao/TypeCode/Objref_TypeCode.cpp @@ -76,7 +76,7 @@ TAO::TypeCode::Objref<StringType, Kind, RefCountPolicy>::equivalent_i ( ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); - if (tc_kind != static_cast<CORBA::TCKind> (Objref_Traits<Kind>::kind)) + if (tc_kind != Kind) return 0; char const * const this_id = this->attributes_.id (); @@ -94,7 +94,7 @@ CORBA::TCKind TAO::TypeCode::Objref<StringType, Kind, RefCountPolicy>::kind_i ( ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const { - return static_cast<CORBA::TCKind> (Objref_Traits<Kind>::kind); + return Kind; } template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy> diff --git a/TAO/tao/TypeCode/Objref_TypeCode.h b/TAO/tao/TypeCode/Objref_TypeCode.h index d0c16b9709e..2fa47f22aa0 100644 --- a/TAO/tao/TypeCode/Objref_TypeCode.h +++ b/TAO/tao/TypeCode/Objref_TypeCode.h @@ -43,8 +43,6 @@ namespace TAO template <> struct Objref_Traits<CORBA::tk_abstract_interface> { - enum { kind = CORBA::tk_abstract_interface }; - static CORBA::TypeCode_ptr create_compact_typecode (TAO_TypeCodeFactory_Adapter * factory, @@ -60,8 +58,6 @@ namespace TAO template <> struct Objref_Traits<CORBA::tk_component> { - enum { kind = CORBA::tk_component }; - static CORBA::TypeCode_ptr create_compact_typecode (TAO_TypeCodeFactory_Adapter * factory, @@ -78,8 +74,6 @@ namespace TAO template <> struct Objref_Traits<CORBA::tk_home> { - enum { kind = CORBA::tk_home }; - static CORBA::TypeCode_ptr create_compact_typecode (TAO_TypeCodeFactory_Adapter * factory, @@ -95,8 +89,6 @@ namespace TAO template <> struct Objref_Traits<CORBA::tk_local_interface> { - enum { kind = CORBA::tk_local_interface }; - static CORBA::TypeCode_ptr create_compact_typecode (TAO_TypeCodeFactory_Adapter * factory, @@ -112,8 +104,6 @@ namespace TAO template <> struct Objref_Traits<CORBA::tk_native> { - enum { kind = CORBA::tk_native }; - static CORBA::TypeCode_ptr create_compact_typecode (TAO_TypeCodeFactory_Adapter * factory, char const * id @@ -128,8 +118,6 @@ namespace TAO template <> struct Objref_Traits<CORBA::tk_objref> { - enum { kind = CORBA::tk_objref }; - static CORBA::TypeCode_ptr create_compact_typecode (TAO_TypeCodeFactory_Adapter * factory, diff --git a/TAO/tao/TypeCode/Struct_TypeCode.cpp b/TAO/tao/TypeCode/Struct_TypeCode.cpp index 791bdbc3ee2..63367140ae4 100644 --- a/TAO/tao/TypeCode/Struct_TypeCode.cpp +++ b/TAO/tao/TypeCode/Struct_TypeCode.cpp @@ -153,14 +153,7 @@ TAO::TypeCode::Struct<StringType, ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); - // Call kind_i() instead of using CORBA::tk_struct directly since a - // subclass, such as Except_TypeCode, can use this equivalent_i() - // implementation. - CORBA::TCKind const this_kind = - this->kind_i (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (tc_kind != this_kind) + if (tc_kind != Kind) return 0; char const * const this_id = this->base_attributes_.id (); @@ -216,7 +209,7 @@ TAO::TypeCode::Struct<StringType, RefCountPolicy>::kind_i ( ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const { - return Struct_Traits<Kind>::kind; + return Kind; } template <typename StringType, @@ -271,11 +264,7 @@ TAO::TypeCode::Struct<StringType, CORBA::TypeCode::_nil ()); } - CORBA::TCKind const this_kind = - this->kind_i (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); - - tc = adapter->_tao_create_struct_except_tc (this_kind, + tc = adapter->_tao_create_struct_except_tc (Kind, this->base_attributes_.id (), "" /* empty name */, tc_fields, diff --git a/TAO/tao/TypeCode/Struct_TypeCode.h b/TAO/tao/TypeCode/Struct_TypeCode.h index 7a5d01e2c40..01b43437427 100644 --- a/TAO/tao/TypeCode/Struct_TypeCode.h +++ b/TAO/tao/TypeCode/Struct_TypeCode.h @@ -32,21 +32,6 @@ namespace TAO { namespace TypeCode { - template <CORBA::TCKind KIND> struct Struct_Traits; - - template <> - struct Struct_Traits<CORBA::tk_struct> - { - enum { kind = CORBA::tk_struct }; - }; - - template <> - struct Struct_Traits<CORBA::tk_except> - { - enum { kind = CORBA::tk_except }; - }; - - /** * @class Struct * diff --git a/TAO/tao/TypeCode/Value_TypeCode.cpp b/TAO/tao/TypeCode/Value_TypeCode.cpp index b29dc0b0863..a58cbc78767 100644 --- a/TAO/tao/TypeCode/Value_TypeCode.cpp +++ b/TAO/tao/TypeCode/Value_TypeCode.cpp @@ -116,10 +116,6 @@ TAO::TypeCode::Value<StringType, if (ACE_OS::strcmp (lhs_name, rhs_name) != 0) return 0; - -ADD MISSING ATTRIBUTES - - CORBA::TypeCode_ptr const lhs_tc = *(lhs_field.type); CORBA::TypeCode_var const rhs_tc = tc->member_type (i @@ -133,6 +129,15 @@ ADD MISSING ATTRIBUTES if (!equal_members) return 0; + + CORBA::Visibility const lhs_visibility = lhs_field.visibility; + CORBA::Visibility const rhs_visibility = + tc->member_visibility_i (i + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + if (lhs_visibility != rhs_visibility) + return 0; } return 1; @@ -161,14 +166,7 @@ TAO::TypeCode::Value<StringType, ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); - // Call kind_i() instead of using CORBA::tk_value directly since a - // subclass, such as Except_TypeCode, can use this equivalent_i() - // implementation. - CORBA::TCKind const this_kind = - this->kind_i (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (tc_kind != this_kind) + if (tc_kind != Kind) return 0; char const * const this_id = this->base_attributes_.id (); @@ -284,11 +282,7 @@ TAO::TypeCode::Value<StringType, CORBA::TypeCode::_nil ()); } - CORBA::TCKind const this_kind = - this->kind_i (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); - - tc = adapter->_tao_create_value_event_tc (this_kind, + tc = adapter->_tao_create_value_event_tc (Kind, this->base_attributes_.id (), "" /* empty name */, this->value_modifier_, |