summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-03 00:30:56 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-04-03 00:30:56 +0000
commit36e90ff229b159b9e947b01dea21f02c8055b393 (patch)
tree87a72dd05657955b9f304db20c85c0672bdeb348
parentd5a35460027ec32a30b80d6ac4a1f1a9f0da8163 (diff)
downloadATCD-36e90ff229b159b9e947b01dea21f02c8055b393.tar.gz
ChangeLogTag: Wed Apr 2 18:28:08 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog18
-rw-r--r--TAO/tao/Any.cpp18
-rw-r--r--TAO/tao/Any.h3
-rw-r--r--TAO/tao/Any_T.cpp157
-rw-r--r--TAO/tao/Any_T.h24
-rw-r--r--TAO/tao/Any_T.inl92
-rw-r--r--TAO/tao/DynamicInterface/Request.inl2
-rw-r--r--TAO/tao/NVList.cpp2
-rw-r--r--TAO/tao/Typecode.cpp23
-rw-r--r--TAO/tao/Typecode.h3
-rw-r--r--TAO/tests/Param_Test/bd_string.cpp2
11 files changed, 271 insertions, 73 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index d7f2e7ef494..8e52e77db4b 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,21 @@
+Wed Apr 2 18:28:08 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tao/Any.cpp:
+ * tao/Any.h:
+ * tao/Any_T.cpp:
+ * tao/Any_T.h:
+ * tao/Any_T.inl:
+ * tao/NVList.cpp:
+ * tao/Typecode.cpp:
+ * tao/Typecode.h:
+ * tao/DynamicInterface/Request.inl:
+
+ Changes to fix runtime errors in the DII version of Param_Test.
+
+ * tests/Param_Test/bd_string.cpp:
+
+ Cosmetic changes.
+
Wed Apr 2 11:53:14 2003 Ossama Othman <ossama@uci.edu>
* orbsvcs/orbsvcs/Security.mpc:
diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp
index 097eade0816..975217eef2a 100644
--- a/TAO/tao/Any.cpp
+++ b/TAO/tao/Any.cpp
@@ -144,7 +144,7 @@ CORBA::Any::Any (CORBA::TypeCode_ptr tc,
ACE_NEW (this->impl_,
TAO::Unknown_IDL_Type (tc,
0,
- tc->byte_order_,
+ ACE_CDR_BYTE_ORDER,
release));
}
@@ -691,7 +691,7 @@ CORBA::Any::operator<<= (CORBA::Any::from_string s)
CORBA::Any::to_string
>::insert (*this,
TAO::Any_Impl::_tao_any_string_destructor,
- CORBA::tk_string,
+ CORBA::_tc_string,
s.nocopy_ ? s.val_ : CORBA::string_dup (s.val_),
s.bound_);
}
@@ -705,7 +705,7 @@ CORBA::Any::operator<<= (CORBA::Any::from_wstring ws)
CORBA::Any::to_wstring
>::insert (*this,
TAO::Any_Impl::_tao_any_wstring_destructor,
- CORBA::tk_wstring,
+ CORBA::_tc_wstring,
ws.nocopy_ ? ws.val_ : CORBA::wstring_dup (ws.val_),
ws.bound_);
}
@@ -942,9 +942,9 @@ CORBA::Any::operator>>= (CORBA::Any::to_string s) const
CORBA::Any::to_string
>::extract (*this,
TAO::Any_Impl::_tao_any_string_destructor,
- CORBA::tk_string,
- s.bound_,
- s.val_);
+ CORBA::_tc_string,
+ s.val_,
+ s.bound_);
}
CORBA::Boolean
@@ -957,9 +957,9 @@ CORBA::Any::operator>>= (CORBA::Any::to_wstring ws) const
CORBA::Any::to_wstring
>::extract (*this,
TAO::Any_Impl::_tao_any_wstring_destructor,
- CORBA::tk_wstring,
- ws.bound_,
- ws.val_);
+ CORBA::_tc_wstring,
+ ws.val_,
+ ws.bound_);
}
CORBA::Boolean
diff --git a/TAO/tao/Any.h b/TAO/tao/Any.h
index 1ef6bb60182..edebc03bc3e 100644
--- a/TAO/tao/Any.h
+++ b/TAO/tao/Any.h
@@ -300,9 +300,8 @@ namespace TAO
static void _tao_any_string_destructor (void *);
static void _tao_any_wstring_destructor (void *);
- // Used only by Unknown_IDL_Type.
virtual void _tao_decode (TAO_InputCDR &
- ACE_ENV_ARG_DECL_NOT_USED);
+ ACE_ENV_ARG_DECL_NOT_USED) = 0;
virtual void assign_translator (CORBA::TCKind,
TAO_InputCDR *cdr);
diff --git a/TAO/tao/Any_T.cpp b/TAO/tao/Any_T.cpp
index 8ba2d39f90f..d3d0c26a7f8 100644
--- a/TAO/tao/Any_T.cpp
+++ b/TAO/tao/Any_T.cpp
@@ -31,7 +31,8 @@ TAO::Any_Impl_T<T>::~Any_Impl_T (void)
{
}
-template<typename T> void
+template<typename T>
+void
TAO::Any_Impl_T<T>::insert (CORBA::Any & any,
_tao_destructor destructor,
CORBA::TypeCode_ptr tc,
@@ -45,7 +46,8 @@ TAO::Any_Impl_T<T>::insert (CORBA::Any & any,
any.replace (new_impl);
}
-template<typename T> CORBA::Boolean
+template<typename T>
+CORBA::Boolean
TAO::Any_Impl_T<T>::extract (const CORBA::Any & any,
_tao_destructor destructor,
CORBA::TypeCode_ptr tc,
@@ -123,7 +125,8 @@ TAO::Any_Impl_T<T>::extract (const CORBA::Any & any,
return 0;
}
-template<typename T> void
+template<typename T>
+void
TAO::Any_Impl_T<T>::free_value (void)
{
if (this->value_destructor_ != 0)
@@ -135,6 +138,17 @@ TAO::Any_Impl_T<T>::free_value (void)
this->value_ = 0;
}
+template<typename T>
+void
+TAO::Any_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr
+ ACE_ENV_ARG_DECL)
+{
+ if (! this->demarshal_value (cdr))
+ {
+ ACE_THROW (CORBA::MARSHAL ());
+ }
+}
+
// =======================================================================
template<typename T, typename T_forany>
@@ -154,7 +168,8 @@ TAO::Any_Array_Impl_T<T, T_forany>::~Any_Array_Impl_T (void)
{
}
-template<typename T, typename T_forany> void
+template<typename T, typename T_forany>
+void
TAO::Any_Array_Impl_T<T, T_forany>::insert (CORBA::Any & any,
_tao_destructor destructor,
CORBA::TypeCode_ptr tc,
@@ -169,7 +184,8 @@ TAO::Any_Array_Impl_T<T, T_forany>::insert (CORBA::Any & any,
any.replace (new_impl);
}
-template<typename T, typename T_forany> CORBA::Boolean
+template<typename T, typename T_forany>
+CORBA::Boolean
TAO::Any_Array_Impl_T<T, T_forany>::extract (const CORBA::Any & any,
_tao_destructor destructor,
CORBA::TypeCode_ptr tc,
@@ -252,7 +268,8 @@ TAO::Any_Array_Impl_T<T, T_forany>::extract (const CORBA::Any & any,
return 0;
}
-template<typename T, typename T_forany> void
+template<typename T, typename T_forany>
+void
TAO::Any_Array_Impl_T<T, T_forany>::free_value (void)
{
if (this->value_destructor_ != 0)
@@ -264,6 +281,17 @@ TAO::Any_Array_Impl_T<T, T_forany>::free_value (void)
this->value_ = 0;
}
+template<typename T, typename T_forany>
+void
+TAO::Any_Array_Impl_T<T, T_forany>::_tao_decode (TAO_InputCDR &cdr
+ ACE_ENV_ARG_DECL)
+{
+ if (! this->demarshal_value (cdr))
+ {
+ ACE_THROW (CORBA::MARSHAL ());
+ }
+}
+
// =======================================================================
template<typename T, typename from_T, typename to_T>
@@ -289,34 +317,44 @@ template<typename T, typename from_T, typename to_T>
void
TAO::Any_Special_Impl_T<T, from_T, to_T>::insert (CORBA::Any & any,
_tao_destructor destructor,
- CORBA::TCKind kind,
+ CORBA::TypeCode_ptr tc,
T * const value,
- CORBA::ULong bound)
+ CORBA::ULong bound
+ )
{
- CORBA::TypeCode_ptr tc = kind == CORBA::tk_string
- ? CORBA::TypeCode::_duplicate (CORBA::_tc_string)
- : CORBA::TypeCode::_duplicate (CORBA::_tc_wstring);
+ if (bound > 0 && value != 0 && ACE_OS::strlen (value) > bound)
+ {
+ return;
+ }
+
+ CORBA::TypeCode_ptr bounded_tc = CORBA::TypeCode::_nil ();
if (bound > 0)
{
+ CORBA::TCKind kind = ACE_static_cast (CORBA::TCKind,
+ tc->kind_);
static CORBA::Long _oc_buffer [] =
{
TAO_ENCAP_BYTE_ORDER,
ACE_static_cast (CORBA::Long, bound)
};
- ACE_NEW (tc,
+ ACE_NEW (bounded_tc,
CORBA::TypeCode (kind,
sizeof _oc_buffer,
(char *) &_oc_buffer,
1,
0));
}
+ else
+ {
+ bounded_tc = CORBA::TypeCode::_duplicate (tc);
+ }
Any_Special_Impl_T<T, from_T, to_T> *new_impl = 0;
ACE_NEW (new_impl,
Any_Special_Impl_T (destructor,
- tc,
+ bounded_tc,
value,
bound));
any.replace (new_impl);
@@ -326,28 +364,37 @@ template<typename T, typename from_T, typename to_T>
CORBA::Boolean
TAO::Any_Special_Impl_T<T, from_T, to_T>::extract (const CORBA::Any & any,
_tao_destructor destructor,
- CORBA::TCKind kind,
- CORBA::ULong bound,
- const T *& _tao_elem)
+ CORBA::TypeCode_ptr tc,
+ const T *& _tao_elem,
+ CORBA::ULong bound
+ )
{
- CORBA::TypeCode_ptr any_type = any._tao_get_typecode ();
_tao_elem = 0;
ACE_TRY_NEW_ENV
{
- CORBA::TCKind any_kind = any_type->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::TypeCode_ptr any_type = any._tao_get_typecode ();
+ CORBA::TypeCode_var unaliased_any_type =
+ any_type->unalias (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::TCKind any_kind =
+ unaliased_any_type->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::TCKind try_kind = tc->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (any_kind != kind)
+ if (any_kind != try_kind)
{
return 0;
}
- CORBA::ULong any_bound =
- any_type->length (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::ULong length =
+ unaliased_any_type->length (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- if (any_bound != bound)
+ if (length != bound)
{
return 0;
}
@@ -376,7 +423,7 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::extract (const CORBA::Any & any,
TAO::Any_Special_Impl_T<T, from_T, to_T> *replacement = 0;
ACE_NEW_RETURN (replacement,
BOUNDED_TSTRING_ANY_IMPL (destructor,
- any_type,
+ CORBA::TypeCode::_duplicate (tc),
0,
bound),
0);
@@ -393,6 +440,9 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::extract (const CORBA::Any & any,
TAO_DEF_GIOP_MAJOR,
TAO_DEF_GIOP_MINOR);
+ CORBA::TCKind kind = tc->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
impl->assign_translator (kind,
&cdr);
CORBA::Boolean result = replacement->demarshal_value (cdr);
@@ -428,6 +478,19 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::free_value (void)
this->value_ = 0;
}
+template<typename T, typename from_T, typename to_T>
+void
+TAO::Any_Special_Impl_T<T, from_T, to_T>::_tao_decode (
+ TAO_InputCDR &cdr
+ ACE_ENV_ARG_DECL
+ )
+{
+ if (! this->demarshal_value (cdr))
+ {
+ ACE_THROW (CORBA::MARSHAL ());
+ }
+}
+
// =======================================================================
template<typename T>
@@ -444,7 +507,8 @@ TAO::Any_Basic_Impl_T<T>::~Any_Basic_Impl_T (void)
{
}
-template<typename T> void
+template<typename T>
+void
TAO::Any_Basic_Impl_T<T>::insert (CORBA::Any & any,
CORBA::TypeCode_ptr tc,
const T & value)
@@ -456,7 +520,8 @@ TAO::Any_Basic_Impl_T<T>::insert (CORBA::Any & any,
any.replace (new_impl);
}
-template<typename T> CORBA::Boolean
+template<typename T>
+CORBA::Boolean
TAO::Any_Basic_Impl_T<T>::extract (const CORBA::Any & any,
CORBA::TypeCode_ptr tc,
T & _tao_elem)
@@ -522,7 +587,8 @@ TAO::Any_Basic_Impl_T<T>::extract (const CORBA::Any & any,
return 0;
}
-template<typename T> TAO::Any_Basic_Impl_T<T> *
+template<typename T>
+TAO::Any_Basic_Impl_T<T> *
TAO::Any_Basic_Impl_T<T>::create_empty (CORBA::TypeCode_ptr tc)
{
TAO::Any_Basic_Impl_T<T> * retval = 0;
@@ -533,6 +599,17 @@ TAO::Any_Basic_Impl_T<T>::create_empty (CORBA::TypeCode_ptr tc)
return retval;
}
+template<typename T>
+void
+TAO::Any_Basic_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr
+ ACE_ENV_ARG_DECL)
+{
+ if (! this->demarshal_value (cdr))
+ {
+ ACE_THROW (CORBA::MARSHAL ());
+ }
+}
+
// =======================================================================
template<typename T, typename from_T, typename to_T>
@@ -567,7 +644,8 @@ TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::insert (
any.replace (new_impl);
}
-template<typename T, typename from_T, typename to_T> CORBA::Boolean
+template<typename T, typename from_T, typename to_T>
+CORBA::Boolean
TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::extract (
const CORBA::Any & any,
CORBA::TypeCode_ptr tc,
@@ -647,6 +725,17 @@ TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::extract (
return 0;
}
+template<typename T, typename from_T, typename to_T>
+void
+TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::_tao_decode (TAO_InputCDR &cdr
+ ACE_ENV_ARG_DECL)
+{
+ if (! this->demarshal_value (cdr))
+ {
+ ACE_THROW (CORBA::MARSHAL ());
+ }
+}
+
// =======================================================================
template<typename T>
@@ -795,7 +884,8 @@ TAO::Any_Dual_Impl_T<T>::extract (const CORBA::Any & any,
return 0;
}
-template<typename T> void
+template<typename T>
+void
TAO::Any_Dual_Impl_T<T>::free_value (void)
{
if (this->value_destructor_ != 0)
@@ -807,5 +897,16 @@ TAO::Any_Dual_Impl_T<T>::free_value (void)
this->value_ = 0;
}
+template<typename T>
+void
+TAO::Any_Dual_Impl_T<T>::_tao_decode (TAO_InputCDR &cdr
+ ACE_ENV_ARG_DECL)
+{
+ if (! this->demarshal_value (cdr))
+ {
+ ACE_THROW (CORBA::MARSHAL ());
+ }
+}
+
#endif /* TAO_ANY_T_C */
diff --git a/TAO/tao/Any_T.h b/TAO/tao/Any_T.h
index ecbacd57dfc..d10b747d700 100644
--- a/TAO/tao/Any_T.h
+++ b/TAO/tao/Any_T.h
@@ -57,6 +57,8 @@ namespace TAO
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &);
CORBA::Boolean demarshal_value (TAO_InputCDR &);
+ virtual void _tao_decode (TAO_InputCDR &
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
virtual const void *value (void) const;
virtual void free_value (void);
@@ -92,6 +94,8 @@ namespace TAO
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &);
CORBA::Boolean demarshal_value (TAO_InputCDR &);
+ virtual void _tao_decode (TAO_InputCDR &
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
virtual const void *value (void) const;
virtual void free_value (void);
@@ -124,6 +128,8 @@ namespace TAO
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &);
CORBA::Boolean demarshal_value (TAO_InputCDR &);
+ virtual void _tao_decode (TAO_InputCDR &
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
virtual const void *value (void) const;
static Any_Basic_Impl_T<T> *create_empty (CORBA::TypeCode_ptr);
@@ -144,22 +150,24 @@ namespace TAO
Any_Special_Impl_T (_tao_destructor destructor,
CORBA::TypeCode_ptr,
T * const,
- CORBA::ULong);
+ CORBA::ULong bound);
virtual ~Any_Special_Impl_T (void);
static void insert (CORBA::Any &,
_tao_destructor destructor,
- CORBA::TCKind,
+ CORBA::TypeCode_ptr,
T * const,
- CORBA::ULong);
+ CORBA::ULong bound);
static CORBA::Boolean extract (const CORBA::Any &,
_tao_destructor,
- CORBA::TCKind,
- CORBA::ULong,
- const T *&);
+ CORBA::TypeCode_ptr,
+ const T *&,
+ CORBA::ULong bound);
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &);
CORBA::Boolean demarshal_value (TAO_InputCDR &);
+ virtual void _tao_decode (TAO_InputCDR &
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
virtual const void *value (void) const;
virtual void free_value (void);
@@ -194,6 +202,8 @@ namespace TAO
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &);
CORBA::Boolean demarshal_value (TAO_InputCDR &);
+ virtual void _tao_decode (TAO_InputCDR &
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
virtual const void *value (void) const;
@@ -238,6 +248,8 @@ namespace TAO
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &);
CORBA::Boolean demarshal_value (TAO_InputCDR &);
+ virtual void _tao_decode (TAO_InputCDR &
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
virtual const void *value (void) const;
virtual void free_value (void);
diff --git a/TAO/tao/Any_T.inl b/TAO/tao/Any_T.inl
index b3bcb4eea39..1238fa3212d 100644
--- a/TAO/tao/Any_T.inl
+++ b/TAO/tao/Any_T.inl
@@ -3,37 +3,49 @@
// These three are overridden in generated code where appropriate.
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Impl_T<T>::to_object (CORBA::Object_ptr &) const
{
return 0;
}
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Impl_T<T>::to_value (CORBA::ValueBase *&) const
{
return 0;
}
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Impl_T<T>::to_abstract_base (CORBA::AbstractBase_ptr &) const
{
return 0;
}
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Impl_T<T>::marshal_value (TAO_OutputCDR &cdr)
{
return (cdr << this->value_);
}
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Impl_T<T>::demarshal_value (TAO_InputCDR &cdr)
{
return (cdr >> this->value_);
}
-template<typename T> ACE_INLINE const void *
+template<typename T>
+ACE_INLINE
+const void *
TAO::Any_Impl_T<T>::value (void) const
{
return this->value_;
@@ -41,20 +53,26 @@ TAO::Any_Impl_T<T>::value (void) const
// ***********************************************************************
-template<typename T, typename T_forany> ACE_INLINE CORBA::Boolean
+template<typename T, typename T_forany>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Array_Impl_T<T, T_forany>::marshal_value (TAO_OutputCDR &cdr)
{
return (cdr << T_forany (this->value_));
}
-template<typename T, typename T_forany> ACE_INLINE CORBA::Boolean
+template<typename T, typename T_forany>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Array_Impl_T<T, T_forany>::demarshal_value (TAO_InputCDR &cdr)
{
T_forany tmp (this->value_);
return (cdr >> tmp);
}
-template<typename T, typename T_forany> ACE_INLINE const void *
+template<typename T, typename T_forany>
+ACE_INLINE
+const void *
TAO::Any_Array_Impl_T<T, T_forany>::value (void) const
{
return this->value_;
@@ -62,19 +80,29 @@ TAO::Any_Array_Impl_T<T, T_forany>::value (void) const
// ***********************************************************************
-template<typename T, typename from_T, typename to_T> ACE_INLINE CORBA::Boolean
-TAO::Any_Special_Impl_T<T, from_T, to_T>::marshal_value (TAO_OutputCDR &cdr)
+template<typename T, typename from_T, typename to_T>
+ACE_INLINE
+CORBA::Boolean
+TAO::Any_Special_Impl_T<T, from_T, to_T>::marshal_value (
+ TAO_OutputCDR &cdr
+ )
{
return (cdr << from_T (this->value_, this->bound_));
}
-template<typename T, typename from_T, typename to_T> ACE_INLINE CORBA::Boolean
-TAO::Any_Special_Impl_T<T, from_T, to_T>::demarshal_value (TAO_InputCDR &cdr)
+template<typename T, typename from_T, typename to_T>
+ACE_INLINE
+CORBA::Boolean
+TAO::Any_Special_Impl_T<T, from_T, to_T>::demarshal_value (
+ TAO_InputCDR &cdr
+ )
{
return (cdr >> to_T (this->value_, this->bound_));
}
-template<typename T, typename from_T, typename to_T> ACE_INLINE const void *
+template<typename T, typename from_T, typename to_T>
+ACE_INLINE
+const void *
TAO::Any_Special_Impl_T<T, from_T, to_T>::value (void) const
{
return this->value_;
@@ -82,19 +110,25 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::value (void) const
// ***********************************************************************
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Basic_Impl_T<T>::marshal_value (TAO_OutputCDR &cdr)
{
return (cdr << this->value_);
}
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Basic_Impl_T<T>::demarshal_value (TAO_InputCDR &cdr)
{
return (cdr >> this->value_);
}
-template<typename T> ACE_INLINE const void *
+template<typename T>
+ACE_INLINE
+const void *
TAO::Any_Basic_Impl_T<T>::value (void) const
{
return &this->value_;
@@ -102,7 +136,9 @@ TAO::Any_Basic_Impl_T<T>::value (void) const
// ***********************************************************************
-template<typename T, typename from_T, typename to_T> ACE_INLINE CORBA::Boolean
+template<typename T, typename from_T, typename to_T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::marshal_value (
TAO_OutputCDR &cdr
)
@@ -110,7 +146,9 @@ TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::marshal_value (
return (cdr << from_T (this->value_));
}
-template<typename T, typename from_T, typename to_T> ACE_INLINE CORBA::Boolean
+template<typename T, typename from_T, typename to_T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::demarshal_value (
TAO_InputCDR &cdr
)
@@ -118,7 +156,9 @@ TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::demarshal_value (
return (cdr >> to_T (this->value_));
}
-template<typename T, typename from_T, typename to_T> ACE_INLINE const void *
+template<typename T, typename from_T, typename to_T>
+ACE_INLINE
+const void *
TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::value (void) const
{
return &this->value_;
@@ -126,19 +166,25 @@ TAO::Any_Special_Basic_Impl_T<T, from_T, to_T>::value (void) const
// ***********************************************************************
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Dual_Impl_T<T>::marshal_value (TAO_OutputCDR &cdr)
{
return (cdr << *this->value_);
}
-template<typename T> ACE_INLINE CORBA::Boolean
+template<typename T>
+ACE_INLINE
+CORBA::Boolean
TAO::Any_Dual_Impl_T<T>::demarshal_value (TAO_InputCDR &cdr)
{
return (cdr >> *this->value_);
}
-template<typename T> ACE_INLINE const void *
+template<typename T>
+ACE_INLINE
+const void *
TAO::Any_Dual_Impl_T<T>::value (void) const
{
return this->value_;
diff --git a/TAO/tao/DynamicInterface/Request.inl b/TAO/tao/DynamicInterface/Request.inl
index 730890705f3..cc3470968d9 100644
--- a/TAO/tao/DynamicInterface/Request.inl
+++ b/TAO/tao/DynamicInterface/Request.inl
@@ -108,7 +108,7 @@ CORBA::Request::add_out_arg (const CORBA::Char *name)
ACE_INLINE void
CORBA::Request::set_return_type (CORBA::TypeCode_ptr tc)
{
- CORBA::Any newtype (tc,
+ CORBA::Any newtype (CORBA::TypeCode::_duplicate (tc),
0);
this->result_->any_ = newtype;
}
diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp
index 014f76d5eef..457da9934df 100644
--- a/TAO/tao/NVList.cpp
+++ b/TAO/tao/NVList.cpp
@@ -424,8 +424,6 @@ CORBA::NVList::_tao_decode (TAO_InputCDR &incoming,
}
CORBA::Any_ptr any = nv->value ();
-
- // We can be sure that the impl is a TAO::Unknown_IDL_Type.
any->impl ()->_tao_decode (incoming
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index da69d007592..01d3b22bc7a 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -150,7 +150,7 @@ CORBA::TypeCode::BadKind::_tao_decode (TAO_InputCDR &
CORBA::TypeCode::TypeCode (CORBA::TCKind kind)
: length_ (0),
buffer_ (0),
- byte_order_ (0),
+ byte_order_ (ACE_CDR_BYTE_ORDER),
kind_ (kind),
parent_ (0),
tc_base_ (0),
@@ -3463,6 +3463,27 @@ CORBA::TypeCode::_tao_decode (const CORBA::TypeCode *parent,
// ****************************************************************
+CORBA::TypeCode_ptr
+CORBA::TypeCode::unalias (ACE_ENV_SINGLE_ARG_DECL)
+{
+ CORBA::TCKind kind = this->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::TypeCode::_nil ());
+
+ CORBA::TypeCode_var tmp = CORBA::TypeCode::_duplicate (this);
+
+ while (kind == CORBA::tk_alias)
+ {
+ tmp = tmp->content_type (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::TypeCode::_nil ());
+
+ kind = tmp->kind (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (CORBA::TypeCode::_nil ());
+ }
+
+ return tmp._retn ();
+}
+
+// ****************************************************************
void
CORBA::TypeCode::_tao_any_destructor (void *x)
diff --git a/TAO/tao/Typecode.h b/TAO/tao/Typecode.h
index f6c320dde99..d6735f5a11c 100644
--- a/TAO/tao/Typecode.h
+++ b/TAO/tao/Typecode.h
@@ -254,6 +254,9 @@ namespace CORBA
TypeCode *&child
ACE_ENV_ARG_DECL);
+ /// Strip away all typedefs, if any.
+ TypeCode_ptr unalias (ACE_ENV_SINGLE_ARG_DECL);
+
// private:
//
// = The guts of the typecode implementation class
diff --git a/TAO/tests/Param_Test/bd_string.cpp b/TAO/tests/Param_Test/bd_string.cpp
index 538784a75a0..ce603643567 100644
--- a/TAO/tests/Param_Test/bd_string.cpp
+++ b/TAO/tests/Param_Test/bd_string.cpp
@@ -89,7 +89,7 @@ Test_Bounded_String::dii_req_invoke (CORBA::Request *req
int
Test_Bounded_String::init_parameters (Param_Test_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_ENV_ARG_DECL_NOT_USED)
{
Generator *gen = GENERATOR::instance (); // value generator