diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-05-13 07:52:37 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-05-13 07:52:37 +0000 |
commit | 28f08164f356d06df75d4e905d969c3abc11c905 (patch) | |
tree | 1a9625501ef7c1a9d4904538e78dd9232990a89c | |
parent | 5be1192aed02820bd3a8f5d72c7325ea802bd897 (diff) | |
download | ATCD-28f08164f356d06df75d4e905d969c3abc11c905.tar.gz |
ChangeLogTag:Fri May 13 00:04:16 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r-- | TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp | 71 | ||||
-rw-r--r-- | TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h | 2 |
2 files changed, 17 insertions, 56 deletions
diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp index 71068871931..85200539a7b 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp @@ -342,7 +342,7 @@ TAO_TypeCodeFactory_i::create_union_tc ( this->check_recursion (CORBA::tk_union, id, member.type.in (), - recursive_tc.out () + recursive_tc.inout () ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (tc); @@ -884,60 +884,21 @@ TAO_TypeCodeFactory_i::create_recursive_tc ( ) ACE_THROW_SPEC ((CORBA::SystemException)) { + CORBA::TypeCode_ptr tc = CORBA::TypeCode::_nil (); + if (id == 0 || !this->valid_id (id)) { ACE_THROW_RETURN (CORBA::BAD_PARAM (CORBA::OMGVMCID | 16, CORBA::COMPLETED_NO), - CORBA::TypeCode::_nil ()); - } - -#if 0 - - CORBA::TypeCode::OFFSET_MAP *map = 0; - ACE_NEW_RETURN (map, - CORBA::TypeCode::OFFSET_MAP, - CORBA::TypeCode::_nil ()); - - CORBA::ULong initial_offset = 0; - CORBA::TypeCode::OFFSET_LIST *list = 0; - ACE_NEW_RETURN (list, - CORBA::TypeCode::OFFSET_LIST, - CORBA::TypeCode::_nil ()); - list->enqueue_tail (initial_offset); - char *str = CORBA::string_dup (id); - const int status = map->bind (str, list); - - if (status != 0) - { - CORBA::string_free (str); - delete list; - delete map; - ACE_THROW_RETURN (CORBA::INTERNAL (), - CORBA::TypeCode::_nil ()); + tc); } - TAO_OutputCDR cdr; - CORBA::Long max_neg = 0xffffffff; - - // Negative offset value, updated later with the actual value. - cdr << max_neg; - - // In an embedded recursive typecode, the indirection - // value -1 goes where the TCKind would go for any - // other embedded typecode. - CORBA::TCKind rec_kind = - static_cast<CORBA::TCKind> (max_neg); - - return this->assemble_tc (cdr, - rec_kind, - map - ACE_ENV_ARG_PARAMETER); - -#else - - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::TypeCode::_nil ()); + ACE_NEW_THROW_EX (tc, + TAO::TypeCodeFactory::Recursive_TypeCode (id), + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (tc); -#endif /* 0 */ + return tc; } CORBA::TypeCode_ptr @@ -1447,7 +1408,7 @@ TAO_TypeCodeFactory_i::struct_except_tc_common ( this->check_recursion (kind, id, member_tc, - recursive_tc.out () + recursive_tc.inout () ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (tc); @@ -1615,7 +1576,7 @@ TAO_TypeCodeFactory_i::value_event_tc_common ( this->check_recursion (kind, id, member_tc, - recursive_tc.out () + recursive_tc.inout () ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (tc); @@ -1924,7 +1885,7 @@ bool TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, char const * id, CORBA::TypeCode_ptr member, - CORBA::TypeCode_out recursive_tc + CORBA::TypeCode_ptr & recursive_tc ACE_ENV_ARG_DECL) { if (kind != CORBA::tk_struct @@ -1991,7 +1952,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, ACE_ASSERT (rtc); - if (CORBA::is_nil (recursive_tc.ptr ())) + if (CORBA::is_nil (recursive_tc)) { recursive_tc = this->make_recursive_tc (kind, @@ -2001,7 +1962,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, } // Set the actual recursive TypeCode. - rtc->the_typecode (recursive_tc.ptr ()); + rtc->the_typecode (recursive_tc); return true; } @@ -2057,7 +2018,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, ACE_ASSERT (rtc); - if (CORBA::is_nil (recursive_tc.ptr ())) + if (CORBA::is_nil (recursive_tc)) { recursive_tc = this->make_recursive_tc (kind, @@ -2067,7 +2028,7 @@ TAO_TypeCodeFactory_i::check_recursion (CORBA::TCKind kind, } // Set the actual recursive TypeCode. - rtc->the_typecode (recursive_tc.ptr ()); + rtc->the_typecode (recursive_tc); return true; } diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h index 679795f108f..82a138ef191 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.h @@ -299,7 +299,7 @@ private: bool check_recursion (CORBA::TCKind kind, char const * id, CORBA::TypeCode_ptr member, - CORBA::TypeCode_out recursive_tc + CORBA::TypeCode_ptr & recursive_tc ACE_ENV_ARG_DECL); /// Make a recursive TypeCode with the given kind and repository ID. |