summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-03 02:53:24 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-03 02:53:24 +0000
commitc764a6557166e3b66519007a42b5e2a96c9f4379 (patch)
tree99845646045df09a6b2d256e2290ef91fa194b44 /TAO
parent9bf3ebace08f9fc76d9ef0f990a4a0f98871336e (diff)
downloadATCD-c764a6557166e3b66519007a42b5e2a96c9f4379.tar.gz
Replaced Any operators.
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/CONV_FRAMEC.cpp328
-rw-r--r--TAO/tao/CONV_FRAMEC.h33
-rw-r--r--TAO/tao/CurrentC.cpp105
-rw-r--r--TAO/tao/CurrentC.h6
-rw-r--r--TAO/tao/DomainC.cpp248
-rw-r--r--TAO/tao/DomainC.h6
-rw-r--r--TAO/tao/GIOPC.cpp260
-rw-r--r--TAO/tao/GIOPC.h22
-rw-r--r--TAO/tao/IOPC.cpp662
-rw-r--r--TAO/tao/IOPC.h66
-rw-r--r--TAO/tao/IORC.cpp610
-rw-r--r--TAO/tao/IORC.h61
-rw-r--r--TAO/tao/ImplRepoC.cpp1063
-rw-r--r--TAO/tao/ImplRepoC.h106
-rw-r--r--TAO/tao/InterceptorC.cpp355
-rw-r--r--TAO/tao/InterceptorC.h61
-rw-r--r--TAO/tao/InterceptorC.i211
-rw-r--r--TAO/tao/InterfaceC.cpp6498
-rw-r--r--TAO/tao/InterfaceC.h536
-rw-r--r--TAO/tao/PolicyC.cpp597
-rw-r--r--TAO/tao/PolicyC.h11
-rw-r--r--TAO/tao/PollableC.cpp447
-rw-r--r--TAO/tao/PollableC.h42
-rw-r--r--TAO/tao/TAOC.cpp324
-rw-r--r--TAO/tao/TAOC.h36
25 files changed, 10310 insertions, 2384 deletions
diff --git a/TAO/tao/CONV_FRAMEC.cpp b/TAO/tao/CONV_FRAMEC.cpp
index a20f0f0c2e9..8b4978ab66a 100644
--- a/TAO/tao/CONV_FRAMEC.cpp
+++ b/TAO/tao/CONV_FRAMEC.cpp
@@ -266,14 +266,24 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CONV_FRAME)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_CodeSetContext, &_tc_TAO_tc_CONV_FRAME_CodeSetContext)
TAO_NAMESPACE_END
+
void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponent &_tao_elem) // copying
{
- CONV_FRAME::CodeSetComponent *_any_val;
+ CONV_FRAME::CodeSetComponent *_any_val = 0;
ACE_NEW (_any_val, CONV_FRAME::CodeSetComponent (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CONV_FRAME::_tc_CodeSetComponent, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CONV_FRAME::_tc_CodeSetComponent,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -287,10 +297,23 @@ void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponent *_tao_elem)
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CONV_FRAME::_tc_CodeSetComponent, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CONV_FRAME::_tc_CodeSetComponent,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -299,35 +322,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CONV_FRAME::_tc_CodeSetComponent, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CONV_FRAME::_tc_CodeSetComponent, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (CONV_FRAME::CodeSetComponent *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, CONV_FRAME::CodeSetComponent, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CONV_FRAME::_tc_CodeSetComponent, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CONV_FRAME::_tc_CodeSetComponent, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CONV_FRAME::_tc_CodeSetComponent,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponent *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CONV_FRAME::_tc_CodeSetComponent, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CONV_FRAME::CodeSetComponent *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CONV_FRAME::CodeSetComponent, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CONV_FRAME::CodeSetComponent *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CONV_FRAME::_tc_CodeSetComponent,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CONV_FRAME::CodeSetComponent *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CONV_FRAME::CodeSetComponent *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CONV_FRAME::CodeSetComponent *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -335,12 +421,21 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo
void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponentInfo &_tao_elem) // copying
{
- CONV_FRAME::CodeSetComponentInfo *_any_val;
+ CONV_FRAME::CodeSetComponentInfo *_any_val = 0;
ACE_NEW (_any_val, CONV_FRAME::CodeSetComponentInfo (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CONV_FRAME::_tc_CodeSetComponentInfo, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CONV_FRAME::_tc_CodeSetComponentInfo,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -354,10 +449,23 @@ void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponentInfo *_tao_e
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CONV_FRAME::_tc_CodeSetComponentInfo, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CONV_FRAME::_tc_CodeSetComponentInfo,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -366,35 +474,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CONV_FRAME::_tc_CodeSetComponentInfo, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CONV_FRAME::_tc_CodeSetComponentInfo, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (CONV_FRAME::CodeSetComponentInfo *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, CONV_FRAME::CodeSetComponentInfo, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CONV_FRAME::_tc_CodeSetComponentInfo, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CONV_FRAME::_tc_CodeSetComponentInfo, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CONV_FRAME::_tc_CodeSetComponentInfo,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponentInfo *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CONV_FRAME::_tc_CodeSetComponentInfo, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CONV_FRAME::CodeSetComponentInfo *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CONV_FRAME::CodeSetComponentInfo, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CONV_FRAME::CodeSetComponentInfo *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CONV_FRAME::_tc_CodeSetComponentInfo,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CONV_FRAME::CodeSetComponentInfo *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CONV_FRAME::CodeSetComponentInfo *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CONV_FRAME::CodeSetComponentInfo *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -402,12 +573,21 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo
void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetContext &_tao_elem) // copying
{
- CONV_FRAME::CodeSetContext *_any_val;
+ CONV_FRAME::CodeSetContext *_any_val = 0;
ACE_NEW (_any_val, CONV_FRAME::CodeSetContext (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CONV_FRAME::_tc_CodeSetContext, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CONV_FRAME::_tc_CodeSetContext,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -421,10 +601,23 @@ void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetContext *_tao_elem) /
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CONV_FRAME::_tc_CodeSetContext, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CONV_FRAME::_tc_CodeSetContext,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -433,35 +626,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetConte
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CONV_FRAME::_tc_CodeSetContext, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CONV_FRAME::_tc_CodeSetContext, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (CONV_FRAME::CodeSetContext *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, CONV_FRAME::CodeSetContext, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CONV_FRAME::_tc_CodeSetContext, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CONV_FRAME::_tc_CodeSetContext, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CONV_FRAME::_tc_CodeSetContext,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSetContext *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CONV_FRAME::_tc_CodeSetContext, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CONV_FRAME::CodeSetContext *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CONV_FRAME::CodeSetContext, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CONV_FRAME::CodeSetContext *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CONV_FRAME::_tc_CodeSetContext,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CONV_FRAME::CodeSetContext *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CONV_FRAME::CodeSetContext *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CONV_FRAME::CodeSetContext *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
diff --git a/TAO/tao/CONV_FRAMEC.h b/TAO/tao/CONV_FRAMEC.h
index 0eb9c96c85f..fd43b7efa2b 100644
--- a/TAO/tao/CONV_FRAMEC.h
+++ b/TAO/tao/CONV_FRAMEC.h
@@ -329,15 +329,30 @@ TAO_NAMESPACE CONV_FRAME
}
TAO_NAMESPACE_CLOSE // module CONV_FRAME
-TAO_Export void operator<<= (CORBA::Any &, const CONV_FRAME::CodeSetComponent &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CONV_FRAME::CodeSetComponent*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CONV_FRAME::CodeSetComponent *&);
-TAO_Export void operator<<= (CORBA::Any &, const CONV_FRAME::CodeSetComponentInfo &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CONV_FRAME::CodeSetComponentInfo*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CONV_FRAME::CodeSetComponentInfo *&);
-TAO_Export void operator<<= (CORBA::Any &, const CONV_FRAME::CodeSetContext &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CONV_FRAME::CodeSetContext*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CONV_FRAME::CodeSetContext *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CONV_FRAME::CodeSetComponent &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CONV_FRAME::CodeSetComponent*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CONV_FRAME::CodeSetComponent *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CONV_FRAME::CodeSetComponent *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CONV_FRAME::CodeSetComponentInfo &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CONV_FRAME::CodeSetComponentInfo*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CONV_FRAME::CodeSetComponentInfo *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CONV_FRAME::CodeSetComponentInfo *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CONV_FRAME::CodeSetContext &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CONV_FRAME::CodeSetContext*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CONV_FRAME::CodeSetContext *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CONV_FRAME::CodeSetContext *&);
#ifndef __ACE_INLINE__
diff --git a/TAO/tao/CurrentC.cpp b/TAO/tao/CurrentC.cpp
index 009f75238ff..051b2da91bd 100644
--- a/TAO/tao/CurrentC.cpp
+++ b/TAO/tao/CurrentC.cpp
@@ -80,49 +80,84 @@ const char* CORBA_Current::_interface_repository_id (void) const
return "IDL:omg.org/CORBA/Current:1.0";
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_Current_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::Current_ptr _tao_elem)
{
- CORBA::Environment _tao_env;
- CORBA::Object_ptr *_tao_obj_ptr;
- ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
- *_tao_obj_ptr = CORBA_Current::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_Current, _tao_obj_ptr, 1, _tao_env);
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::Current::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_Current,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete _tao_obj_ptr;
+ }
+ ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_Current_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Current_ptr &_tao_elem)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
+ ACE_TRY_NEW_ENV
+ {
+ _tao_elem = CORBA::Current::_nil ();
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_Current, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
{
- _tao_elem = CORBA_Current::_nil ();
- CORBA::TypeCode_var type = _tao_any.type ();
- CORBA::Boolean eq = type->equal (CORBA::_tc_Current,
- ACE_TRY_ENV);
+ _tao_elem = CORBA::Current::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- if (eq == 0)
- return 0;
-
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA::Object_ptr *_tao_obj_ptr;
- ACE_NEW_RETURN (_tao_obj_ptr, CORBA::Object_ptr, 0);
- if (stream.decode (CORBA::_tc_Current, _tao_obj_ptr, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_Current::_narrow (*_tao_obj_ptr, ACE_TRY_ENV);
- ACE_TRY_CHECK;
- CORBA::release (*_tao_obj_ptr);
- *_tao_obj_ptr = _tao_elem;
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_Current,
- _tao_obj_ptr, 1,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
- }
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_Current,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
}
- ACE_CATCHANY
+ else // failure
{
- return 0;
+ delete tmp;
}
+ }
+ ACE_CATCHANY
+ {
+ delete tmp;
+ _tao_elem = CORBA::Current::_nil ();
+ return 0;
+ }
ACE_ENDTRY;
- return 1;
+ _tao_elem = CORBA::Current::_nil ();
+ return 0;
}
+
diff --git a/TAO/tao/CurrentC.h b/TAO/tao/CurrentC.h
index 3e14ab636bd..5cb043d1077 100644
--- a/TAO/tao/CurrentC.h
+++ b/TAO/tao/CurrentC.h
@@ -147,8 +147,10 @@ class CORBA_Current : public virtual ACE_CORBA_1 (Object)
#endif /* end #if !defined */
// Any operators for interface CORBA_Current
-void operator<<= (CORBA::Any &, CORBA_Current_ptr);
-CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_Current *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA_Current_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA_Current *&);
#if defined (__ACE_INLINE__)
#include "tao/CurrentC.i"
diff --git a/TAO/tao/DomainC.cpp b/TAO/tao/DomainC.cpp
index 189754e6493..fb4cb68d5fb 100644
--- a/TAO/tao/DomainC.cpp
+++ b/TAO/tao/DomainC.cpp
@@ -338,15 +338,30 @@ CORBA_DomainManagerList::CORBA_DomainManagerList (const CORBA_DomainManagerList
CORBA_DomainManagerList::~CORBA_DomainManagerList (void) // dtor
{}
-void operator<<= (CORBA::Any &_tao_any, CORBA_DomainManager_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::DomainManager_ptr _tao_elem)
{
CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
- *_tao_obj_ptr = CORBA_DomainManager::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_DomainManager, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ *_tao_obj_ptr = CORBA::DomainManager::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_DomainManager,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -355,37 +370,52 @@ void operator<<= (CORBA::Any &_tao_any, CORBA_DomainManager_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_DomainManager_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DomainManager_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_DomainManager::_nil ();
+ _tao_elem = CORBA::DomainManager::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_DomainManager, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_DomainManager, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (CORBA::_tc_DomainManager, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
- _tao_elem = CORBA_DomainManager::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ _tao_elem = CORBA::DomainManager::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_DomainManager, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_DomainManager,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::DomainManager::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::DomainManager::_nil ();
return 0;
}
@@ -401,15 +431,30 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_DomainManager_ptr
#if ! defined (TAO_HAS_MINIMUM_CORBA)
-void operator<<= (CORBA::Any &_tao_any, CORBA_ConstructionPolicy_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::ConstructionPolicy_ptr _tao_elem)
{
CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
- *_tao_obj_ptr = CORBA_ConstructionPolicy::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_ConstructionPolicy, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ *_tao_obj_ptr = CORBA::ConstructionPolicy::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ConstructionPolicy,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -418,37 +463,52 @@ void operator<<= (CORBA::Any &_tao_any, CORBA_ConstructionPolicy_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_ConstructionPolicy_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstructionPolicy_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_ConstructionPolicy::_nil ();
+ _tao_elem = CORBA::ConstructionPolicy::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ConstructionPolicy, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ConstructionPolicy, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (CORBA::_tc_ConstructionPolicy, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
- _tao_elem = CORBA_ConstructionPolicy::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ _tao_elem = CORBA::ConstructionPolicy::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_ConstructionPolicy, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ConstructionPolicy,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::ConstructionPolicy::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::ConstructionPolicy::_nil ();
return 0;
}
@@ -463,16 +523,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_ConstructionPolicy
void operator<<= (
CORBA::Any &_tao_any,
- const CORBA_DomainManagerList &_tao_elem
+ const CORBA::DomainManagerList &_tao_elem
) // copying
{
- CORBA_DomainManagerList *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_DomainManagerList (_tao_elem));
+ CORBA::DomainManagerList *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::DomainManagerList (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_DomainManagerList, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_DomainManagerList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -481,52 +556,129 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_DomainManagerList *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::DomainManagerList *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_DomainManagerList, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_DomainManagerList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_DomainManagerList *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DomainManagerList *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_DomainManagerList, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_DomainManagerList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_DomainManagerList *)_tao_any.value ();
+ _tao_elem = (CORBA::DomainManagerList *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_DomainManagerList, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_DomainManagerList, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::DomainManagerList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_DomainManagerList, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_DomainManagerList,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::DomainManagerList *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_DomainManagerList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::DomainManagerList *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::DomainManagerList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::DomainManagerList *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_DomainManagerList,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::DomainManagerList *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::DomainManagerList *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::DomainManagerList *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
+
diff --git a/TAO/tao/DomainC.h b/TAO/tao/DomainC.h
index 9d96865b014..0c92495996e 100644
--- a/TAO/tao/DomainC.h
+++ b/TAO/tao/DomainC.h
@@ -314,8 +314,10 @@ TAO_Export void operator<<= (CORBA::Any &,
const CORBA_DomainManagerList &); // copying version
TAO_Export void operator<<= (CORBA::Any &,
CORBA_DomainManagerList*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
- CORBA_DomainManagerList *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::DomainManagerList *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::DomainManagerList *&);
#ifndef __ACE_INLINE__
diff --git a/TAO/tao/GIOPC.cpp b/TAO/tao/GIOPC.cpp
index b6b569dfbac..400edc567ab 100644
--- a/TAO/tao/GIOPC.cpp
+++ b/TAO/tao/GIOPC.cpp
@@ -390,12 +390,21 @@ TAO_NAMESPACE_END
void operator<<= (CORBA::Any &_tao_any, const GIOP::IORAddressingInfo &_tao_elem) // copying
{
- GIOP::IORAddressingInfo *_any_val;
+ GIOP::IORAddressingInfo *_any_val = 0;
ACE_NEW (_any_val, GIOP::IORAddressingInfo (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (GIOP::_tc_IORAddressingInfo, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ GIOP::_tc_IORAddressingInfo,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -409,10 +418,23 @@ void operator<<= (CORBA::Any &_tao_any, GIOP::IORAddressingInfo *_tao_elem) // n
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (GIOP::_tc_IORAddressingInfo, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ GIOP::_tc_IORAddressingInfo,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -421,35 +443,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, GIOP::IORAddressingInfo
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (GIOP::_tc_IORAddressingInfo, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (GIOP::_tc_IORAddressingInfo, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (GIOP::IORAddressingInfo *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, GIOP::IORAddressingInfo, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (GIOP::_tc_IORAddressingInfo, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (GIOP::_tc_IORAddressingInfo, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ GIOP::_tc_IORAddressingInfo,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const GIOP::IORAddressingInfo *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (GIOP::_tc_IORAddressingInfo, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (GIOP::IORAddressingInfo *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, GIOP::IORAddressingInfo, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(GIOP::IORAddressingInfo *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ GIOP::_tc_IORAddressingInfo,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (GIOP::IORAddressingInfo *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (GIOP::IORAddressingInfo *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (GIOP::IORAddressingInfo *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -460,21 +545,27 @@ void operator<<= (
const GIOP::TargetAddress &_tao_elem
)
{
- GIOP::TargetAddress *_any_val;
+ GIOP::TargetAddress *_any_val = 0;
ACE_NEW (_any_val, GIOP::TargetAddress (_tao_elem));
ACE_TRY_NEW_ENV
{
TAO_OutputCDR stream;
- stream << *_any_val;
- _tao_any._tao_replace (
- GIOP::_tc_TargetAddress,
- TAO_ENCAP_BYTE_ORDER,
- stream.begin (),
- 1,
- _any_val,
- ACE_TRY_ENV
- );
- ACE_TRY_CHECK;
+ if (stream << *_any_val)
+ {
+ _tao_any._tao_replace (
+ GIOP::_tc_TargetAddress,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _any_val;
+ }
}
ACE_CATCHANY
{
@@ -491,18 +582,28 @@ void operator<<= (
ACE_TRY_NEW_ENV
{
TAO_OutputCDR stream;
- stream << *_tao_elem;
- _tao_any._tao_replace (
- GIOP::_tc_TargetAddress,
- TAO_ENCAP_BYTE_ORDER,
- stream.begin (),
- 1,
- _tao_elem,
- ACE_TRY_ENV
- );
- ACE_TRY_CHECK;
+ if (stream << *_tao_elem)
+ {
+ _tao_any._tao_replace (
+ GIOP::_tc_TargetAddress,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_elem;
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
}
- ACE_CATCHANY {}
ACE_ENDTRY;
}
@@ -514,8 +615,11 @@ CORBA::Boolean operator>>= (
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (GIOP::_tc_TargetAddress, ACE_TRY_ENV))
- return 0;
+ if (!type->equivalent (GIOP::_tc_TargetAddress, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -525,23 +629,87 @@ CORBA::Boolean operator>>= (
else
{
ACE_NEW_RETURN (_tao_elem, GIOP::TargetAddress, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- stream >> *_tao_elem;
- ((CORBA::Any *)&_tao_any)->_tao_replace (
- GIOP::_tc_TargetAddress,
- 1,
- ACE_reinterpret_cast(void*,_tao_elem),
- ACE_TRY_ENV
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
);
- ACE_TRY_CHECK;
+
+ if (stream >> *_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ GIOP::_tc_TargetAddress,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+CORBA::Boolean operator>>= (
+ const CORBA::Any &_tao_any,
+ const GIOP::TargetAddress *&_tao_elem
+ )
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (GIOP::_tc_TargetAddress, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (GIOP::TargetAddress *)_tao_any.value ();
return 1;
}
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, GIOP::TargetAddress, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+
+ if (stream >> *(GIOP::TargetAddress *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ GIOP::_tc_TargetAddress,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (GIOP::TargetAddress *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (GIOP::TargetAddress *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
}
ACE_CATCHANY
{
- delete _tao_elem;
+ delete ACE_const_cast (GIOP::TargetAddress *&, _tao_elem);
+ _tao_elem = 0;
}
ACE_ENDTRY;
return 0;
diff --git a/TAO/tao/GIOPC.h b/TAO/tao/GIOPC.h
index 47ef771bece..faa96814ed9 100644
--- a/TAO/tao/GIOPC.h
+++ b/TAO/tao/GIOPC.h
@@ -383,12 +383,22 @@ private:
}
TAO_NAMESPACE_CLOSE // module GIOP
-TAO_Export void operator<<= (CORBA::Any &, const GIOP::IORAddressingInfo &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, GIOP::IORAddressingInfo*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, GIOP::IORAddressingInfo *&);
-TAO_Export void operator<<= (CORBA::Any &, const GIOP::TargetAddress &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, GIOP::TargetAddress*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, GIOP::TargetAddress *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const GIOP::IORAddressingInfo &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ GIOP::IORAddressingInfo*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ GIOP::IORAddressingInfo *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const GIOP::IORAddressingInfo *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const GIOP::TargetAddress &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ GIOP::TargetAddress*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ GIOP::TargetAddress *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const GIOP::TargetAddress *&);
#ifndef __ACE_INLINE__
diff --git a/TAO/tao/IOPC.cpp b/TAO/tao/IOPC.cpp
index 821dd36b645..63a24296780 100644
--- a/TAO/tao/IOPC.cpp
+++ b/TAO/tao/IOPC.cpp
@@ -537,12 +537,21 @@ TAO_NAMESPACE_DEFINE (const CORBA::ULong, UnknownExceptionInfo, 9)
TAO_NAMESPACE_END
void operator<<= (CORBA::Any &_tao_any, const IOP::TaggedProfile &_tao_elem) // copying
{
- IOP::TaggedProfile *_any_val;
+ IOP::TaggedProfile *_any_val = 0;
ACE_NEW (_any_val, IOP::TaggedProfile (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_TaggedProfile, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ IOP::_tc_TaggedProfile,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -556,10 +565,23 @@ void operator<<= (CORBA::Any &_tao_any, IOP::TaggedProfile *_tao_elem) // non co
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_TaggedProfile, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ IOP::_tc_TaggedProfile,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -568,35 +590,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedProfile *&_ta
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (IOP::_tc_TaggedProfile, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (IOP::_tc_TaggedProfile, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (IOP::TaggedProfile *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, IOP::TaggedProfile, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (IOP::_tc_TaggedProfile, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (IOP::_tc_TaggedProfile, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_TaggedProfile,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedProfile *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (IOP::_tc_TaggedProfile, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (IOP::TaggedProfile *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, IOP::TaggedProfile, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(IOP::TaggedProfile *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_TaggedProfile,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (IOP::TaggedProfile *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (IOP::TaggedProfile *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (IOP::TaggedProfile *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -604,12 +689,21 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedProfile *&_ta
void operator<<= (CORBA::Any &_tao_any, const IOP::IOR &_tao_elem) // copying
{
- IOP::IOR *_any_val;
+ IOP::IOR *_any_val = 0;
ACE_NEW (_any_val, IOP::IOR (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_IOR, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ IOP::_tc_IOR,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -623,10 +717,23 @@ void operator<<= (CORBA::Any &_tao_any, IOP::IOR *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_IOR, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ IOP::_tc_IOR,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -635,35 +742,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::IOR *&_tao_elem)
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (IOP::_tc_IOR, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (IOP::_tc_IOR, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (IOP::IOR *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, IOP::IOR, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (IOP::_tc_IOR, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (IOP::_tc_IOR, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_IOR,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::IOR *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (IOP::_tc_IOR, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (IOP::IOR *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, IOP::IOR, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(IOP::IOR *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_IOR,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (IOP::IOR *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (IOP::IOR *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (IOP::IOR *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -671,12 +841,21 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::IOR *&_tao_elem)
void operator<<= (CORBA::Any &_tao_any, const IOP::TaggedComponent &_tao_elem) // copying
{
- IOP::TaggedComponent *_any_val;
+ IOP::TaggedComponent *_any_val = 0;
ACE_NEW (_any_val, IOP::TaggedComponent (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_TaggedComponent, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ IOP::_tc_TaggedComponent,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -690,10 +869,23 @@ void operator<<= (CORBA::Any &_tao_any, IOP::TaggedComponent *_tao_elem) // non
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_TaggedComponent, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ IOP::_tc_TaggedComponent,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -702,35 +894,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedComponent *&_
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (IOP::_tc_TaggedComponent, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (IOP::_tc_TaggedComponent, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (IOP::TaggedComponent *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, IOP::TaggedComponent, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (IOP::_tc_TaggedComponent, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (IOP::_tc_TaggedComponent, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_TaggedComponent,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedComponent *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (IOP::_tc_TaggedComponent, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (IOP::TaggedComponent *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, IOP::TaggedComponent, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(IOP::TaggedComponent *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_TaggedComponent,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (IOP::TaggedComponent *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (IOP::TaggedComponent *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (IOP::TaggedComponent *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -746,8 +1001,23 @@ void operator<<= (
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_MultipleComponentProfile, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ IOP::_tc_MultipleComponentProfile,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -760,10 +1030,23 @@ void operator<<= (CORBA::Any &_tao_any, IOP::MultipleComponentProfile *_tao_elem
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_MultipleComponentProfile, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ IOP::_tc_MultipleComponentProfile,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -772,7 +1055,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::MultipleComponentPr
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (IOP::_tc_MultipleComponentProfile, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (IOP::_tc_MultipleComponentProfile, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -782,25 +1069,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::MultipleComponentPr
else
{
ACE_NEW_RETURN (_tao_elem, IOP::MultipleComponentProfile, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (IOP::_tc_MultipleComponentProfile, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (IOP::_tc_MultipleComponentProfile, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_MultipleComponentProfile,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::MultipleComponentProfile *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (IOP::_tc_MultipleComponentProfile, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (IOP::MultipleComponentProfile *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, IOP::MultipleComponentProfile, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(IOP::MultipleComponentProfile *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_MultipleComponentProfile,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (IOP::MultipleComponentProfile *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (IOP::MultipleComponentProfile *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (IOP::MultipleComponentProfile *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -808,12 +1154,21 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::MultipleComponentPr
void operator<<= (CORBA::Any &_tao_any, const IOP::ServiceContext &_tao_elem) // copying
{
- IOP::ServiceContext *_any_val;
+ IOP::ServiceContext *_any_val = 0;
ACE_NEW (_any_val, IOP::ServiceContext (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_ServiceContext, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ IOP::_tc_ServiceContext,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -827,10 +1182,23 @@ void operator<<= (CORBA::Any &_tao_any, IOP::ServiceContext *_tao_elem) // non c
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_ServiceContext, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ IOP::_tc_ServiceContext,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -839,35 +1207,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContext *&_t
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (IOP::_tc_ServiceContext, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (IOP::_tc_ServiceContext, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (IOP::ServiceContext *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, IOP::ServiceContext, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (IOP::_tc_ServiceContext, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (IOP::_tc_ServiceContext, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_ServiceContext,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::ServiceContext *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (IOP::_tc_ServiceContext, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (IOP::ServiceContext *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, IOP::ServiceContext, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(IOP::ServiceContext *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_ServiceContext,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (IOP::ServiceContext *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (IOP::ServiceContext *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (IOP::ServiceContext *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -883,8 +1314,23 @@ void operator<<= (
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_ServiceContextList, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ IOP::_tc_ServiceContextList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -897,10 +1343,23 @@ void operator<<= (CORBA::Any &_tao_any, IOP::ServiceContextList *_tao_elem) // n
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (IOP::_tc_ServiceContextList, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ IOP::_tc_ServiceContextList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -909,7 +1368,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContextList
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (IOP::_tc_ServiceContextList, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (IOP::_tc_ServiceContextList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -919,25 +1382,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContextList
else
{
ACE_NEW_RETURN (_tao_elem, IOP::ServiceContextList, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (IOP::_tc_ServiceContextList, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (IOP::_tc_ServiceContextList, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_ServiceContextList,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::ServiceContextList *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (IOP::_tc_ServiceContextList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (IOP::ServiceContextList *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, IOP::ServiceContextList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(IOP::ServiceContextList *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ IOP::_tc_ServiceContextList,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (IOP::ServiceContextList *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (IOP::ServiceContextList *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (IOP::ServiceContextList *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
diff --git a/TAO/tao/IOPC.h b/TAO/tao/IOPC.h
index a5512933cac..286278acd76 100644
--- a/TAO/tao/IOPC.h
+++ b/TAO/tao/IOPC.h
@@ -574,24 +574,54 @@ TAO_NAMESPACE IOP
}
TAO_NAMESPACE_CLOSE // module IOP
-TAO_Export void operator<<= (CORBA::Any &, const IOP::TaggedProfile &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, IOP::TaggedProfile*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::TaggedProfile *&);
-TAO_Export void operator<<= (CORBA::Any &, const IOP::IOR &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, IOP::IOR*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::IOR *&);
-TAO_Export void operator<<= (CORBA::Any &, const IOP::TaggedComponent &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, IOP::TaggedComponent*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::TaggedComponent *&);
-TAO_Export void operator<<= (CORBA::Any &, const IOP::MultipleComponentProfile &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, IOP::MultipleComponentProfile*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::MultipleComponentProfile *&);
-TAO_Export void operator<<= (CORBA::Any &, const IOP::ServiceContext &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, IOP::ServiceContext*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::ServiceContext *&);
-TAO_Export void operator<<= (CORBA::Any &, const IOP::ServiceContextList &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, IOP::ServiceContextList*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::ServiceContextList *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const IOP::TaggedProfile &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ IOP::TaggedProfile*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ IOP::TaggedProfile *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const IOP::TaggedProfile *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const IOP::IOR &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ IOP::IOR*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ IOP::IOR *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const IOP::IOR *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const IOP::TaggedComponent &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ IOP::TaggedComponent*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ IOP::TaggedComponent *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const IOP::TaggedComponent *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const IOP::MultipleComponentProfile &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ IOP::MultipleComponentProfile*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ IOP::MultipleComponentProfile *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const IOP::MultipleComponentProfile *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const IOP::ServiceContext &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ IOP::ServiceContext*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ IOP::ServiceContext *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const IOP::ServiceContext *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const IOP::ServiceContextList &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ IOP::ServiceContextList*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ IOP::ServiceContextList *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const IOP::ServiceContextList *&);
#ifndef __ACE_INLINE__
diff --git a/TAO/tao/IORC.cpp b/TAO/tao/IORC.cpp
index 7149d14c1ad..bf314cce209 100644
--- a/TAO/tao/IORC.cpp
+++ b/TAO/tao/IORC.cpp
@@ -464,8 +464,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation_ptr _tao_e
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = TAO_IOP::TAO_IOR_Manipulation::_duplicate (_tao_elem);
- _tao_any.replace (TAO_IOP::_tc_TAO_IOR_Manipulation, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ TAO_IOP::_tc_TAO_IOR_Manipulation,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -477,39 +492,55 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation_ptr _tao_e
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = TAO_IOP::TAO_IOR_Manipulation::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO_IOP::_tc_TAO_IOR_Manipulation, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO_IOP::_tc_TAO_IOR_Manipulation, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (TAO_IOP::_tc_TAO_IOR_Manipulation, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = TAO_IOP::TAO_IOR_Manipulation::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (TAO_IOP::_tc_TAO_IOR_Manipulation, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::_tc_TAO_IOR_Manipulation,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = TAO_IOP::TAO_IOR_Manipulation::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = TAO_IOP::TAO_IOR_Manipulation::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<TAO_IOP::TAO_IOR_Manipulation,TAO_IOP::TAO_IOR_Manipulation_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<TAO_IOP::TAO_IOR_Manipulation,TAO_IOP::TAO_IOR_Manipulation_var>;
template class TAO_Object_Manager<TAO_IOP::TAO_IOR_Manipulation,TAO_IOP::TAO_IOR_Manipulation_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
# pragma instantiate TAO_Object_Field_T<TAO_IOP::TAO_IOR_Manipulation,TAO_IOP::TAO_IOR_Manipulation_var>
@@ -519,16 +550,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
void operator<<= (CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList &_tao_elem) // copying
{
TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *_tao_any_val = 0;
- ACE_NEW (_tao_any_val,
- TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList (_tao_elem));
-
+ ACE_NEW (_tao_any_val, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
@@ -539,10 +577,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::EmptyProf
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -551,7 +602,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -561,25 +616,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
else
{
ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -588,16 +702,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
void operator<<= (CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::NotFound &_tao_elem) // copying
{
TAO_IOP::TAO_IOR_Manipulation::NotFound *_tao_any_val = 0;
- ACE_NEW (_tao_any_val,
- TAO_IOP::TAO_IOR_Manipulation::NotFound (_tao_elem));
-
+ ACE_NEW (_tao_any_val, TAO_IOP::TAO_IOR_Manipulation::NotFound (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
@@ -608,10 +729,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::NotFound
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -620,7 +754,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -630,25 +768,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
else
{
ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::NotFound, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::NotFound *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (TAO_IOP::TAO_IOR_Manipulation::NotFound *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::NotFound, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(TAO_IOP::TAO_IOR_Manipulation::NotFound *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::NotFound *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::NotFound *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::NotFound *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -657,15 +854,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
void operator<<= (CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::Duplicate &_tao_elem) // copying
{
TAO_IOP::TAO_IOR_Manipulation::Duplicate *_tao_any_val = 0;
- ACE_NEW (_tao_any_val,
- TAO_IOP::TAO_IOR_Manipulation::Duplicate (_tao_elem));
+ ACE_NEW (_tao_any_val, TAO_IOP::TAO_IOR_Manipulation::Duplicate (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
@@ -676,10 +881,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::Duplicate
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -688,7 +906,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -698,25 +920,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
else
{
ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::Duplicate, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::Duplicate *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (TAO_IOP::TAO_IOR_Manipulation::Duplicate *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::Duplicate, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(TAO_IOP::TAO_IOR_Manipulation::Duplicate *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::Duplicate *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::Duplicate *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::Duplicate *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -725,15 +1006,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
void operator<<= (CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR &_tao_elem) // copying
{
TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *_tao_any_val = 0;
- ACE_NEW (_tao_any_val,
- TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR (_tao_elem));
+ ACE_NEW (_tao_any_val, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
@@ -744,10 +1033,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::Invalid_I
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -756,7 +1058,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -766,25 +1072,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
else
{
ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -800,8 +1165,23 @@ void operator<<= (
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_IORList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -814,10 +1194,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::IORList *
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_IORList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -826,7 +1219,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -836,25 +1233,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul
else
{
ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::IORList, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_IORList,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO_IOP::TAO_IOR_Manipulation::IORList *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (TAO_IOP::TAO_IOR_Manipulation::IORList *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, TAO_IOP::TAO_IOR_Manipulation::IORList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(TAO_IOP::TAO_IOR_Manipulation::IORList *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO_IOP::TAO_IOR_Manipulation::_tc_IORList,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::IORList *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::IORList *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (TAO_IOP::TAO_IOR_Manipulation::IORList *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
diff --git a/TAO/tao/IORC.h b/TAO/tao/IORC.h
index f88cdf5f7cb..5a5a5bf9ee9 100644
--- a/TAO/tao/IORC.h
+++ b/TAO/tao/IORC.h
@@ -478,23 +478,50 @@ TAO_NAMESPACE TAO_IOP
TAO_NAMESPACE_CLOSE // module TAO_IOP
// Any operators for interface TAO_IOP::TAO_IOR_Manipulation
-TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation_ptr);
-CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation *&);
-TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&);
-TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::NotFound &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::NotFound*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::NotFound *&);
-TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::Duplicate &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::Duplicate*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::Duplicate *&);
-TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&);
-TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::IORList &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::IORList*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::IORList *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::NotFound &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::NotFound*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::NotFound *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::NotFound *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::Duplicate &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::Duplicate*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::Duplicate *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::Duplicate *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::IORList &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::IORList*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO_IOP::TAO_IOR_Manipulation::IORList *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const TAO_IOP::TAO_IOR_Manipulation::IORList *&);
#ifndef __ACE_INLINE__
diff --git a/TAO/tao/ImplRepoC.cpp b/TAO/tao/ImplRepoC.cpp
index 1401468f1eb..8a3592e8970 100644
--- a/TAO/tao/ImplRepoC.cpp
+++ b/TAO/tao/ImplRepoC.cpp
@@ -3024,8 +3024,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerObject_p
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = ImplementationRepository::ServerObject::_duplicate (_tao_elem);
- _tao_any.replace (ImplementationRepository::_tc_ServerObject, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_ServerObject,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -3037,34 +3052,49 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerObject_p
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ServerObject_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = ImplementationRepository::ServerObject::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_ServerObject, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_ServerObject, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (ImplementationRepository::_tc_ServerObject, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = ImplementationRepository::ServerObject::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::_tc_ServerObject, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_ServerObject,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = ImplementationRepository::ServerObject::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = ImplementationRepository::ServerObject::_nil ();
return 0;
}
@@ -3079,12 +3109,21 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::EnvironmentVariable &_tao_elem) // copying
{
- ImplementationRepository::EnvironmentVariable *_any_val;
+ ImplementationRepository::EnvironmentVariable *_any_val = 0;
ACE_NEW (_any_val, ImplementationRepository::EnvironmentVariable (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_EnvironmentVariable, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_EnvironmentVariable,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -3098,10 +3137,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::EnvironmentVar
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_EnvironmentVariable, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_EnvironmentVariable,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -3110,35 +3162,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_EnvironmentVariable, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_EnvironmentVariable, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (ImplementationRepository::EnvironmentVariable *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, ImplementationRepository::EnvironmentVariable, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::_tc_EnvironmentVariable, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::_tc_EnvironmentVariable, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_EnvironmentVariable,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::EnvironmentVariable *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (ImplementationRepository::_tc_EnvironmentVariable, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (ImplementationRepository::EnvironmentVariable *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, ImplementationRepository::EnvironmentVariable, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(ImplementationRepository::EnvironmentVariable *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_EnvironmentVariable,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::EnvironmentVariable *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (ImplementationRepository::EnvironmentVariable *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (ImplementationRepository::EnvironmentVariable *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -3154,8 +3269,23 @@ void operator<<= (
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_EnvironmentList, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_EnvironmentList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -3168,10 +3298,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::EnvironmentLis
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_EnvironmentList, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_EnvironmentList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -3180,7 +3323,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_EnvironmentList, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_EnvironmentList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -3190,25 +3337,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
else
{
ACE_NEW_RETURN (_tao_elem, ImplementationRepository::EnvironmentList, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::_tc_EnvironmentList, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::_tc_EnvironmentList, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_EnvironmentList,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::EnvironmentList *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (ImplementationRepository::_tc_EnvironmentList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (ImplementationRepository::EnvironmentList *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, ImplementationRepository::EnvironmentList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(ImplementationRepository::EnvironmentList *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_EnvironmentList,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::EnvironmentList *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (ImplementationRepository::EnvironmentList *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (ImplementationRepository::EnvironmentList *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -3216,18 +3422,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ActivationMode _tao_elem)
{
- ImplementationRepository::ActivationMode *_any_val;
- ACE_NEW (_any_val, ImplementationRepository::ActivationMode (_tao_elem));
- if (!_any_val) return;
+ ImplementationRepository::ActivationMode *_tao_any_val;
+ ACE_NEW (_tao_any_val, ImplementationRepository::ActivationMode (_tao_elem));
+ if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_ActivationMode, _any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_ActivationMode,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
// free allocated storage
- delete _any_val;
+ delete _tao_any_val;
}
ACE_ENDTRY;
}
@@ -3237,14 +3452,19 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_ActivationMode, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_ActivationMode, ACE_TRY_ENV)) // not equal
+ {
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::_tc_ActivationMode, &_tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
+ {
return 1;
- ACE_TRY_CHECK;
+ }
}
ACE_CATCHANY
{
@@ -3256,12 +3476,21 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::StartupOptions &_tao_elem) // copying
{
- ImplementationRepository::StartupOptions *_any_val;
+ ImplementationRepository::StartupOptions *_any_val = 0;
ACE_NEW (_any_val, ImplementationRepository::StartupOptions (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_StartupOptions, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_StartupOptions,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -3275,10 +3504,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::StartupOptions
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_StartupOptions, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_StartupOptions,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -3287,35 +3529,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_StartupOptions, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_StartupOptions, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (ImplementationRepository::StartupOptions *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, ImplementationRepository::StartupOptions, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::_tc_StartupOptions, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::_tc_StartupOptions, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_StartupOptions,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::StartupOptions *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (ImplementationRepository::_tc_StartupOptions, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (ImplementationRepository::StartupOptions *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, ImplementationRepository::StartupOptions, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(ImplementationRepository::StartupOptions *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_StartupOptions,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::StartupOptions *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (ImplementationRepository::StartupOptions *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (ImplementationRepository::StartupOptions *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -3323,12 +3628,21 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::ServerInformation &_tao_elem) // copying
{
- ImplementationRepository::ServerInformation *_any_val;
+ ImplementationRepository::ServerInformation *_any_val = 0;
ACE_NEW (_any_val, ImplementationRepository::ServerInformation (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_ServerInformation, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_ServerInformation,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -3342,10 +3656,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformat
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_ServerInformation, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_ServerInformation,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -3354,35 +3681,98 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_ServerInformation, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_ServerInformation, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (ImplementationRepository::ServerInformation *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, ImplementationRepository::ServerInformation, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::_tc_ServerInformation, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::_tc_ServerInformation, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_ServerInformation,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::ServerInformation *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (ImplementationRepository::_tc_ServerInformation, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (ImplementationRepository::ServerInformation *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, ImplementationRepository::ServerInformation, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(ImplementationRepository::ServerInformation *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_ServerInformation,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::ServerInformation *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (ImplementationRepository::ServerInformation *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (ImplementationRepository::ServerInformation *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -3398,8 +3788,23 @@ void operator<<= (
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_ServerInformationList, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_ServerInformationList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -3412,10 +3817,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformat
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::_tc_ServerInformationList, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_ServerInformationList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -3424,7 +3842,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_ServerInformationList, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_ServerInformationList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -3434,25 +3856,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
else
{
ACE_NEW_RETURN (_tao_elem, ImplementationRepository::ServerInformationList, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::_tc_ServerInformationList, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::_tc_ServerInformationList, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_ServerInformationList,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::ServerInformationList *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (ImplementationRepository::_tc_ServerInformationList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (ImplementationRepository::ServerInformationList *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, ImplementationRepository::ServerInformationList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(ImplementationRepository::ServerInformationList *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_ServerInformationList,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::ServerInformationList *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (ImplementationRepository::ServerInformationList *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (ImplementationRepository::ServerInformationList *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -3468,8 +3949,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = ImplementationRepository::Administration::_duplicate (_tao_elem);
- _tao_any.replace (ImplementationRepository::_tc_Administration, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_Administration,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -3481,34 +3977,49 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::Administration_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = ImplementationRepository::Administration::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_Administration, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_Administration, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (ImplementationRepository::_tc_Administration, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = ImplementationRepository::Administration::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::_tc_Administration, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_Administration,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = ImplementationRepository::Administration::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = ImplementationRepository::Administration::_nil ();
return 0;
}
@@ -3525,12 +4036,22 @@ void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administ
{
ImplementationRepository::Administration::AlreadyRegistered *_tao_any_val = 0;
ACE_NEW (_tao_any_val, ImplementationRepository::Administration::AlreadyRegistered (_tao_elem));
+ if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::Administration::_tc_AlreadyRegistered, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ ImplementationRepository::Administration::_tc_AlreadyRegistered,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
@@ -3541,10 +4062,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::Administration::_tc_AlreadyRegistered, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ ImplementationRepository::Administration::_tc_AlreadyRegistered,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -3553,7 +4087,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::Administration::_tc_AlreadyRegistered, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::Administration::_tc_AlreadyRegistered, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -3563,25 +4101,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
else
{
ACE_NEW_RETURN (_tao_elem, ImplementationRepository::Administration::AlreadyRegistered, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::Administration::_tc_AlreadyRegistered, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::Administration::_tc_AlreadyRegistered, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::Administration::_tc_AlreadyRegistered,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::Administration::AlreadyRegistered *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (ImplementationRepository::Administration::_tc_AlreadyRegistered, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (ImplementationRepository::Administration::AlreadyRegistered *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, ImplementationRepository::Administration::AlreadyRegistered, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(ImplementationRepository::Administration::AlreadyRegistered *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::Administration::_tc_AlreadyRegistered,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::Administration::AlreadyRegistered *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (ImplementationRepository::Administration::AlreadyRegistered *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (ImplementationRepository::Administration::AlreadyRegistered *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -3591,12 +4188,22 @@ void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administ
{
ImplementationRepository::Administration::CannotActivate *_tao_any_val = 0;
ACE_NEW (_tao_any_val, ImplementationRepository::Administration::CannotActivate (_tao_elem));
+ if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::Administration::_tc_CannotActivate, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ ImplementationRepository::Administration::_tc_CannotActivate,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
@@ -3607,10 +4214,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::Administration::_tc_CannotActivate, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ ImplementationRepository::Administration::_tc_CannotActivate,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -3619,7 +4239,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::Administration::_tc_CannotActivate, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::Administration::_tc_CannotActivate, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -3629,25 +4253,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
else
{
ACE_NEW_RETURN (_tao_elem, ImplementationRepository::Administration::CannotActivate, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::Administration::_tc_CannotActivate, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::Administration::_tc_CannotActivate, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::Administration::_tc_CannotActivate,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::Administration::CannotActivate *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (ImplementationRepository::Administration::_tc_CannotActivate, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (ImplementationRepository::Administration::CannotActivate *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, ImplementationRepository::Administration::CannotActivate, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(ImplementationRepository::Administration::CannotActivate *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::Administration::_tc_CannotActivate,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::Administration::CannotActivate *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (ImplementationRepository::Administration::CannotActivate *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (ImplementationRepository::Administration::CannotActivate *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -3657,12 +4340,22 @@ void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administ
{
ImplementationRepository::Administration::NotFound *_tao_any_val = 0;
ACE_NEW (_tao_any_val, ImplementationRepository::Administration::NotFound (_tao_elem));
+ if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::Administration::_tc_NotFound, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ ImplementationRepository::Administration::_tc_NotFound,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
@@ -3673,10 +4366,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (ImplementationRepository::Administration::_tc_NotFound, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ ImplementationRepository::Administration::_tc_NotFound,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -3685,7 +4391,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::Administration::_tc_NotFound, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::Administration::_tc_NotFound, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -3695,25 +4405,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository
else
{
ACE_NEW_RETURN (_tao_elem, ImplementationRepository::Administration::NotFound, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (ImplementationRepository::Administration::_tc_NotFound, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::Administration::_tc_NotFound, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::Administration::_tc_NotFound,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepository::Administration::NotFound *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (ImplementationRepository::Administration::_tc_NotFound, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (ImplementationRepository::Administration::NotFound *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, ImplementationRepository::Administration::NotFound, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(ImplementationRepository::Administration::NotFound *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::Administration::_tc_NotFound,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::Administration::NotFound *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (ImplementationRepository::Administration::NotFound *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (ImplementationRepository::Administration::NotFound *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -3729,8 +4498,23 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformat
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = ImplementationRepository::ServerInformationIterator::_duplicate (_tao_elem);
- _tao_any.replace (ImplementationRepository::_tc_ServerInformationIterator, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ ImplementationRepository::_tc_ServerInformationIterator,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -3742,34 +4526,49 @@ void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformat
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ServerInformationIterator_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = ImplementationRepository::ServerInformationIterator::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equivalent (ImplementationRepository::_tc_ServerInformationIterator, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (ImplementationRepository::_tc_ServerInformationIterator, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (ImplementationRepository::_tc_ServerInformationIterator, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = ImplementationRepository::ServerInformationIterator::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (ImplementationRepository::_tc_ServerInformationIterator, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ ImplementationRepository::_tc_ServerInformationIterator,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = ImplementationRepository::ServerInformationIterator::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = ImplementationRepository::ServerInformationIterator::_nil ();
return 0;
}
diff --git a/TAO/tao/ImplRepoC.h b/TAO/tao/ImplRepoC.h
index 36ed18ee827..870167331ad 100644
--- a/TAO/tao/ImplRepoC.h
+++ b/TAO/tao/ImplRepoC.h
@@ -1571,40 +1571,86 @@ extern TAO_Export ImplementationRepository::ServerObject_ptr (*_TAO_collocation_
CORBA::Object_ptr obj
);
// Any operators for interface ImplementationRepository::ServerObject
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ServerObject_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ServerObject *&);
-TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::EnvironmentVariable &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::EnvironmentVariable*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::EnvironmentVariable *&);
-TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::EnvironmentList &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::EnvironmentList*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::EnvironmentList *&);
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ActivationMode);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ActivationMode &);
-TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::StartupOptions &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::StartupOptions*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::StartupOptions *&);
-TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::ServerInformation &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ServerInformation*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ServerInformation *&);
-TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::ServerInformationList &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::ServerInformationList*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::ServerInformationList *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::ServerObject_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::ServerObject *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const ImplementationRepository::EnvironmentVariable &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::EnvironmentVariable*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::EnvironmentVariable *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const ImplementationRepository::EnvironmentVariable *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const ImplementationRepository::EnvironmentList &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::EnvironmentList*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::EnvironmentList *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const ImplementationRepository::EnvironmentList *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::ActivationMode);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::ActivationMode &);
+TAO_Export void operator<<= (CORBA::Any &,
+ const ImplementationRepository::StartupOptions &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::StartupOptions*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::StartupOptions *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const ImplementationRepository::StartupOptions *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const ImplementationRepository::ServerInformation &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::ServerInformation*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::ServerInformation *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const ImplementationRepository::ServerInformation *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const ImplementationRepository::ServerInformationList &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::ServerInformationList*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::ServerInformationList *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const ImplementationRepository::ServerInformationList *&);
extern TAO_Export ImplementationRepository::Administration_ptr (*_TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface ImplementationRepository::Administration
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::Administration_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::Administration *&);
-TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::Administration::AlreadyRegistered &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::Administration::AlreadyRegistered*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::Administration::AlreadyRegistered *&);
-TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::Administration::CannotActivate &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::Administration::CannotActivate*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::Administration::CannotActivate *&);
-TAO_Export void operator<<= (CORBA::Any &, const ImplementationRepository::Administration::NotFound &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, ImplementationRepository::Administration::NotFound*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationRepository::Administration::NotFound *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::Administration_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::Administration *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const ImplementationRepository::Administration::AlreadyRegistered &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::Administration::AlreadyRegistered*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::Administration::AlreadyRegistered *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const ImplementationRepository::Administration::AlreadyRegistered *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const ImplementationRepository::Administration::CannotActivate &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::Administration::CannotActivate*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::Administration::CannotActivate *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const ImplementationRepository::Administration::CannotActivate *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const ImplementationRepository::Administration::NotFound &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ ImplementationRepository::Administration::NotFound*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ ImplementationRepository::Administration::NotFound *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const ImplementationRepository::Administration::NotFound *&);
extern TAO_Export ImplementationRepository::ServerInformationIterator_ptr (*_TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
diff --git a/TAO/tao/InterceptorC.cpp b/TAO/tao/InterceptorC.cpp
index c10168780fc..41fdfe74349 100644
--- a/TAO/tao/InterceptorC.cpp
+++ b/TAO/tao/InterceptorC.cpp
@@ -443,8 +443,23 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Cookie_ptr _tao_ele
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = PortableInterceptor::Cookie::_duplicate (_tao_elem);
- _tao_any.replace (PortableInterceptor::_tc_Cookie, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ PortableInterceptor::_tc_Cookie,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -456,34 +471,49 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Cookie_ptr _tao_ele
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Cookie_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = PortableInterceptor::Cookie::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (PortableInterceptor::_tc_Cookie, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (PortableInterceptor::_tc_Cookie, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (PortableInterceptor::_tc_Cookie, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = PortableInterceptor::Cookie::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (PortableInterceptor::_tc_Cookie, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ PortableInterceptor::_tc_Cookie,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = PortableInterceptor::Cookie::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = PortableInterceptor::Cookie::_nil ();
return 0;
}
@@ -505,8 +535,23 @@ void operator<<= (
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (PortableInterceptor::_tc_Cookies, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ PortableInterceptor::_tc_Cookies,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -519,10 +564,23 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Cookies *_tao_elem)
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (PortableInterceptor::_tc_Cookies, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ PortableInterceptor::_tc_Cookies,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -531,7 +589,11 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Coo
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (PortableInterceptor::_tc_Cookies, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (PortableInterceptor::_tc_Cookies, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
@@ -541,25 +603,84 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Coo
else
{
ACE_NEW_RETURN (_tao_elem, PortableInterceptor::Cookies, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (PortableInterceptor::_tc_Cookies, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (PortableInterceptor::_tc_Cookies, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ PortableInterceptor::_tc_Cookies,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableInterceptor::Cookies *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (PortableInterceptor::_tc_Cookies, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (PortableInterceptor::Cookies *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, PortableInterceptor::Cookies, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(PortableInterceptor::Cookies *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ PortableInterceptor::_tc_Cookies,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (PortableInterceptor::Cookies *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (PortableInterceptor::Cookies *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (PortableInterceptor::Cookies *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -572,8 +693,23 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Interceptor_ptr _ta
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = PortableInterceptor::Interceptor::_duplicate (_tao_elem);
- _tao_any.replace (PortableInterceptor::_tc_Interceptor, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ PortableInterceptor::_tc_Interceptor,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -585,34 +721,49 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Interceptor_ptr _ta
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Interceptor_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = PortableInterceptor::Interceptor::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (PortableInterceptor::_tc_Interceptor, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (PortableInterceptor::_tc_Interceptor, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (PortableInterceptor::_tc_Interceptor, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = PortableInterceptor::Interceptor::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (PortableInterceptor::_tc_Interceptor, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ PortableInterceptor::_tc_Interceptor,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = PortableInterceptor::Interceptor::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = PortableInterceptor::Interceptor::_nil ();
return 0;
}
@@ -631,8 +782,23 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::ServerRequestInterc
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = PortableInterceptor::ServerRequestInterceptor::_duplicate (_tao_elem);
- _tao_any.replace (PortableInterceptor::_tc_ServerRequestInterceptor, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ PortableInterceptor::_tc_ServerRequestInterceptor,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -644,34 +810,49 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::ServerRequestInterc
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::ServerRequestInterceptor_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = PortableInterceptor::ServerRequestInterceptor::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (PortableInterceptor::_tc_ServerRequestInterceptor, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (PortableInterceptor::_tc_ServerRequestInterceptor, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (PortableInterceptor::_tc_ServerRequestInterceptor, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = PortableInterceptor::ServerRequestInterceptor::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (PortableInterceptor::_tc_ServerRequestInterceptor, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ PortableInterceptor::_tc_ServerRequestInterceptor,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = PortableInterceptor::ServerRequestInterceptor::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = PortableInterceptor::ServerRequestInterceptor::_nil ();
return 0;
}
@@ -690,8 +871,23 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::ClientRequestInterc
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = PortableInterceptor::ClientRequestInterceptor::_duplicate (_tao_elem);
- _tao_any.replace (PortableInterceptor::_tc_ClientRequestInterceptor, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ PortableInterceptor::_tc_ClientRequestInterceptor,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -703,34 +899,49 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::ClientRequestInterc
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::ClientRequestInterceptor_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = PortableInterceptor::ClientRequestInterceptor::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (PortableInterceptor::_tc_ClientRequestInterceptor, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (PortableInterceptor::_tc_ClientRequestInterceptor, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (PortableInterceptor::_tc_ClientRequestInterceptor, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = PortableInterceptor::ClientRequestInterceptor::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (PortableInterceptor::_tc_ClientRequestInterceptor, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ PortableInterceptor::_tc_ClientRequestInterceptor,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = PortableInterceptor::ClientRequestInterceptor::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = PortableInterceptor::ClientRequestInterceptor::_nil ();
return 0;
}
@@ -742,4 +953,46 @@ template class TAO_Object_Manager<PortableInterceptor::ClientRequestInterceptor,
# pragma instantiate TAO_Object_Manager<PortableInterceptor::ClientRequestInterceptor,PortableInterceptor::ClientRequestInterceptor_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+CORBA::Boolean operator<< (
+ TAO_OutputCDR &strm,
+ const PortableInterceptor::Cookies &_tao_sequence
+ )
+{
+ if (strm << _tao_sequence.length ())
+ {
+ // encode all elements
+ CORBA::Boolean _tao_marshal_flag = 1;
+ for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++)
+ {
+ _tao_marshal_flag = (strm << _tao_sequence[i].in ());
+ }
+ return _tao_marshal_flag;
+ }
+ return 0; // error
+}
+
+CORBA::Boolean operator>> (
+ TAO_InputCDR &strm,
+ PortableInterceptor::Cookies &_tao_sequence
+ )
+{
+ CORBA::ULong _tao_seq_len;
+ if (strm >> _tao_seq_len)
+ {
+ // set the length of the sequence
+ _tao_sequence.length (_tao_seq_len);
+ // If length is 0 we return true.
+ if (0 >= _tao_seq_len)
+ return 1;
+ // retrieve all the elements
+ CORBA::Boolean _tao_marshal_flag = 1;
+ for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++)
+ {
+ _tao_marshal_flag = (strm >> _tao_sequence[i].out ());
+ }
+ return _tao_marshal_flag;
+ }
+ return 0; // error
+}
+
#endif /* TAO_HAS_INTERCEPTORS */
diff --git a/TAO/tao/InterceptorC.h b/TAO/tao/InterceptorC.h
index 3bdf806c9fe..d4e8900a4b4 100644
--- a/TAO/tao/InterceptorC.h
+++ b/TAO/tao/InterceptorC.h
@@ -714,28 +714,63 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor
TAO_NAMESPACE_CLOSE // module PortableInterceptor
// Any operators for interface PortableInterceptor::Cookie
-TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Cookie_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::Cookie *&);
-TAO_Export void operator<<= (CORBA::Any &, const PortableInterceptor::Cookies &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Cookies*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::Cookies *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ PortableInterceptor::Cookie_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ PortableInterceptor::Cookie *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const PortableInterceptor::Cookies &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ PortableInterceptor::Cookies*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ PortableInterceptor::Cookies *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const PortableInterceptor::Cookies *&);
// Any operators for interface PortableInterceptor::Interceptor
-TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Interceptor_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::Interceptor *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ PortableInterceptor::Interceptor_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ PortableInterceptor::Interceptor *&);
// Any operators for interface PortableInterceptor::ServerRequestInterceptor
-TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ServerRequestInterceptor_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ServerRequestInterceptor *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ PortableInterceptor::ServerRequestInterceptor_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ PortableInterceptor::ServerRequestInterceptor *&);
// Any operators for interface PortableInterceptor::ClientRequestInterceptor
-TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ClientRequestInterceptor_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ClientRequestInterceptor *&);
-
-#endif /* TAO_HAS_INTERCEPTORS */
+TAO_Export void operator<<= (CORBA::Any &,
+ PortableInterceptor::ClientRequestInterceptor_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ PortableInterceptor::ClientRequestInterceptor *&);
#ifndef __ACE_INLINE__
+ CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableInterceptor::Cookie_ptr );
+ CORBA::Boolean operator>> (TAO_InputCDR &, PortableInterceptor::Cookie_ptr &);
+
+#if !defined _TAO_CDR_OP_PortableInterceptor_Cookies_H_
+#define _TAO_CDR_OP_PortableInterceptor_Cookies_H_
+
+ CORBA::Boolean operator<< (
+ TAO_OutputCDR &,
+ const PortableInterceptor::Cookies &
+ );
+ CORBA::Boolean operator>> (
+ TAO_InputCDR &,
+ PortableInterceptor::Cookies &
+ );
+
+#endif /* _TAO_CDR_OP_PortableInterceptor_Cookies_H_ */
+
+ CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableInterceptor::Interceptor_ptr );
+ CORBA::Boolean operator>> (TAO_InputCDR &, PortableInterceptor::Interceptor_ptr &);
+ CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableInterceptor::ServerRequestInterceptor_ptr );
+ CORBA::Boolean operator>> (TAO_InputCDR &, PortableInterceptor::ServerRequestInterceptor_ptr &);
+ CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableInterceptor::ClientRequestInterceptor_ptr );
+ CORBA::Boolean operator>> (TAO_InputCDR &, PortableInterceptor::ClientRequestInterceptor_ptr &);
#endif /* __ACE_INLINE__ */
+#endif /* TAO_HAS_INTERCEPTORS */
#if defined (__ACE_INLINE__)
#include "tao/InterceptorC.i"
diff --git a/TAO/tao/InterceptorC.i b/TAO/tao/InterceptorC.i
index 4e1c7934391..96fbd45bf5d 100644
--- a/TAO/tao/InterceptorC.i
+++ b/TAO/tao/InterceptorC.i
@@ -1095,4 +1095,215 @@ PortableInterceptor::ClientRequestInterceptor_out::operator-> (void)
#endif /* end #if !defined */
+ACE_INLINE CORBA::Boolean
+operator<< (
+ TAO_OutputCDR &,
+ const PortableInterceptor::Cookie_ptr
+ );
+ACE_INLINE CORBA::Boolean
+operator>> (
+ TAO_InputCDR &,
+ PortableInterceptor::Cookie_ptr &
+ );
+
+ACE_INLINE CORBA::Boolean
+operator<< (
+ TAO_OutputCDR &strm,
+ const PortableInterceptor::Cookie_ptr _tao_objref
+ )
+{
+ CORBA::Object_ptr _tao_corba_obj = _tao_objref;
+ return (strm << _tao_corba_obj);
+}
+
+ACE_INLINE CORBA::Boolean
+operator>> (
+ TAO_InputCDR &strm,
+ PortableInterceptor::Cookie_ptr &_tao_objref
+ )
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var obj;
+ if ((strm >> obj.inout ()) == 0)
+ return 0;
+ // narrow to the right type
+ _tao_objref =
+ PortableInterceptor::Cookie::_narrow (
+ obj.in (),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ ACE_CATCHANY
+ {
+ // do nothing
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+
+#if !defined _TAO_CDR_OP_PortableInterceptor_Cookies_I_
+#define _TAO_CDR_OP_PortableInterceptor_Cookies_I_
+
+CORBA::Boolean operator<< (
+ TAO_OutputCDR &,
+ const PortableInterceptor::Cookies &
+ );
+CORBA::Boolean operator>> (
+ TAO_InputCDR &,
+ PortableInterceptor::Cookies &
+ );
+
+#endif /* _TAO_CDR_OP_PortableInterceptor_Cookies_I_ */
+
+ACE_INLINE CORBA::Boolean
+operator<< (
+ TAO_OutputCDR &,
+ const PortableInterceptor::Interceptor_ptr
+ );
+ACE_INLINE CORBA::Boolean
+operator>> (
+ TAO_InputCDR &,
+ PortableInterceptor::Interceptor_ptr &
+ );
+
+ACE_INLINE CORBA::Boolean
+operator<< (
+ TAO_OutputCDR &strm,
+ const PortableInterceptor::Interceptor_ptr _tao_objref
+ )
+{
+ CORBA::Object_ptr _tao_corba_obj = _tao_objref;
+ return (strm << _tao_corba_obj);
+}
+
+ACE_INLINE CORBA::Boolean
+operator>> (
+ TAO_InputCDR &strm,
+ PortableInterceptor::Interceptor_ptr &_tao_objref
+ )
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var obj;
+ if ((strm >> obj.inout ()) == 0)
+ return 0;
+ // narrow to the right type
+ _tao_objref =
+ PortableInterceptor::Interceptor::_narrow (
+ obj.in (),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ ACE_CATCHANY
+ {
+ // do nothing
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+ACE_INLINE CORBA::Boolean
+operator<< (
+ TAO_OutputCDR &,
+ const PortableInterceptor::ServerRequestInterceptor_ptr
+ );
+ACE_INLINE CORBA::Boolean
+operator>> (
+ TAO_InputCDR &,
+ PortableInterceptor::ServerRequestInterceptor_ptr &
+ );
+
+ACE_INLINE CORBA::Boolean
+operator<< (
+ TAO_OutputCDR &strm,
+ const PortableInterceptor::ServerRequestInterceptor_ptr _tao_objref
+ )
+{
+ CORBA::Object_ptr _tao_corba_obj = _tao_objref;
+ return (strm << _tao_corba_obj);
+}
+
+ACE_INLINE CORBA::Boolean
+operator>> (
+ TAO_InputCDR &strm,
+ PortableInterceptor::ServerRequestInterceptor_ptr &_tao_objref
+ )
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var obj;
+ if ((strm >> obj.inout ()) == 0)
+ return 0;
+ // narrow to the right type
+ _tao_objref =
+ PortableInterceptor::ServerRequestInterceptor::_narrow (
+ obj.in (),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ ACE_CATCHANY
+ {
+ // do nothing
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+ACE_INLINE CORBA::Boolean
+operator<< (
+ TAO_OutputCDR &,
+ const PortableInterceptor::ClientRequestInterceptor_ptr
+ );
+ACE_INLINE CORBA::Boolean
+operator>> (
+ TAO_InputCDR &,
+ PortableInterceptor::ClientRequestInterceptor_ptr &
+ );
+
+ACE_INLINE CORBA::Boolean
+operator<< (
+ TAO_OutputCDR &strm,
+ const PortableInterceptor::ClientRequestInterceptor_ptr _tao_objref
+ )
+{
+ CORBA::Object_ptr _tao_corba_obj = _tao_objref;
+ return (strm << _tao_corba_obj);
+}
+
+ACE_INLINE CORBA::Boolean
+operator>> (
+ TAO_InputCDR &strm,
+ PortableInterceptor::ClientRequestInterceptor_ptr &_tao_objref
+ )
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var obj;
+ if ((strm >> obj.inout ()) == 0)
+ return 0;
+ // narrow to the right type
+ _tao_objref =
+ PortableInterceptor::ClientRequestInterceptor::_narrow (
+ obj.in (),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ ACE_CATCHANY
+ {
+ // do nothing
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
#endif /* TAO_HAS_INTERCEPTORS */
diff --git a/TAO/tao/InterfaceC.cpp b/TAO/tao/InterfaceC.cpp
index d77fe4923a0..5b1811293f6 100644
--- a/TAO/tao/InterfaceC.cpp
+++ b/TAO/tao/InterfaceC.cpp
@@ -13788,37 +13788,51 @@ TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (CORBA)
TAO_NAMESPACE_DEFINE (const CORBA::Short, VM_TRUNCATABLE, 3)
TAO_NAMESPACE_END
-void operator<<= (CORBA_Any &_tao_any,CORBA::DefinitionKind _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::DefinitionKind _tao_elem)
{
- CORBA::DefinitionKind *_any_val;
- ACE_NEW (_any_val,CORBA::DefinitionKind (_tao_elem));
- if (!_any_val) return;
+ CORBA::DefinitionKind *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::DefinitionKind (_tao_elem));
+ if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_DefinitionKind, _any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_DefinitionKind,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
// free allocated storage
- delete _any_val;
+ delete _tao_any_val;
}
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::DefinitionKind &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DefinitionKind &_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_DefinitionKind, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_DefinitionKind, ACE_TRY_ENV)) // not equal
+ {
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_DefinitionKind, &_tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
+ {
return 1;
- ACE_TRY_CHECK;
+ }
}
ACE_CATCHANY
{
@@ -13828,18 +13842,33 @@ CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::DefinitionKind &_t
return 0;
}
-CORBA_IRObject_ptr (*_TAO_collocation_CORBA_IRObject_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::IRObject_ptr (*_TAO_collocation_CORBA_IRObject_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_IRObject_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::IRObject_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_IRObject::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_IRObject, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::IRObject::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_IRObject,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -13848,60 +13877,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_IRObject_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_IRObject_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::IRObject_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_IRObject::_nil ();
+ _tao_elem = CORBA::IRObject::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_IRObject, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_IRObject, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_IRObject, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_IRObject::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::IRObject::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_IRObject, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_IRObject,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::IRObject::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::IRObject::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_IRObject,CORBA_IRObject_var>;
-template class TAO_Object_Manager<CORBA_IRObject,CORBA_IRObject_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::IRObject,CORBA::IRObject_var>;
+ template class TAO_Object_Manager<CORBA::IRObject,CORBA::IRObject_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_IRObject,CORBA_IRObject_var>
-# pragma instantiate TAO_Object_Manager<CORBA_IRObject,CORBA_IRObject_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::IRObject,CORBA::IRObject_var>
+# pragma instantiate TAO_Object_Manager<CORBA::IRObject,CORBA::IRObject_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_Contained_ptr (*_TAO_collocation_CORBA_Contained_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::Contained_ptr (*_TAO_collocation_CORBA_Contained_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_Contained_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::Contained_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_Contained::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_Contained, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::Contained::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_Contained,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -13910,56 +13970,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_Contained_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_Contained_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_Contained::_nil ();
+ _tao_elem = CORBA::Contained::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_Contained, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_Contained, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_Contained, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_Contained::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::Contained::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_Contained, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_Contained,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::Contained::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::Contained::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_Contained,CORBA_Contained_var>;
-template class TAO_Object_Manager<CORBA_Contained,CORBA_Contained_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::Contained,CORBA::Contained_var>;
+ template class TAO_Object_Manager<CORBA::Contained,CORBA::Contained_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_Contained,CORBA_Contained_var>
-# pragma instantiate TAO_Object_Manager<CORBA_Contained,CORBA_Contained_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::Contained,CORBA::Contained_var>
+# pragma instantiate TAO_Object_Manager<CORBA::Contained,CORBA::Contained_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_Contained::Description &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::Contained::Description &_tao_elem) // copying
{
- CORBA_Contained::Description *_any_val;
- ACE_NEW (_any_val, CORBA_Contained::Description (_tao_elem));
+ CORBA::Contained::Description *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::Contained::Description (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_Contained::_tc_Description, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::Contained::_tc_Description,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -13969,68 +14054,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_Contained::Description &_tao_
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_Contained::Description *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::Contained::Description *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_Contained::_tc_Description, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::Contained::_tc_Description,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_Contained::Description *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained::Description *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA_Contained::_tc_Description, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::Contained::_tc_Description, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_Contained::Description *)_tao_any.value ();
+ _tao_elem = (CORBA::Contained::Description *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_Contained::Description, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA_Contained::_tc_Description, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::Contained::Description, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA_Contained::_tc_Description, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::Contained::_tc_Description,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::Contained::Description *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::Contained::_tc_Description, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::Contained::Description *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::Contained::Description, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::Contained::Description *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::Contained::_tc_Description,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::Contained::Description *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::Contained::Description *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::Contained::Description *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_InterfaceDefSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::InterfaceDefSeq &_tao_elem
) // copying
{
- CORBA_InterfaceDefSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_InterfaceDefSeq (_tao_elem));
+ CORBA::InterfaceDefSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::InterfaceDefSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_InterfaceDefSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_InterfaceDefSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -14039,68 +14215,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_InterfaceDefSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDefSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_InterfaceDefSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_InterfaceDefSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_InterfaceDefSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDefSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_InterfaceDefSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_InterfaceDefSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_InterfaceDefSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::InterfaceDefSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_InterfaceDefSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_InterfaceDefSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::InterfaceDefSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_InterfaceDefSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InterfaceDefSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::InterfaceDefSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_InterfaceDefSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::InterfaceDefSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::InterfaceDefSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::InterfaceDefSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InterfaceDefSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::InterfaceDefSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::InterfaceDefSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::InterfaceDefSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_ValueDefSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::ValueDefSeq &_tao_elem
) // copying
{
- CORBA_ValueDefSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_ValueDefSeq (_tao_elem));
+ CORBA::ValueDefSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::ValueDefSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ValueDefSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueDefSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -14109,68 +14376,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ValueDefSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDefSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ValueDefSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueDefSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ValueDefSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDefSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ValueDefSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ValueDefSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ValueDefSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::ValueDefSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ValueDefSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ValueDefSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueDefSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ValueDefSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueDefSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ValueDefSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ValueDefSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ValueDefSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueDefSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ValueDefSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueDefSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ValueDefSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ValueDefSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ValueDefSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_ContainedSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::ContainedSeq &_tao_elem
) // copying
{
- CORBA_ContainedSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_ContainedSeq (_tao_elem));
+ CORBA::ContainedSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::ContainedSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ContainedSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ContainedSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -14179,64 +14537,149 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ContainedSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ContainedSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ContainedSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ContainedSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ContainedSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContainedSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ContainedSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ContainedSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ContainedSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::ContainedSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ContainedSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ContainedSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ContainedSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ContainedSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ContainedSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ContainedSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ContainedSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ContainedSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ContainedSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ContainedSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ContainedSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ContainedSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ContainedSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ContainedSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, const CORBA_StructMember &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::StructMember &_tao_elem) // copying
{
- CORBA_StructMember *_any_val;
- ACE_NEW (_any_val, CORBA_StructMember (_tao_elem));
+ CORBA::StructMember *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::StructMember (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_StructMember, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_StructMember,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -14246,68 +14689,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_StructMember &_tao_elem) // c
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_StructMember *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::StructMember *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_StructMember, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_StructMember,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_StructMember *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMember *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_StructMember, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_StructMember, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_StructMember *)_tao_any.value ();
+ _tao_elem = (CORBA::StructMember *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_StructMember, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_StructMember, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::StructMember, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_StructMember, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_StructMember,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::StructMember *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_StructMember, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::StructMember *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::StructMember, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::StructMember *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_StructMember,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::StructMember *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::StructMember *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::StructMember *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_StructMemberSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::StructMemberSeq &_tao_elem
) // copying
{
- CORBA_StructMemberSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_StructMemberSeq (_tao_elem));
+ CORBA::StructMemberSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::StructMemberSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_StructMemberSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_StructMemberSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -14316,64 +14850,149 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_StructMemberSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::StructMemberSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_StructMemberSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_StructMemberSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_StructMemberSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMemberSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_StructMemberSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_StructMemberSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_StructMemberSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::StructMemberSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_StructMemberSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_StructMemberSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::StructMemberSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_StructMemberSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_StructMemberSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::StructMemberSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_StructMemberSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::StructMemberSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::StructMemberSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::StructMemberSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_StructMemberSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::StructMemberSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::StructMemberSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::StructMemberSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, const CORBA_Initializer &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::Initializer &_tao_elem) // copying
{
- CORBA_Initializer *_any_val;
- ACE_NEW (_any_val, CORBA_Initializer (_tao_elem));
+ CORBA::Initializer *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::Initializer (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_Initializer, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_Initializer,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -14383,68 +15002,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_Initializer &_tao_elem) // co
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_Initializer *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::Initializer *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_Initializer, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_Initializer,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_Initializer *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Initializer *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_Initializer, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_Initializer, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_Initializer *)_tao_any.value ();
+ _tao_elem = (CORBA::Initializer *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_Initializer, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_Initializer, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::Initializer, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_Initializer, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_Initializer,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::Initializer *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_Initializer, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::Initializer *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::Initializer, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::Initializer *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_Initializer,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::Initializer *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::Initializer *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::Initializer *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_InitializerSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::InitializerSeq &_tao_elem
) // copying
{
- CORBA_InitializerSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_InitializerSeq (_tao_elem));
+ CORBA::InitializerSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::InitializerSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_InitializerSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_InitializerSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -14453,64 +15163,149 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_InitializerSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::InitializerSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_InitializerSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_InitializerSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_InitializerSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InitializerSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_InitializerSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_InitializerSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_InitializerSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::InitializerSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_InitializerSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_InitializerSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::InitializerSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_InitializerSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InitializerSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::InitializerSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_InitializerSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::InitializerSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::InitializerSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::InitializerSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InitializerSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::InitializerSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::InitializerSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::InitializerSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, const CORBA_UnionMember &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::UnionMember &_tao_elem) // copying
{
- CORBA_UnionMember *_any_val;
- ACE_NEW (_any_val, CORBA_UnionMember (_tao_elem));
+ CORBA::UnionMember *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::UnionMember (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_UnionMember, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_UnionMember,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -14520,68 +15315,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_UnionMember &_tao_elem) // co
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_UnionMember *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::UnionMember *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_UnionMember, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_UnionMember,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_UnionMember *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMember *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_UnionMember, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_UnionMember, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_UnionMember *)_tao_any.value ();
+ _tao_elem = (CORBA::UnionMember *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_UnionMember, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_UnionMember, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::UnionMember, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_UnionMember, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_UnionMember,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::UnionMember *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_UnionMember, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::UnionMember *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::UnionMember, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::UnionMember *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_UnionMember,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::UnionMember *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::UnionMember *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::UnionMember *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_UnionMemberSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::UnionMemberSeq &_tao_elem
) // copying
{
- CORBA_UnionMemberSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_UnionMemberSeq (_tao_elem));
+ CORBA::UnionMemberSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::UnionMemberSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_UnionMemberSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_UnionMemberSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -14590,68 +15476,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_UnionMemberSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::UnionMemberSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_UnionMemberSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_UnionMemberSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_UnionMemberSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMemberSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_UnionMemberSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_UnionMemberSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_UnionMemberSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::UnionMemberSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_UnionMemberSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_UnionMemberSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::UnionMemberSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_UnionMemberSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_UnionMemberSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::UnionMemberSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_UnionMemberSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::UnionMemberSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::UnionMemberSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::UnionMemberSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_UnionMemberSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::UnionMemberSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::UnionMemberSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::UnionMemberSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_EnumMemberSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::EnumMemberSeq &_tao_elem
) // copying
{
- CORBA_EnumMemberSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_EnumMemberSeq (_tao_elem));
+ CORBA::EnumMemberSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::EnumMemberSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_EnumMemberSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_EnumMemberSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -14660,68 +15637,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_EnumMemberSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::EnumMemberSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_EnumMemberSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_EnumMemberSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_EnumMemberSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::EnumMemberSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_EnumMemberSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_EnumMemberSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_EnumMemberSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::EnumMemberSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_EnumMemberSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_EnumMemberSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::EnumMemberSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_EnumMemberSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_EnumMemberSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_Container_ptr (*_TAO_collocation_CORBA_Container_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_Container_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::EnumMemberSeq *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_Container::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_Container, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_EnumMemberSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::EnumMemberSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::EnumMemberSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::EnumMemberSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_EnumMemberSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::EnumMemberSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::EnumMemberSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::EnumMemberSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Container_ptr (*_TAO_collocation_CORBA_Container_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::Container_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::Container::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_Container,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -14730,56 +15798,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_Container_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_Container_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_Container::_nil ();
+ _tao_elem = CORBA::Container::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_Container, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_Container, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_Container, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_Container::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::Container::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_Container, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_Container,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::Container::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::Container::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_Container,CORBA_Container_var>;
-template class TAO_Object_Manager<CORBA_Container,CORBA_Container_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::Container,CORBA::Container_var>;
+ template class TAO_Object_Manager<CORBA::Container,CORBA::Container_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_Container,CORBA_Container_var>
-# pragma instantiate TAO_Object_Manager<CORBA_Container,CORBA_Container_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::Container,CORBA::Container_var>
+# pragma instantiate TAO_Object_Manager<CORBA::Container,CORBA::Container_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_Container::Description &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::Container::Description &_tao_elem) // copying
{
- CORBA_Container::Description *_any_val;
- ACE_NEW (_any_val, CORBA_Container::Description (_tao_elem));
+ CORBA::Container::Description *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::Container::Description (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_Container::_tc_Description, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::Container::_tc_Description,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -14789,68 +15882,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_Container::Description &_tao_
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_Container::Description *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::Container::Description *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_Container::_tc_Description, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::Container::_tc_Description,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_Container::Description *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::Description *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA_Container::_tc_Description, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::Container::_tc_Description, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_Container::Description *)_tao_any.value ();
+ _tao_elem = (CORBA::Container::Description *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_Container::Description, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA_Container::_tc_Description, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::Container::Description, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA_Container::_tc_Description, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::Container::_tc_Description,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::Container::Description *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::Container::_tc_Description, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::Container::Description *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::Container::Description, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::Container::Description *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::Container::_tc_Description,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::Container::Description *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::Container::Description *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::Container::Description *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_Container::DescriptionSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::Container::DescriptionSeq &_tao_elem
) // copying
{
- CORBA_Container::DescriptionSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_Container::DescriptionSeq (_tao_elem));
+ CORBA::Container::DescriptionSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::Container::DescriptionSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_Container::_tc_DescriptionSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::Container::_tc_DescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -14859,68 +16043,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_Container::DescriptionSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::Container::DescriptionSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_Container::_tc_DescriptionSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::Container::_tc_DescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_Container::DescriptionSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::DescriptionSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA_Container::_tc_DescriptionSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::Container::_tc_DescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_Container::DescriptionSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::Container::DescriptionSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_Container::DescriptionSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA_Container::_tc_DescriptionSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::Container::DescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA_Container::_tc_DescriptionSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::Container::_tc_DescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_IDLType_ptr (*_TAO_collocation_CORBA_IDLType_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_IDLType_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::Container::DescriptionSeq *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_IDLType::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_IDLType, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::Container::_tc_DescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::Container::DescriptionSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::Container::DescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::Container::DescriptionSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::Container::_tc_DescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::Container::DescriptionSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::Container::DescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::Container::DescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::IDLType_ptr (*_TAO_collocation_CORBA_IDLType_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::IDLType_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::IDLType::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_IDLType,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -14929,79 +16204,109 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_IDLType_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_IDLType_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::IDLType_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_IDLType::_nil ();
+ _tao_elem = CORBA::IDLType::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_IDLType, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_IDLType, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_IDLType, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_IDLType::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::IDLType::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_IDLType, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_IDLType,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::IDLType::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::IDLType::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_IDLType,CORBA_IDLType_var>;
-template class TAO_Object_Manager<CORBA_IDLType,CORBA_IDLType_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::IDLType,CORBA::IDLType_var>;
+ template class TAO_Object_Manager<CORBA::IDLType,CORBA::IDLType_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_IDLType,CORBA_IDLType_var>
-# pragma instantiate TAO_Object_Manager<CORBA_IDLType,CORBA_IDLType_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::IDLType,CORBA::IDLType_var>
+# pragma instantiate TAO_Object_Manager<CORBA::IDLType,CORBA::IDLType_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, CORBA::PrimitiveKind _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::PrimitiveKind _tao_elem)
{
- CORBA::PrimitiveKind *_any_val;
- ACE_NEW (_any_val, CORBA::PrimitiveKind (_tao_elem));
- if (!_any_val) return;
+ CORBA::PrimitiveKind *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::PrimitiveKind (_tao_elem));
+ if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_PrimitiveKind, _any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_PrimitiveKind,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
// free allocated storage
- delete _any_val;
+ delete _tao_any_val;
}
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::PrimitiveKind &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PrimitiveKind &_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_PrimitiveKind, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_PrimitiveKind, ACE_TRY_ENV)) // not equal
+ {
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_PrimitiveKind, &_tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
+ {
return 1;
- ACE_TRY_CHECK;
+ }
}
ACE_CATCHANY
{
@@ -15011,18 +16316,33 @@ CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::PrimitiveKind &_ta
return 0;
}
-CORBA_Repository_ptr (*_TAO_collocation_CORBA_Repository_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::Repository_ptr (*_TAO_collocation_CORBA_Repository_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_Repository_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::Repository_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_Repository::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_Repository, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::Repository::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_Repository,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15031,60 +16351,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_Repository_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_Repository_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Repository_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_Repository::_nil ();
+ _tao_elem = CORBA::Repository::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_Repository, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_Repository, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_Repository, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_Repository::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::Repository::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_Repository, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_Repository,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::Repository::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::Repository::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_Repository,CORBA_Repository_var>;
-template class TAO_Object_Manager<CORBA_Repository,CORBA_Repository_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::Repository,CORBA::Repository_var>;
+ template class TAO_Object_Manager<CORBA::Repository,CORBA::Repository_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_Repository,CORBA_Repository_var>
-# pragma instantiate TAO_Object_Manager<CORBA_Repository,CORBA_Repository_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::Repository,CORBA::Repository_var>
+# pragma instantiate TAO_Object_Manager<CORBA::Repository,CORBA::Repository_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_ModuleDef_ptr (*_TAO_collocation_CORBA_ModuleDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::ModuleDef_ptr (*_TAO_collocation_CORBA_ModuleDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_ModuleDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::ModuleDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_ModuleDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_ModuleDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::ModuleDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ModuleDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15093,56 +16444,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_ModuleDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ModuleDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_ModuleDef::_nil ();
+ _tao_elem = CORBA::ModuleDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ModuleDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ModuleDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_ModuleDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_ModuleDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::ModuleDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ModuleDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ModuleDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::ModuleDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::ModuleDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_ModuleDef,CORBA_ModuleDef_var>;
-template class TAO_Object_Manager<CORBA_ModuleDef,CORBA_ModuleDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::ModuleDef,CORBA::ModuleDef_var>;
+ template class TAO_Object_Manager<CORBA::ModuleDef,CORBA::ModuleDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_ModuleDef,CORBA_ModuleDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_ModuleDef,CORBA_ModuleDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::ModuleDef,CORBA::ModuleDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::ModuleDef,CORBA::ModuleDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_ModuleDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::ModuleDescription &_tao_elem) // copying
{
- CORBA_ModuleDescription *_any_val;
- ACE_NEW (_any_val, CORBA_ModuleDescription (_tao_elem));
+ CORBA::ModuleDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::ModuleDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ModuleDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_ModuleDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -15152,68 +16528,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_ModuleDescription &_tao_elem)
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ModuleDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ModuleDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ModuleDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ModuleDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ModuleDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ModuleDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ModuleDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ModuleDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::ModuleDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ModuleDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ModuleDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ModuleDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ModuleDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ModuleDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_ConstantDef_ptr (*_TAO_collocation_CORBA_ConstantDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_ConstantDef_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ModuleDescription *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_ConstantDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_ConstantDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ModuleDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ModuleDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ModuleDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ModuleDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ModuleDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ModuleDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ModuleDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ModuleDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::ConstantDef_ptr (*_TAO_collocation_CORBA_ConstantDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::ConstantDef_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::ConstantDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ConstantDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15222,56 +16689,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_ConstantDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ConstantDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_ConstantDef::_nil ();
+ _tao_elem = CORBA::ConstantDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ConstantDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ConstantDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_ConstantDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_ConstantDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::ConstantDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ConstantDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ConstantDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::ConstantDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::ConstantDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_ConstantDef,CORBA_ConstantDef_var>;
-template class TAO_Object_Manager<CORBA_ConstantDef,CORBA_ConstantDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::ConstantDef,CORBA::ConstantDef_var>;
+ template class TAO_Object_Manager<CORBA::ConstantDef,CORBA::ConstantDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_ConstantDef,CORBA_ConstantDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_ConstantDef,CORBA_ConstantDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::ConstantDef,CORBA::ConstantDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::ConstantDef,CORBA::ConstantDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_ConstantDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::ConstantDescription &_tao_elem) // copying
{
- CORBA_ConstantDescription *_any_val;
- ACE_NEW (_any_val, CORBA_ConstantDescription (_tao_elem));
+ CORBA::ConstantDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::ConstantDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ConstantDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_ConstantDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -15281,68 +16773,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_ConstantDescription &_tao_ele
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ConstantDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ConstantDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ConstantDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ConstantDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ConstantDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ConstantDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ConstantDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ConstantDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::ConstantDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ConstantDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ConstantDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ConstantDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ConstantDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ConstantDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_TypedefDef_ptr (*_TAO_collocation_CORBA_TypedefDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_TypedefDef_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ConstantDescription *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_TypedefDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_TypedefDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ConstantDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ConstantDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ConstantDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ConstantDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ConstantDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ConstantDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ConstantDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ConstantDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::TypedefDef_ptr (*_TAO_collocation_CORBA_TypedefDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::TypedefDef_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::TypedefDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_TypedefDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15351,56 +16934,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_TypedefDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_TypedefDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypedefDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_TypedefDef::_nil ();
+ _tao_elem = CORBA::TypedefDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_TypedefDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_TypedefDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_TypedefDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_TypedefDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::TypedefDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_TypedefDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_TypedefDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::TypedefDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::TypedefDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_TypedefDef,CORBA_TypedefDef_var>;
-template class TAO_Object_Manager<CORBA_TypedefDef,CORBA_TypedefDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::TypedefDef,CORBA::TypedefDef_var>;
+ template class TAO_Object_Manager<CORBA::TypedefDef,CORBA::TypedefDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_TypedefDef,CORBA_TypedefDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_TypedefDef,CORBA_TypedefDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::TypedefDef,CORBA::TypedefDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::TypedefDef,CORBA::TypedefDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_TypeDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::TypeDescription &_tao_elem) // copying
{
- CORBA_TypeDescription *_any_val;
- ACE_NEW (_any_val, CORBA_TypeDescription (_tao_elem));
+ CORBA::TypeDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::TypeDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_TypeDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_TypeDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -15410,68 +17018,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_TypeDescription &_tao_elem) /
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_TypeDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::TypeDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_TypeDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_TypeDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_TypeDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypeDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_TypeDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_TypeDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_TypeDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::TypeDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_TypeDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_TypeDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::TypeDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_TypeDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_TypeDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_StructDef_ptr (*_TAO_collocation_CORBA_StructDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_StructDef_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::TypeDescription *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_StructDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_StructDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_TypeDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::TypeDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::TypeDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::TypeDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_TypeDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::TypeDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::TypeDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::TypeDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::StructDef_ptr (*_TAO_collocation_CORBA_StructDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::StructDef_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::StructDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_StructDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15480,60 +17179,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_StructDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_StructDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_StructDef::_nil ();
+ _tao_elem = CORBA::StructDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_StructDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_StructDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_StructDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_StructDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::StructDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_StructDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_StructDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::StructDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::StructDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_StructDef,CORBA_StructDef_var>;
-template class TAO_Object_Manager<CORBA_StructDef,CORBA_StructDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::StructDef,CORBA::StructDef_var>;
+ template class TAO_Object_Manager<CORBA::StructDef,CORBA::StructDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_StructDef,CORBA_StructDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_StructDef,CORBA_StructDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::StructDef,CORBA::StructDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::StructDef,CORBA::StructDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_UnionDef_ptr (*_TAO_collocation_CORBA_UnionDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::UnionDef_ptr (*_TAO_collocation_CORBA_UnionDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_UnionDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::UnionDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_UnionDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_UnionDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::UnionDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_UnionDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15542,60 +17272,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_UnionDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_UnionDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_UnionDef::_nil ();
+ _tao_elem = CORBA::UnionDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_UnionDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_UnionDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_UnionDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_UnionDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::UnionDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_UnionDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_UnionDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::UnionDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::UnionDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_UnionDef,CORBA_UnionDef_var>;
-template class TAO_Object_Manager<CORBA_UnionDef,CORBA_UnionDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::UnionDef,CORBA::UnionDef_var>;
+ template class TAO_Object_Manager<CORBA::UnionDef,CORBA::UnionDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_UnionDef,CORBA_UnionDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_UnionDef,CORBA_UnionDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::UnionDef,CORBA::UnionDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::UnionDef,CORBA::UnionDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_EnumDef_ptr (*_TAO_collocation_CORBA_EnumDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::EnumDef_ptr (*_TAO_collocation_CORBA_EnumDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_EnumDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::EnumDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_EnumDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_EnumDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::EnumDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_EnumDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15604,60 +17365,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_EnumDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_EnumDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::EnumDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_EnumDef::_nil ();
+ _tao_elem = CORBA::EnumDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_EnumDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_EnumDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_EnumDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_EnumDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::EnumDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_EnumDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_EnumDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::EnumDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::EnumDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_EnumDef,CORBA_EnumDef_var>;
-template class TAO_Object_Manager<CORBA_EnumDef,CORBA_EnumDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::EnumDef,CORBA::EnumDef_var>;
+ template class TAO_Object_Manager<CORBA::EnumDef,CORBA::EnumDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_EnumDef,CORBA_EnumDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_EnumDef,CORBA_EnumDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::EnumDef,CORBA::EnumDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::EnumDef,CORBA::EnumDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_AliasDef_ptr (*_TAO_collocation_CORBA_AliasDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::AliasDef_ptr (*_TAO_collocation_CORBA_AliasDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_AliasDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::AliasDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_AliasDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_AliasDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::AliasDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_AliasDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15666,60 +17458,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_AliasDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_AliasDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AliasDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_AliasDef::_nil ();
+ _tao_elem = CORBA::AliasDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_AliasDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_AliasDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_AliasDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_AliasDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::AliasDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_AliasDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_AliasDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::AliasDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::AliasDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_AliasDef,CORBA_AliasDef_var>;
-template class TAO_Object_Manager<CORBA_AliasDef,CORBA_AliasDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::AliasDef,CORBA::AliasDef_var>;
+ template class TAO_Object_Manager<CORBA::AliasDef,CORBA::AliasDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_AliasDef,CORBA_AliasDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_AliasDef,CORBA_AliasDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::AliasDef,CORBA::AliasDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::AliasDef,CORBA::AliasDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_PrimitiveDef_ptr (*_TAO_collocation_CORBA_PrimitiveDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::PrimitiveDef_ptr (*_TAO_collocation_CORBA_PrimitiveDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_PrimitiveDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::PrimitiveDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_PrimitiveDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_PrimitiveDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::PrimitiveDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_PrimitiveDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15728,60 +17551,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_PrimitiveDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_PrimitiveDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PrimitiveDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_PrimitiveDef::_nil ();
+ _tao_elem = CORBA::PrimitiveDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_PrimitiveDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_PrimitiveDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_PrimitiveDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_PrimitiveDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::PrimitiveDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_PrimitiveDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_PrimitiveDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::PrimitiveDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::PrimitiveDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_PrimitiveDef,CORBA_PrimitiveDef_var>;
-template class TAO_Object_Manager<CORBA_PrimitiveDef,CORBA_PrimitiveDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::PrimitiveDef,CORBA::PrimitiveDef_var>;
+ template class TAO_Object_Manager<CORBA::PrimitiveDef,CORBA::PrimitiveDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_PrimitiveDef,CORBA_PrimitiveDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_PrimitiveDef,CORBA_PrimitiveDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::PrimitiveDef,CORBA::PrimitiveDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::PrimitiveDef,CORBA::PrimitiveDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_StringDef_ptr (*_TAO_collocation_CORBA_StringDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::StringDef_ptr (*_TAO_collocation_CORBA_StringDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_StringDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::StringDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_StringDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_StringDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::StringDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_StringDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15790,60 +17644,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_StringDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_StringDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StringDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_StringDef::_nil ();
+ _tao_elem = CORBA::StringDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_StringDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_StringDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_StringDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_StringDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::StringDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_StringDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_StringDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::StringDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::StringDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_StringDef,CORBA_StringDef_var>;
-template class TAO_Object_Manager<CORBA_StringDef,CORBA_StringDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::StringDef,CORBA::StringDef_var>;
+ template class TAO_Object_Manager<CORBA::StringDef,CORBA::StringDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_StringDef,CORBA_StringDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_StringDef,CORBA_StringDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::StringDef,CORBA::StringDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::StringDef,CORBA::StringDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_WstringDef_ptr (*_TAO_collocation_CORBA_WstringDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::WstringDef_ptr (*_TAO_collocation_CORBA_WstringDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_WstringDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::WstringDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_WstringDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_WstringDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::WstringDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_WstringDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15852,60 +17737,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_WstringDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_WstringDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::WstringDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_WstringDef::_nil ();
+ _tao_elem = CORBA::WstringDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_WstringDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_WstringDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_WstringDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_WstringDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::WstringDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_WstringDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_WstringDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::WstringDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::WstringDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_WstringDef,CORBA_WstringDef_var>;
-template class TAO_Object_Manager<CORBA_WstringDef,CORBA_WstringDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::WstringDef,CORBA::WstringDef_var>;
+ template class TAO_Object_Manager<CORBA::WstringDef,CORBA::WstringDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_WstringDef,CORBA_WstringDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_WstringDef,CORBA_WstringDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::WstringDef,CORBA::WstringDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::WstringDef,CORBA::WstringDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_FixedDef_ptr (*_TAO_collocation_CORBA_FixedDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::FixedDef_ptr (*_TAO_collocation_CORBA_FixedDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_FixedDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::FixedDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_FixedDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_FixedDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::FixedDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_FixedDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15914,60 +17830,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_FixedDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_FixedDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::FixedDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_FixedDef::_nil ();
+ _tao_elem = CORBA::FixedDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_FixedDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_FixedDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_FixedDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_FixedDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::FixedDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_FixedDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_FixedDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::FixedDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::FixedDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_FixedDef,CORBA_FixedDef_var>;
-template class TAO_Object_Manager<CORBA_FixedDef,CORBA_FixedDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::FixedDef,CORBA::FixedDef_var>;
+ template class TAO_Object_Manager<CORBA::FixedDef,CORBA::FixedDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_FixedDef,CORBA_FixedDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_FixedDef,CORBA_FixedDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::FixedDef,CORBA::FixedDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::FixedDef,CORBA::FixedDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_SequenceDef_ptr (*_TAO_collocation_CORBA_SequenceDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::SequenceDef_ptr (*_TAO_collocation_CORBA_SequenceDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_SequenceDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::SequenceDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_SequenceDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_SequenceDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::SequenceDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_SequenceDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -15976,60 +17923,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_SequenceDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_SequenceDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::SequenceDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_SequenceDef::_nil ();
+ _tao_elem = CORBA::SequenceDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_SequenceDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_SequenceDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_SequenceDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_SequenceDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::SequenceDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_SequenceDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_SequenceDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::SequenceDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::SequenceDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_SequenceDef,CORBA_SequenceDef_var>;
-template class TAO_Object_Manager<CORBA_SequenceDef,CORBA_SequenceDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::SequenceDef,CORBA::SequenceDef_var>;
+ template class TAO_Object_Manager<CORBA::SequenceDef,CORBA::SequenceDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_SequenceDef,CORBA_SequenceDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_SequenceDef,CORBA_SequenceDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::SequenceDef,CORBA::SequenceDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::SequenceDef,CORBA::SequenceDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_ArrayDef_ptr (*_TAO_collocation_CORBA_ArrayDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::ArrayDef_ptr (*_TAO_collocation_CORBA_ArrayDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_ArrayDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::ArrayDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_ArrayDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_ArrayDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::ArrayDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ArrayDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -16038,60 +18016,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_ArrayDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ArrayDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ArrayDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_ArrayDef::_nil ();
+ _tao_elem = CORBA::ArrayDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ArrayDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ArrayDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_ArrayDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_ArrayDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::ArrayDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ArrayDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ArrayDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::ArrayDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::ArrayDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_ArrayDef,CORBA_ArrayDef_var>;
-template class TAO_Object_Manager<CORBA_ArrayDef,CORBA_ArrayDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::ArrayDef,CORBA::ArrayDef_var>;
+ template class TAO_Object_Manager<CORBA::ArrayDef,CORBA::ArrayDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_ArrayDef,CORBA_ArrayDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_ArrayDef,CORBA_ArrayDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::ArrayDef,CORBA::ArrayDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::ArrayDef,CORBA::ArrayDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_ExceptionDef_ptr (*_TAO_collocation_CORBA_ExceptionDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::ExceptionDef_ptr (*_TAO_collocation_CORBA_ExceptionDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_ExceptionDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::ExceptionDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_ExceptionDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_ExceptionDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::ExceptionDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ExceptionDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -16100,56 +18109,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_ExceptionDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ExceptionDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_ExceptionDef::_nil ();
+ _tao_elem = CORBA::ExceptionDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ExceptionDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ExceptionDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_ExceptionDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_ExceptionDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::ExceptionDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ExceptionDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ExceptionDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::ExceptionDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::ExceptionDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_ExceptionDef,CORBA_ExceptionDef_var>;
-template class TAO_Object_Manager<CORBA_ExceptionDef,CORBA_ExceptionDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::ExceptionDef,CORBA::ExceptionDef_var>;
+ template class TAO_Object_Manager<CORBA::ExceptionDef,CORBA::ExceptionDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_ExceptionDef,CORBA_ExceptionDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_ExceptionDef,CORBA_ExceptionDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::ExceptionDef,CORBA::ExceptionDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::ExceptionDef,CORBA::ExceptionDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_ExceptionDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::ExceptionDescription &_tao_elem) // copying
{
- CORBA_ExceptionDescription *_any_val;
- ACE_NEW (_any_val, CORBA_ExceptionDescription (_tao_elem));
+ CORBA::ExceptionDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::ExceptionDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ExceptionDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_ExceptionDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -16159,87 +18193,177 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_ExceptionDescription &_tao_el
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ExceptionDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ExceptionDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ExceptionDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ExceptionDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ExceptionDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ExceptionDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ExceptionDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ExceptionDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::ExceptionDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ExceptionDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ExceptionDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ExceptionDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ExceptionDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ExceptionDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA::AttributeMode _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ExceptionDescription *&_tao_elem)
{
- CORBA::AttributeMode *_any_val;
- ACE_NEW (_any_val, CORBA::AttributeMode (_tao_elem));
- if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_AttributeMode, _any_val, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ExceptionDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ExceptionDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ExceptionDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ExceptionDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ExceptionDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ExceptionDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ExceptionDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ExceptionDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+void operator<<= (CORBA::Any &_tao_any, CORBA::AttributeMode _tao_elem)
+{
+ CORBA::AttributeMode *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::AttributeMode (_tao_elem));
+ if (!_tao_any_val) return;
+ ACE_TRY_NEW_ENV
+ {
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_AttributeMode,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
// free allocated storage
- delete _any_val;
+ delete _tao_any_val;
}
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::AttributeMode &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeMode &_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_AttributeMode, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_AttributeMode, ACE_TRY_ENV)) // not equal
+ {
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_AttributeMode, &_tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
+ {
return 1;
- ACE_TRY_CHECK;
+ }
}
ACE_CATCHANY
{
@@ -16249,18 +18373,33 @@ CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::AttributeMode &_ta
return 0;
}
-CORBA_AttributeDef_ptr (*_TAO_collocation_CORBA_AttributeDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::AttributeDef_ptr (*_TAO_collocation_CORBA_AttributeDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_AttributeDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::AttributeDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_AttributeDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_AttributeDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::AttributeDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_AttributeDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -16269,56 +18408,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_AttributeDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_AttributeDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_AttributeDef::_nil ();
+ _tao_elem = CORBA::AttributeDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_AttributeDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_AttributeDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_AttributeDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_AttributeDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::AttributeDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_AttributeDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_AttributeDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::AttributeDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::AttributeDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_AttributeDef,CORBA_AttributeDef_var>;
-template class TAO_Object_Manager<CORBA_AttributeDef,CORBA_AttributeDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::AttributeDef,CORBA::AttributeDef_var>;
+ template class TAO_Object_Manager<CORBA::AttributeDef,CORBA::AttributeDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_AttributeDef,CORBA_AttributeDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_AttributeDef,CORBA_AttributeDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::AttributeDef,CORBA::AttributeDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::AttributeDef,CORBA::AttributeDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_AttributeDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::AttributeDescription &_tao_elem) // copying
{
- CORBA_AttributeDescription *_any_val;
- ACE_NEW (_any_val, CORBA_AttributeDescription (_tao_elem));
+ CORBA::AttributeDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::AttributeDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_AttributeDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_AttributeDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -16328,87 +18492,177 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_AttributeDescription &_tao_el
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_AttributeDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::AttributeDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_AttributeDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_AttributeDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_AttributeDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_AttributeDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_AttributeDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_AttributeDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::AttributeDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_AttributeDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_AttributeDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::AttributeDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_AttributeDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_AttributeDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA::OperationMode _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::AttributeDescription *&_tao_elem)
{
- CORBA::OperationMode *_any_val;
- ACE_NEW (_any_val, CORBA::OperationMode (_tao_elem));
- if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_OperationMode, _any_val, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_AttributeDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::AttributeDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::AttributeDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::AttributeDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_AttributeDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::AttributeDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::AttributeDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::AttributeDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+void operator<<= (CORBA::Any &_tao_any, CORBA::OperationMode _tao_elem)
+{
+ CORBA::OperationMode *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::OperationMode (_tao_elem));
+ if (!_tao_any_val) return;
+ ACE_TRY_NEW_ENV
+ {
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_OperationMode,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
// free allocated storage
- delete _any_val;
+ delete _tao_any_val;
}
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::OperationMode &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationMode &_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_OperationMode, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_OperationMode, ACE_TRY_ENV)) // not equal
+ {
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_OperationMode, &_tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
+ {
return 1;
- ACE_TRY_CHECK;
+ }
}
ACE_CATCHANY
{
@@ -16418,37 +18672,51 @@ CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::OperationMode &_ta
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA::ParameterMode _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::ParameterMode _tao_elem)
{
- CORBA::ParameterMode *_any_val;
- ACE_NEW (_any_val, CORBA::ParameterMode (_tao_elem));
- if (!_any_val) return;
+ CORBA::ParameterMode *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::ParameterMode (_tao_elem));
+ if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ParameterMode, _any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_ParameterMode,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
// free allocated storage
- delete _any_val;
+ delete _tao_any_val;
}
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::ParameterMode &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParameterMode &_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ParameterMode, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ParameterMode, ACE_TRY_ENV)) // not equal
+ {
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ParameterMode, &_tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
+ {
return 1;
- ACE_TRY_CHECK;
+ }
}
ACE_CATCHANY
{
@@ -16458,14 +18726,23 @@ CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA::ParameterMode &_ta
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, const CORBA_ParameterDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::ParameterDescription &_tao_elem) // copying
{
- CORBA_ParameterDescription *_any_val;
- ACE_NEW (_any_val, CORBA_ParameterDescription (_tao_elem));
+ CORBA::ParameterDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::ParameterDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ParameterDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_ParameterDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -16475,68 +18752,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_ParameterDescription &_tao_el
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ParameterDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ParameterDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ParameterDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ParameterDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ParameterDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParameterDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ParameterDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ParameterDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ParameterDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::ParameterDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ParameterDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ParameterDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ParameterDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ParameterDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ParameterDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ParameterDescription *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ParameterDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ParameterDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ParameterDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ParameterDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ParameterDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ParameterDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ParameterDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ParameterDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_ParDescriptionSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::ParDescriptionSeq &_tao_elem
) // copying
{
- CORBA_ParDescriptionSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_ParDescriptionSeq (_tao_elem));
+ CORBA::ParDescriptionSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::ParDescriptionSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ParDescriptionSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ParDescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -16545,68 +18913,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ParDescriptionSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ParDescriptionSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ParDescriptionSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ParDescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ParDescriptionSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParDescriptionSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ParDescriptionSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ParDescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ParDescriptionSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::ParDescriptionSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ParDescriptionSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ParDescriptionSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ParDescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ParDescriptionSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ParDescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ParDescriptionSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ParDescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ParDescriptionSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ParDescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ParDescriptionSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ParDescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ParDescriptionSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ParDescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ParDescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_ContextIdSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::ContextIdSeq &_tao_elem
) // copying
{
- CORBA_ContextIdSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_ContextIdSeq (_tao_elem));
+ CORBA::ContextIdSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::ContextIdSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ContextIdSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ContextIdSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -16615,68 +19074,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ContextIdSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ContextIdSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ContextIdSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ContextIdSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ContextIdSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContextIdSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ContextIdSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ContextIdSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ContextIdSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::ContextIdSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ContextIdSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ContextIdSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ContextIdSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ContextIdSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ContextIdSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ContextIdSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ContextIdSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ContextIdSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ContextIdSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ContextIdSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ContextIdSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ContextIdSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ContextIdSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ContextIdSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_ExceptionDefSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::ExceptionDefSeq &_tao_elem
) // copying
{
- CORBA_ExceptionDefSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_ExceptionDefSeq (_tao_elem));
+ CORBA::ExceptionDefSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::ExceptionDefSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ExceptionDefSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ExceptionDefSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -16685,68 +19235,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ExceptionDefSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ExceptionDefSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ExceptionDefSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ExceptionDefSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ExceptionDefSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDefSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ExceptionDefSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ExceptionDefSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ExceptionDefSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::ExceptionDefSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ExceptionDefSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ExceptionDefSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ExceptionDefSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ExceptionDefSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ExceptionDefSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ExceptionDefSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ExceptionDefSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ExceptionDefSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ExceptionDefSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ExceptionDefSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ExceptionDefSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ExceptionDefSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ExceptionDefSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ExceptionDefSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_ExcDescriptionSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::ExcDescriptionSeq &_tao_elem
) // copying
{
- CORBA_ExcDescriptionSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_ExcDescriptionSeq (_tao_elem));
+ CORBA::ExcDescriptionSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::ExcDescriptionSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ExcDescriptionSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ExcDescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -16755,68 +19396,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ExcDescriptionSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ExcDescriptionSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ExcDescriptionSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ExcDescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ExcDescriptionSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExcDescriptionSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ExcDescriptionSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ExcDescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ExcDescriptionSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::ExcDescriptionSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ExcDescriptionSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ExcDescriptionSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ExcDescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ExcDescriptionSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ExcDescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_OperationDef_ptr (*_TAO_collocation_CORBA_OperationDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_OperationDef_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ExcDescriptionSeq *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_OperationDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_OperationDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ExcDescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ExcDescriptionSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ExcDescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ExcDescriptionSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ExcDescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ExcDescriptionSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ExcDescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ExcDescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::OperationDef_ptr (*_TAO_collocation_CORBA_OperationDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::OperationDef_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::OperationDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_OperationDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -16825,56 +19557,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_OperationDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_OperationDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_OperationDef::_nil ();
+ _tao_elem = CORBA::OperationDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_OperationDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_OperationDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_OperationDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_OperationDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::OperationDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_OperationDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_OperationDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::OperationDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::OperationDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_OperationDef,CORBA_OperationDef_var>;
-template class TAO_Object_Manager<CORBA_OperationDef,CORBA_OperationDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::OperationDef,CORBA::OperationDef_var>;
+ template class TAO_Object_Manager<CORBA::OperationDef,CORBA::OperationDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_OperationDef,CORBA_OperationDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_OperationDef,CORBA_OperationDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::OperationDef,CORBA::OperationDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::OperationDef,CORBA::OperationDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_OperationDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::OperationDescription &_tao_elem) // copying
{
- CORBA_OperationDescription *_any_val;
- ACE_NEW (_any_val, CORBA_OperationDescription (_tao_elem));
+ CORBA::OperationDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::OperationDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_OperationDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_OperationDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -16884,68 +19641,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_OperationDescription &_tao_el
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_OperationDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::OperationDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_OperationDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_OperationDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_OperationDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_OperationDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_OperationDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_OperationDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::OperationDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_OperationDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_OperationDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::OperationDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_OperationDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_OperationDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::OperationDescription *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_OperationDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::OperationDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::OperationDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::OperationDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_OperationDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::OperationDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::OperationDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::OperationDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_RepositoryIdSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::RepositoryIdSeq &_tao_elem
) // copying
{
- CORBA_RepositoryIdSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_RepositoryIdSeq (_tao_elem));
+ CORBA::RepositoryIdSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::RepositoryIdSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_RepositoryIdSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_RepositoryIdSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -16954,68 +19802,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_RepositoryIdSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::RepositoryIdSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_RepositoryIdSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_RepositoryIdSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_RepositoryIdSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::RepositoryIdSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_RepositoryIdSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_RepositoryIdSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_RepositoryIdSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::RepositoryIdSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_RepositoryIdSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_RepositoryIdSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::RepositoryIdSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_RepositoryIdSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_RepositoryIdSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::RepositoryIdSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_RepositoryIdSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::RepositoryIdSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::RepositoryIdSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::RepositoryIdSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_RepositoryIdSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::RepositoryIdSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::RepositoryIdSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::RepositoryIdSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_OpDescriptionSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::OpDescriptionSeq &_tao_elem
) // copying
{
- CORBA_OpDescriptionSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_OpDescriptionSeq (_tao_elem));
+ CORBA::OpDescriptionSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::OpDescriptionSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_OpDescriptionSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_OpDescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -17024,68 +19963,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_OpDescriptionSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::OpDescriptionSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_OpDescriptionSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_OpDescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_OpDescriptionSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OpDescriptionSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_OpDescriptionSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_OpDescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_OpDescriptionSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::OpDescriptionSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_OpDescriptionSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_OpDescriptionSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::OpDescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_OpDescriptionSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_OpDescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::OpDescriptionSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_OpDescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::OpDescriptionSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::OpDescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::OpDescriptionSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_OpDescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::OpDescriptionSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::OpDescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::OpDescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_AttrDescriptionSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::AttrDescriptionSeq &_tao_elem
) // copying
{
- CORBA_AttrDescriptionSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_AttrDescriptionSeq (_tao_elem));
+ CORBA::AttrDescriptionSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::AttrDescriptionSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_AttrDescriptionSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_AttrDescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -17094,68 +20124,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_AttrDescriptionSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::AttrDescriptionSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_AttrDescriptionSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_AttrDescriptionSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_AttrDescriptionSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttrDescriptionSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_AttrDescriptionSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_AttrDescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_AttrDescriptionSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::AttrDescriptionSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_AttrDescriptionSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_AttrDescriptionSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::AttrDescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_AttrDescriptionSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_AttrDescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_InterfaceDef_ptr (*_TAO_collocation_CORBA_InterfaceDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_InterfaceDef_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::AttrDescriptionSeq *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_InterfaceDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_InterfaceDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_AttrDescriptionSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::AttrDescriptionSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::AttrDescriptionSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::AttrDescriptionSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_AttrDescriptionSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::AttrDescriptionSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::AttrDescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::AttrDescriptionSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::InterfaceDef_ptr (*_TAO_collocation_CORBA_InterfaceDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDef_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::InterfaceDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_InterfaceDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -17164,56 +20285,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_InterfaceDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_InterfaceDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_InterfaceDef::_nil ();
+ _tao_elem = CORBA::InterfaceDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_InterfaceDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_InterfaceDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_InterfaceDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_InterfaceDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::InterfaceDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_InterfaceDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InterfaceDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::InterfaceDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::InterfaceDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_InterfaceDef,CORBA_InterfaceDef_var>;
-template class TAO_Object_Manager<CORBA_InterfaceDef,CORBA_InterfaceDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::InterfaceDef,CORBA::InterfaceDef_var>;
+ template class TAO_Object_Manager<CORBA::InterfaceDef,CORBA::InterfaceDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_InterfaceDef,CORBA_InterfaceDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_InterfaceDef,CORBA_InterfaceDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::InterfaceDef,CORBA::InterfaceDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::InterfaceDef,CORBA::InterfaceDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_InterfaceDef::FullInterfaceDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::InterfaceDef::FullInterfaceDescription &_tao_elem) // copying
{
- CORBA_InterfaceDef::FullInterfaceDescription *_any_val;
- ACE_NEW (_any_val, CORBA_InterfaceDef::FullInterfaceDescription (_tao_elem));
+ CORBA::InterfaceDef::FullInterfaceDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::InterfaceDef::FullInterfaceDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_InterfaceDef::_tc_FullInterfaceDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::InterfaceDef::_tc_FullInterfaceDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -17223,64 +20369,149 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_InterfaceDef::FullInterfaceDe
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_InterfaceDef::FullInterfaceDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDef::FullInterfaceDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_InterfaceDef::_tc_FullInterfaceDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::InterfaceDef::_tc_FullInterfaceDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_InterfaceDef::FullInterfaceDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef::FullInterfaceDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA_InterfaceDef::_tc_FullInterfaceDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::InterfaceDef::_tc_FullInterfaceDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_InterfaceDef::FullInterfaceDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::InterfaceDef::FullInterfaceDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_InterfaceDef::FullInterfaceDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA_InterfaceDef::_tc_FullInterfaceDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::InterfaceDef::FullInterfaceDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA_InterfaceDef::_tc_FullInterfaceDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::InterfaceDef::_tc_FullInterfaceDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::InterfaceDef::FullInterfaceDescription *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::InterfaceDef::_tc_FullInterfaceDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::InterfaceDef::FullInterfaceDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::InterfaceDef::FullInterfaceDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::InterfaceDef::FullInterfaceDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::InterfaceDef::_tc_FullInterfaceDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::InterfaceDef::FullInterfaceDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::InterfaceDef::FullInterfaceDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::InterfaceDef::FullInterfaceDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, const CORBA_InterfaceDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::InterfaceDescription &_tao_elem) // copying
{
- CORBA_InterfaceDescription *_any_val;
- ACE_NEW (_any_val, CORBA_InterfaceDescription (_tao_elem));
+ CORBA::InterfaceDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::InterfaceDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_InterfaceDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_InterfaceDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -17290,64 +20521,149 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_InterfaceDescription &_tao_el
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_InterfaceDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_InterfaceDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_InterfaceDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_InterfaceDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_InterfaceDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_InterfaceDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_InterfaceDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::InterfaceDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_InterfaceDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_InterfaceDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::InterfaceDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_InterfaceDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InterfaceDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, const CORBA_ValueMember &_tao_elem) // copying
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::InterfaceDescription *&_tao_elem)
{
- CORBA_ValueMember *_any_val;
- ACE_NEW (_any_val, CORBA_ValueMember (_tao_elem));
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_InterfaceDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::InterfaceDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::InterfaceDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::InterfaceDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InterfaceDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::InterfaceDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::InterfaceDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::InterfaceDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+void operator<<= (CORBA::Any &_tao_any, const CORBA::ValueMember &_tao_elem) // copying
+{
+ CORBA::ValueMember *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::ValueMember (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ValueMember, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueMember,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -17357,68 +20673,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_ValueMember &_tao_elem) // co
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ValueMember *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ValueMember *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ValueMember, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueMember,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ValueMember *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMember *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ValueMember, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ValueMember, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ValueMember *)_tao_any.value ();
+ _tao_elem = (CORBA::ValueMember *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ValueMember, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ValueMember, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueMember, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ValueMember, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueMember,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ValueMember *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ValueMember, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ValueMember *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueMember, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ValueMember *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueMember,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ValueMember *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ValueMember *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ValueMember *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
void operator<<= (
- CORBA_Any &_tao_any,
- const CORBA_ValueMemberSeq &_tao_elem
+ CORBA::Any &_tao_any,
+ const CORBA::ValueMemberSeq &_tao_elem
) // copying
{
- CORBA_ValueMemberSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_ValueMemberSeq (_tao_elem));
+ CORBA::ValueMemberSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::ValueMemberSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ValueMemberSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueMemberSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -17427,68 +20834,159 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ValueMemberSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ValueMemberSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ValueMemberSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueMemberSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ValueMemberSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMemberSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ValueMemberSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ValueMemberSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ValueMemberSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::ValueMemberSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ValueMemberSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ValueMemberSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueMemberSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ValueMemberSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueMemberSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_ValueMemberDef_ptr (*_TAO_collocation_CORBA_ValueMemberDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_ValueMemberDef_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ValueMemberSeq *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_ValueMemberDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_ValueMemberDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ValueMemberSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ValueMemberSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueMemberSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ValueMemberSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueMemberSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ValueMemberSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ValueMemberSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ValueMemberSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::ValueMemberDef_ptr (*_TAO_collocation_CORBA_ValueMemberDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::ValueMemberDef_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::ValueMemberDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueMemberDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -17497,60 +20995,91 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_ValueMemberDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ValueMemberDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMemberDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_ValueMemberDef::_nil ();
+ _tao_elem = CORBA::ValueMemberDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ValueMemberDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ValueMemberDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_ValueMemberDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_ValueMemberDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::ValueMemberDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ValueMemberDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueMemberDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::ValueMemberDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::ValueMemberDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_ValueMemberDef,CORBA_ValueMemberDef_var>;
-template class TAO_Object_Manager<CORBA_ValueMemberDef,CORBA_ValueMemberDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::ValueMemberDef,CORBA::ValueMemberDef_var>;
+ template class TAO_Object_Manager<CORBA::ValueMemberDef,CORBA::ValueMemberDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_ValueMemberDef,CORBA_ValueMemberDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_ValueMemberDef,CORBA_ValueMemberDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::ValueMemberDef,CORBA::ValueMemberDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::ValueMemberDef,CORBA::ValueMemberDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-CORBA_ValueDef_ptr (*_TAO_collocation_CORBA_ValueDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
+CORBA::ValueDef_ptr (*_TAO_collocation_CORBA_ValueDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_ValueDef_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDef_ptr _tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_ValueDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_ValueDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::ValueDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -17559,56 +21088,81 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_ValueDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ValueDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_ValueDef::_nil ();
+ _tao_elem = CORBA::ValueDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ValueDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ValueDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_ValueDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_ValueDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::ValueDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ValueDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::ValueDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::ValueDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_ValueDef,CORBA_ValueDef_var>;
-template class TAO_Object_Manager<CORBA_ValueDef,CORBA_ValueDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::ValueDef,CORBA::ValueDef_var>;
+ template class TAO_Object_Manager<CORBA::ValueDef,CORBA::ValueDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_ValueDef,CORBA_ValueDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_ValueDef,CORBA_ValueDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::ValueDef,CORBA::ValueDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::ValueDef,CORBA::ValueDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA_Any &_tao_any, const CORBA_ValueDef::FullValueDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::ValueDef::FullValueDescription &_tao_elem) // copying
{
- CORBA_ValueDef::FullValueDescription *_any_val;
- ACE_NEW (_any_val, CORBA_ValueDef::FullValueDescription (_tao_elem));
+ CORBA::ValueDef::FullValueDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::ValueDef::FullValueDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_ValueDef::_tc_FullValueDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::ValueDef::_tc_FullValueDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -17618,64 +21172,149 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_ValueDef::FullValueDescriptio
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ValueDef::FullValueDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDef::FullValueDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_ValueDef::_tc_FullValueDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::ValueDef::_tc_FullValueDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ValueDef::FullValueDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef::FullValueDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA_ValueDef::_tc_FullValueDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::ValueDef::_tc_FullValueDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ValueDef::FullValueDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::ValueDef::FullValueDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ValueDef::FullValueDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA_ValueDef::_tc_FullValueDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueDef::FullValueDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA_ValueDef::_tc_FullValueDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::ValueDef::_tc_FullValueDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ValueDef::FullValueDescription *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::ValueDef::_tc_FullValueDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ValueDef::FullValueDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueDef::FullValueDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ValueDef::FullValueDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::ValueDef::_tc_FullValueDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ValueDef::FullValueDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ValueDef::FullValueDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ValueDef::FullValueDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA_Any &_tao_any, const CORBA_ValueDescription &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::ValueDescription &_tao_elem) // copying
{
- CORBA_ValueDescription *_any_val;
- ACE_NEW (_any_val, CORBA_ValueDescription (_tao_elem));
+ CORBA::ValueDescription *_any_val = 0;
+ ACE_NEW (_any_val, CORBA::ValueDescription (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ValueDescription, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -17685,68 +21324,159 @@ void operator<<= (CORBA_Any &_tao_any, const CORBA_ValueDescription &_tao_elem)
ACE_ENDTRY;
}
-void operator<<= (CORBA_Any &_tao_any, CORBA_ValueDescription *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDescription *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_ValueDescription, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueDescription,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ValueDescription *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDescription *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ValueDescription, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ValueDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_ValueDescription *)_tao_any.value ();
+ _tao_elem = (CORBA::ValueDescription *)_tao_any.value ();
return 1;
- }
+ }
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_ValueDescription, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_ValueDescription, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ValueDescription, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueDescription,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-CORBA_ValueBoxDef_ptr (*_TAO_collocation_CORBA_ValueBoxDef_Stub_Factory_function_pointer) (
- CORBA_Object_ptr obj
- ) = 0;
-void operator<<= (CORBA_Any &_tao_any, CORBA_ValueBoxDef_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ValueDescription *&_tao_elem)
{
- CORBA_Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
- ACE_NEW (_tao_obj_ptr, CORBA_Object_ptr);
- *_tao_obj_ptr = CORBA_ValueBoxDef::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_ValueBoxDef, _tao_obj_ptr, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_ValueDescription, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::ValueDescription *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::ValueDescription, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::ValueDescription *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueDescription,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::ValueDescription *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::ValueDescription *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::ValueDescription *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::ValueBoxDef_ptr (*_TAO_collocation_CORBA_ValueBoxDef_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::ValueBoxDef_ptr _tao_elem)
+{
+ CORBA::Object_ptr *_tao_obj_ptr = 0;
+ ACE_TRY_NEW_ENV
+ {
+ ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
+ *_tao_obj_ptr = CORBA::ValueBoxDef::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_ValueBoxDef,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -17755,50 +21485,64 @@ void operator<<= (CORBA_Any &_tao_any, CORBA_ValueBoxDef_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA_Any &_tao_any, CORBA_ValueBoxDef_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueBoxDef_ptr &_tao_elem)
{
- CORBA_Object_ptr *tmp = 0;
+ CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_ValueBoxDef::_nil ();
+ _tao_elem = CORBA::ValueBoxDef::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_ValueBoxDef, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_ValueBoxDef, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- CORBA_Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA_Object_ptr, 0);
- if (stream.decode (CORBA::_tc_ValueBoxDef, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
- {
- _tao_elem = CORBA_ValueBoxDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ CORBA::Object_var _tao_obj_var;
+ if (stream >> _tao_obj_var.out ())
+ {
+ _tao_elem = CORBA::ValueBoxDef::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
- *tmp = (CORBA_Object_ptr) _tao_elem; // any owns the object
- ((CORBA_Any *)&_tao_any)->replace (CORBA::_tc_ValueBoxDef, tmp, 1, ACE_TRY_ENV);
+ *tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_ValueBoxDef,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::ValueBoxDef::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::ValueBoxDef::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_ValueBoxDef,CORBA_ValueBoxDef_var>;
-template class TAO_Object_Manager<CORBA_ValueBoxDef,CORBA_ValueBoxDef_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::ValueBoxDef,CORBA::ValueBoxDef_var>;
+ template class TAO_Object_Manager<CORBA::ValueBoxDef,CORBA::ValueBoxDef_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_ValueBoxDef,CORBA_ValueBoxDef_var>
-# pragma instantiate TAO_Object_Manager<CORBA_ValueBoxDef,CORBA_ValueBoxDef_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::ValueBoxDef,CORBA::ValueBoxDef_var>
+# pragma instantiate TAO_Object_Manager<CORBA::ValueBoxDef,CORBA::ValueBoxDef_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-
CORBA::Boolean operator<< (
TAO_OutputCDR &strm,
const CORBA_InterfaceDefSeq &_tao_sequence
diff --git a/TAO/tao/InterfaceC.h b/TAO/tao/InterfaceC.h
index e50eb1aa1f5..55a6523eb8b 100644
--- a/TAO/tao/InterfaceC.h
+++ b/TAO/tao/InterfaceC.h
@@ -7993,253 +7993,473 @@ extern TAO_Export CORBA::Contained_ptr (*_TAO_collocation_CORBA_Contained_Stub_F
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::Contained
-TAO_Export void operator<<= (CORBA::Any &, CORBA::Contained_ptr);
-CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Contained *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::Contained::Description &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::Contained::Description*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Contained::Description *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::InterfaceDefSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::InterfaceDefSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InterfaceDefSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueDefSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueDefSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueDefSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ContainedSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ContainedSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ContainedSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::StructMember &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::StructMember*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::StructMember *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::StructMemberSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::StructMemberSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::StructMemberSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::Initializer &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::Initializer*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Initializer *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::InitializerSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::InitializerSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InitializerSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::UnionMember &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::UnionMember*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::UnionMember *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::UnionMemberSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::UnionMemberSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::UnionMemberSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::EnumMemberSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::EnumMemberSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::EnumMemberSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::Contained_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::Contained *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::Contained::Description &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::Contained::Description*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::Contained::Description *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::Contained::Description *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::InterfaceDefSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::InterfaceDefSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::InterfaceDefSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::InterfaceDefSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ValueDefSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ValueDefSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ValueDefSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ValueDefSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ContainedSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ContainedSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ContainedSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ContainedSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::StructMember &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::StructMember*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::StructMember *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::StructMember *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::StructMemberSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::StructMemberSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::StructMemberSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::StructMemberSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::Initializer &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::Initializer*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::Initializer *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::Initializer *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::InitializerSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::InitializerSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::InitializerSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::InitializerSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::UnionMember &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::UnionMember*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::UnionMember *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::UnionMember *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::UnionMemberSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::UnionMemberSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::UnionMemberSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::UnionMemberSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::EnumMemberSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::EnumMemberSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::EnumMemberSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::EnumMemberSeq *&);
extern TAO_Export CORBA::Container_ptr (*_TAO_collocation_CORBA_Container_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::Container
-TAO_Export void operator<<= (CORBA::Any &, CORBA::Container_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Container *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::Container::Description &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::Container::Description*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Container::Description *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::Container::DescriptionSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::Container::DescriptionSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Container::DescriptionSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::Container_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::Container *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::Container::Description &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::Container::Description*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::Container::Description *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::Container::Description *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::Container::DescriptionSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::Container::DescriptionSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::Container::DescriptionSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::Container::DescriptionSeq *&);
extern TAO_Export CORBA::IDLType_ptr (*_TAO_collocation_CORBA_IDLType_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::IDLType
-TAO_Export void operator<<= (CORBA::Any &, CORBA::IDLType_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::IDLType *&);
-TAO_Export void operator<<= (CORBA::Any &, CORBA::PrimitiveKind);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::PrimitiveKind &);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::IDLType_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::IDLType *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::PrimitiveKind);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::PrimitiveKind &);
extern TAO_Export CORBA::Repository_ptr (*_TAO_collocation_CORBA_Repository_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::Repository
-TAO_Export void operator<<= (CORBA::Any &, CORBA::Repository_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Repository *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::Repository_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::Repository *&);
extern TAO_Export CORBA::ModuleDef_ptr (*_TAO_collocation_CORBA_ModuleDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::ModuleDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ModuleDef_ptr);
-CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ModuleDef *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ModuleDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ModuleDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ModuleDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ModuleDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ModuleDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ModuleDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ModuleDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ModuleDescription *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ModuleDescription *&);
extern TAO_Export CORBA::ConstantDef_ptr (*_TAO_collocation_CORBA_ConstantDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::ConstantDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ConstantDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ConstantDef *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ConstantDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ConstantDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ConstantDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ConstantDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ConstantDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ConstantDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ConstantDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ConstantDescription *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ConstantDescription *&);
extern TAO_Export CORBA::TypedefDef_ptr (*_TAO_collocation_CORBA_TypedefDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::TypedefDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::TypedefDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::TypedefDef *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::TypeDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::TypeDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::TypeDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::TypedefDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::TypedefDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::TypeDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::TypeDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::TypeDescription *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::TypeDescription *&);
extern TAO_Export CORBA::StructDef_ptr (*_TAO_collocation_CORBA_StructDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::StructDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::StructDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::StructDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::StructDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::StructDef *&);
extern TAO_Export CORBA::UnionDef_ptr (*_TAO_collocation_CORBA_UnionDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::UnionDef
TAO_Export void operator<<= (CORBA::Any &, CORBA::UnionDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::UnionDef *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::UnionDef *&);
extern TAO_Export CORBA::EnumDef_ptr (*_TAO_collocation_CORBA_EnumDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::EnumDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::EnumDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::EnumDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::EnumDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::EnumDef *&);
extern TAO_Export CORBA::AliasDef_ptr (*_TAO_collocation_CORBA_AliasDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::AliasDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::AliasDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::AliasDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::AliasDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::AliasDef *&);
extern TAO_Export CORBA::PrimitiveDef_ptr (*_TAO_collocation_CORBA_PrimitiveDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::PrimitiveDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::PrimitiveDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::PrimitiveDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::PrimitiveDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::PrimitiveDef *&);
extern TAO_Export CORBA::StringDef_ptr (*_TAO_collocation_CORBA_StringDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::StringDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::StringDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::StringDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::StringDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::StringDef *&);
extern TAO_Export CORBA::WstringDef_ptr (*_TAO_collocation_CORBA_WstringDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::WstringDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::WstringDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::WstringDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::WstringDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::WstringDef *&);
extern TAO_Export CORBA::FixedDef_ptr (*_TAO_collocation_CORBA_FixedDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::FixedDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::FixedDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::FixedDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::FixedDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::FixedDef *&);
extern TAO_Export CORBA::SequenceDef_ptr (*_TAO_collocation_CORBA_SequenceDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::SequenceDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::SequenceDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::SequenceDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::SequenceDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::SequenceDef *&);
extern TAO_Export CORBA::ArrayDef_ptr (*_TAO_collocation_CORBA_ArrayDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::ArrayDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ArrayDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ArrayDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ArrayDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ArrayDef *&);
extern TAO_Export CORBA::ExceptionDef_ptr (*_TAO_collocation_CORBA_ExceptionDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::ExceptionDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ExceptionDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ExceptionDef *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ExceptionDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ExceptionDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ExceptionDescription *&);
-TAO_Export void operator<<= (CORBA::Any &, CORBA::AttributeMode);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::AttributeMode &);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ExceptionDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ExceptionDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ExceptionDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ExceptionDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ExceptionDescription *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ExceptionDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::AttributeMode);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::AttributeMode &);
extern TAO_Export CORBA::AttributeDef_ptr (*_TAO_collocation_CORBA_AttributeDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::AttributeDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::AttributeDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::AttributeDef *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::AttributeDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::AttributeDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::AttributeDescription *&);
-TAO_Export void operator<<= (CORBA::Any &, CORBA::OperationMode);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OperationMode &);
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ParameterMode);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ParameterMode &);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ParameterDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ParameterDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ParameterDescription *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ParDescriptionSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ParDescriptionSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ParDescriptionSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ContextIdSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ContextIdSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ContextIdSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ExceptionDefSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ExceptionDefSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ExceptionDefSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ExcDescriptionSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ExcDescriptionSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ExcDescriptionSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::AttributeDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::AttributeDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::AttributeDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::AttributeDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::AttributeDescription *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::AttributeDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::OperationMode);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::OperationMode &);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ParameterMode);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ParameterMode &);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ParameterDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ParameterDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ParameterDescription *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ParameterDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ParDescriptionSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ParDescriptionSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ParDescriptionSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ParDescriptionSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ContextIdSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ContextIdSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ContextIdSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ContextIdSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ExceptionDefSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ExceptionDefSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ExceptionDefSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ExceptionDefSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ExcDescriptionSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ExcDescriptionSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ExcDescriptionSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ExcDescriptionSeq *&);
extern TAO_Export CORBA::OperationDef_ptr (*_TAO_collocation_CORBA_OperationDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::OperationDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::OperationDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OperationDef *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::OperationDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::OperationDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OperationDescription *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::RepositoryIdSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::RepositoryIdSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::RepositoryIdSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::OpDescriptionSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::OpDescriptionSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OpDescriptionSeq *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::AttrDescriptionSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::AttrDescriptionSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::AttrDescriptionSeq *&);
-extern TAO_Export CORBA::InterfaceDef_ptr (*_TAO_collocation_CORBA_InterfaceDef_Stub_Factory_function_pointer) (
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::OperationDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::OperationDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::OperationDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::OperationDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::OperationDescription *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::OperationDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::RepositoryIdSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::RepositoryIdSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::RepositoryIdSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::RepositoryIdSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::OpDescriptionSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::OpDescriptionSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::OpDescriptionSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::OpDescriptionSeq *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::AttrDescriptionSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::AttrDescriptionSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::AttrDescriptionSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::AttrDescriptionSeq *&);
+extern CORBA::InterfaceDef_ptr (*_TAO_collocation_CORBA_InterfaceDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::InterfaceDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::InterfaceDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InterfaceDef *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::InterfaceDef::FullInterfaceDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::InterfaceDef::FullInterfaceDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InterfaceDef::FullInterfaceDescription *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::InterfaceDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::InterfaceDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InterfaceDescription *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueMember &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueMember*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueMember *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueMemberSeq &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueMemberSeq*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueMemberSeq *&);
-extern TAO_Export CORBA::ValueMemberDef_ptr (*_TAO_collocation_CORBA_ValueMemberDef_Stub_Factory_function_pointer) (
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::InterfaceDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::InterfaceDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::InterfaceDef::FullInterfaceDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::InterfaceDef::FullInterfaceDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::InterfaceDef::FullInterfaceDescription *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::InterfaceDef::FullInterfaceDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::InterfaceDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::InterfaceDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::InterfaceDescription *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::InterfaceDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ValueMember &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ValueMember*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ValueMember *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ValueMember *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ValueMemberSeq &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ValueMemberSeq*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ValueMemberSeq *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ValueMemberSeq *&);
+extern CORBA::ValueMemberDef_ptr (*_TAO_collocation_CORBA_ValueMemberDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::ValueMemberDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueMemberDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueMemberDef *&);
-extern TAO_Export CORBA::ValueDef_ptr (*_TAO_collocation_CORBA_ValueDef_Stub_Factory_function_pointer) (
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ValueMemberDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ValueMemberDef *&);
+extern CORBA::ValueDef_ptr (*_TAO_collocation_CORBA_ValueDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::ValueDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueDef *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueDef::FullValueDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueDef::FullValueDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueDef::FullValueDescription *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueDescription &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueDescription*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueDescription *&);
-extern TAO_Export CORBA::ValueBoxDef_ptr (*_TAO_collocation_CORBA_ValueBoxDef_Stub_Factory_function_pointer) (
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ValueDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ValueDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ValueDef::FullValueDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ValueDef::FullValueDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ValueDef::FullValueDescription *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ValueDef::FullValueDescription *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA::ValueDescription &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ValueDescription*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ValueDescription *&); // deprecated
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::ValueDescription *&);
+extern CORBA::ValueBoxDef_ptr (*_TAO_collocation_CORBA_ValueBoxDef_Stub_Factory_function_pointer) (
CORBA::Object_ptr obj
);
// Any operators for interface CORBA::ValueBoxDef
-TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueBoxDef_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueBoxDef *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::ValueBoxDef_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::ValueBoxDef *&);
#ifndef __ACE_INLINE__
diff --git a/TAO/tao/PolicyC.cpp b/TAO/tao/PolicyC.cpp
index 2bb5737aa3e..6b5e328854e 100644
--- a/TAO/tao/PolicyC.cpp
+++ b/TAO/tao/PolicyC.cpp
@@ -608,151 +608,337 @@ const char* CORBA_PolicyCurrent::_interface_repository_id (void) const
// ****************************************************************
-void operator<<= (CORBA::Any &_tao_any, const CORBA_PolicyError &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::PolicyError &_tao_elem) // copying
{
- CORBA_PolicyError *_tao_any_val = 0;
- ACE_NEW (_tao_any_val,
- CORBA_PolicyError (_tao_elem));
+ CORBA::PolicyError *_tao_any_val = 0;
+ ACE_NEW (_tao_any_val, CORBA::PolicyError (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_PolicyError, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_PolicyError,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
ACE_ENDTRY;
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_PolicyError *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyError *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_PolicyError, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_PolicyError,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PolicyError *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyError *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_PolicyError, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_PolicyError, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_PolicyError *)_tao_any.value ();
+ _tao_elem = (CORBA::PolicyError *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_PolicyError, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_PolicyError, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::PolicyError, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_PolicyError, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_PolicyError,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA::Any &_tao_any, const CORBA_InvalidPolicies &_tao_elem) // copying
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyError *&_tao_elem)
{
- CORBA_InvalidPolicies *_tao_any_val = 0;
- ACE_NEW (_tao_any_val,
- CORBA_InvalidPolicies (_tao_elem));
- if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_InvalidPolicies, _tao_any_val, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_PolicyError, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::PolicyError *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::PolicyError, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::PolicyError *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_PolicyError,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::PolicyError *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::PolicyError *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
}
ACE_CATCHANY
{
+ delete ACE_const_cast (CORBA::PolicyError *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+void operator<<= (CORBA::Any &_tao_any, const CORBA::InvalidPolicies &_tao_elem) // copying
+{
+ CORBA::InvalidPolicies *_tao_any_val = 0;
+ ACE_NEW (_tao_any_val, CORBA::InvalidPolicies (_tao_elem));
+ if (!_tao_any_val) return;
+ ACE_TRY_NEW_ENV
+ {
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_InvalidPolicies,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
delete _tao_any_val;
}
ACE_ENDTRY;
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_InvalidPolicies *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::InvalidPolicies *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_InvalidPolicies, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_InvalidPolicies,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_InvalidPolicies *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InvalidPolicies *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_InvalidPolicies, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_InvalidPolicies, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_InvalidPolicies *)_tao_any.value ();
+ _tao_elem = (CORBA::InvalidPolicies *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_InvalidPolicies, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_InvalidPolicies, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::InvalidPolicies, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_InvalidPolicies, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InvalidPolicies,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_Policy_ptr _tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::InvalidPolicies *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_InvalidPolicies, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::InvalidPolicies *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::InvalidPolicies, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::InvalidPolicies *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_InvalidPolicies,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::InvalidPolicies *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::InvalidPolicies *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::InvalidPolicies *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Policy_ptr (*_TAO_collocation_CORBA_Policy_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::Policy_ptr _tao_elem)
{
CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
- *_tao_obj_ptr = CORBA_Policy::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_Policy, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ *_tao_obj_ptr = CORBA::Policy::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_Policy,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -761,37 +947,52 @@ void operator<<= (CORBA::Any &_tao_any, CORBA_Policy_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_Policy_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Policy_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_Policy::_nil ();
+ _tao_elem = CORBA::Policy::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_Policy, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_Policy, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (CORBA::_tc_Policy, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
- _tao_elem = CORBA_Policy::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ _tao_elem = CORBA::Policy::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_Policy, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_Policy,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::Policy::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::Policy::_nil ();
return 0;
}
@@ -799,16 +1000,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_Policy_ptr &_tao_e
void operator<<= (
CORBA::Any &_tao_any,
- const CORBA_PolicyList &_tao_elem
+ const CORBA::PolicyList &_tao_elem
) // copying
{
- CORBA_PolicyList *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_PolicyList (_tao_elem));
+ CORBA::PolicyList *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::PolicyList (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_PolicyList, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_PolicyList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -817,51 +1033,127 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_PolicyList *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyList *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_PolicyList, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_PolicyList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PolicyList *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyList *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_PolicyList, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_PolicyList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_PolicyList *)_tao_any.value ();
+ _tao_elem = (CORBA::PolicyList *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_PolicyList, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_PolicyList, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::PolicyList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_PolicyList, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_PolicyList,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyList *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_PolicyList, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::PolicyList *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::PolicyList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::PolicyList *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_PolicyList,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::PolicyList *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::PolicyList *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::PolicyList *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -869,16 +1161,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PolicyList *&_tao_
void operator<<= (
CORBA::Any &_tao_any,
- const CORBA_PolicyTypeSeq &_tao_elem
+ const CORBA::PolicyTypeSeq &_tao_elem
) // copying
{
- CORBA_PolicyTypeSeq *_tao_any_val;
- ACE_NEW (_tao_any_val, CORBA_PolicyTypeSeq (_tao_elem));
+ CORBA::PolicyTypeSeq *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::PolicyTypeSeq (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_PolicyTypeSeq, _tao_any_val, 1, ACE_TRY_ENV); // copy the value
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_any_val)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_PolicyTypeSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_any_val;
+ }
}
ACE_CATCHANY
{
@@ -887,51 +1194,127 @@ void operator<<= (
ACE_ENDTRY;
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_PolicyTypeSeq *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyTypeSeq *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_PolicyTypeSeq, _tao_elem, 0, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::_tc_PolicyTypeSeq,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PolicyTypeSeq *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyTypeSeq *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_PolicyTypeSeq, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_PolicyTypeSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_PolicyTypeSeq *)_tao_any.value ();
+ _tao_elem = (CORBA::PolicyTypeSeq *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_PolicyTypeSeq, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_PolicyTypeSeq, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::PolicyTypeSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_PolicyTypeSeq, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_PolicyTypeSeq,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyTypeSeq *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::_tc_PolicyTypeSeq, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::PolicyTypeSeq *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::PolicyTypeSeq, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::PolicyTypeSeq *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_PolicyTypeSeq,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::PolicyTypeSeq *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::PolicyTypeSeq *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::PolicyTypeSeq *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
@@ -939,18 +1322,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PolicyTypeSeq *&_t
void operator<<= (CORBA::Any &_tao_any, CORBA::SetOverrideType _tao_elem)
{
- CORBA::SetOverrideType *_any_val;
- ACE_NEW (_any_val, CORBA::SetOverrideType (_tao_elem));
- if (!_any_val) return;
+ CORBA::SetOverrideType *_tao_any_val;
+ ACE_NEW (_tao_any_val, CORBA::SetOverrideType (_tao_elem));
+ if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA::_tc_SetOverrideType, _any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::_tc_SetOverrideType,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
// free allocated storage
- delete _any_val;
+ delete _tao_any_val;
}
ACE_ENDTRY;
}
@@ -960,14 +1352,19 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::SetOverrideType &
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_SetOverrideType, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_SetOverrideType, ACE_TRY_ENV)) // not equal
+ {
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA::_tc_SetOverrideType, &_tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
+ {
return 1;
- ACE_TRY_CHECK;
+ }
}
ACE_CATCHANY
{
diff --git a/TAO/tao/PolicyC.h b/TAO/tao/PolicyC.h
index 11926d35503..b48bb21e95a 100644
--- a/TAO/tao/PolicyC.h
+++ b/TAO/tao/PolicyC.h
@@ -522,15 +522,20 @@ private:
TAO_Export void operator<<= (CORBA::Any &,
const CORBA::PolicyError &);
-TAO_Export void operator<<= (CORBA::Any &, CORBA::PolicyError*);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::PolicyError*);
TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
CORBA::PolicyError *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::PolicyError *&);
TAO_Export void operator<<= (CORBA::Any &,
const CORBA::InvalidPolicies &);
TAO_Export void operator<<= (CORBA::Any &,
CORBA::InvalidPolicies*);
TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
CORBA::InvalidPolicies *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::InvalidPolicies *&);
// Any operators for interface CORBA::Policy
TAO_Export void operator<<= (CORBA::Any &,
@@ -543,12 +548,16 @@ TAO_Export void operator<<= (CORBA::Any &,
CORBA::PolicyList*);
TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
CORBA::PolicyList *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::PolicyList *&);
TAO_Export void operator<<= (CORBA::Any &,
const CORBA::PolicyTypeSeq &);
TAO_Export void operator<<= (CORBA::Any &,
CORBA::PolicyTypeSeq*);
TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
CORBA::PolicyTypeSeq *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::PolicyTypeSeq *&);
TAO_Export void operator<<= (CORBA::Any &,
CORBA::SetOverrideType);
TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
diff --git a/TAO/tao/PollableC.cpp b/TAO/tao/PollableC.cpp
index d94e482ec6e..c7bc2e24b5a 100644
--- a/TAO/tao/PollableC.cpp
+++ b/TAO/tao/PollableC.cpp
@@ -889,15 +889,30 @@ const char* CORBA_PollableSet::_interface_repository_id (void) const
return "IDL:omg.org/CORBA/PollableSet:1.0";
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_Pollable_ptr _tao_elem)
+void operator<<= (CORBA::Any &_tao_any, CORBA::Pollable_ptr _tao_elem)
{
CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
- *_tao_obj_ptr = CORBA_Pollable::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_Pollable, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ *_tao_obj_ptr = CORBA::Pollable::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_Pollable,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -906,48 +921,67 @@ void operator<<= (CORBA::Any &_tao_any, CORBA_Pollable_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_Pollable_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Pollable_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_Pollable::_nil ();
+ _tao_elem = CORBA::Pollable::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_Pollable, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_Pollable, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (CORBA::_tc_Pollable, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
- _tao_elem = CORBA_Pollable::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ _tao_elem = CORBA::Pollable::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_Pollable, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_Pollable,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::Pollable::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::Pollable::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_Pollable,CORBA_Pollable_var>;
- template class TAO_Object_Manager<CORBA_Pollable,CORBA_Pollable_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::Pollable,CORBA::Pollable_var>;
+ template class TAO_Object_Manager<CORBA::Pollable,CORBA::Pollable_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_Pollable,CORBA_Pollable_var>
-# pragma instantiate TAO_Object_Manager<CORBA_Pollable,CORBA_Pollable_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::Pollable,CORBA::Pollable_var>
+# pragma instantiate TAO_Object_Manager<CORBA::Pollable,CORBA::Pollable_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+CORBA::DIIPollable_ptr (*_TAO_collocation_CORBA_DIIPollable_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
void operator<<= (CORBA::Any &_tao_any, CORBA::DIIPollable_ptr _tao_elem)
{
CORBA::Object_ptr *_tao_obj_ptr = 0;
@@ -955,8 +989,23 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::DIIPollable_ptr _tao_elem)
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = CORBA::DIIPollable::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_DIIPollable, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_DIIPollable,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -968,54 +1017,88 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::DIIPollable_ptr _tao_elem)
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DIIPollable_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = CORBA::DIIPollable::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_DIIPollable, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_DIIPollable, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (CORBA::_tc_DIIPollable, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = CORBA::DIIPollable::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_DIIPollable, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_DIIPollable,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::DIIPollable::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::DIIPollable::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA::DIIPollable,CORBA::DIIPollable_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::DIIPollable,CORBA::DIIPollable_var>;
template class TAO_Object_Manager<CORBA::DIIPollable,CORBA::DIIPollable_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
# pragma instantiate TAO_Object_Field_T<CORBA::DIIPollable,CORBA::DIIPollable_var>
# pragma instantiate TAO_Object_Manager<CORBA::DIIPollable,CORBA::DIIPollable_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA::Any &_tao_any, CORBA_PollableSet_ptr _tao_elem)
+CORBA::PollableSet_ptr (*_TAO_collocation_CORBA_PollableSet_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+void operator<<= (CORBA::Any &_tao_any, CORBA::PollableSet_ptr _tao_elem)
{
CORBA::Object_ptr *_tao_obj_ptr = 0;
ACE_TRY_NEW_ENV
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
- *_tao_obj_ptr = CORBA_PollableSet::_duplicate (_tao_elem);
- _tao_any.replace (CORBA::_tc_PollableSet, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ *_tao_obj_ptr = CORBA::PollableSet::_duplicate (_tao_elem);
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ CORBA::_tc_PollableSet,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -1024,179 +1107,363 @@ void operator<<= (CORBA::Any &_tao_any, CORBA_PollableSet_ptr _tao_elem)
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PollableSet_ptr &_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
- _tao_elem = CORBA_PollableSet::_nil ();
+ _tao_elem = CORBA::PollableSet::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA::_tc_PollableSet, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::_tc_PollableSet, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (CORBA::_tc_PollableSet, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
- _tao_elem = CORBA_PollableSet::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
+ _tao_elem = CORBA::PollableSet::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (CORBA::_tc_PollableSet, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::_tc_PollableSet,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = CORBA::PollableSet::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = CORBA::PollableSet::_nil ();
return 0;
}
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
- template class TAO_Object_Field_T<CORBA_PollableSet,CORBA_PollableSet_var>;
- template class TAO_Object_Manager<CORBA_PollableSet,CORBA_PollableSet_var>;
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Field_T<CORBA::PollableSet,CORBA::PollableSet_var>;
+ template class TAO_Object_Manager<CORBA::PollableSet,CORBA::PollableSet_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Field_T<CORBA_PollableSet,CORBA_PollableSet_var>
-# pragma instantiate TAO_Object_Manager<CORBA_PollableSet,CORBA_PollableSet_var>
+# pragma instantiate TAO_Object_Field_T<CORBA::PollableSet,CORBA::PollableSet_var>
+# pragma instantiate TAO_Object_Manager<CORBA::PollableSet,CORBA::PollableSet_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-void operator<<= (CORBA::Any &_tao_any, const CORBA_PollableSet::NoPossiblePollable &_tao_elem) // copying
+void operator<<= (CORBA::Any &_tao_any, const CORBA::PollableSet::NoPossiblePollable &_tao_elem) // copying
{
- CORBA_PollableSet::NoPossiblePollable *_tao_any_val = 0;
- ACE_NEW (_tao_any_val,
- CORBA_PollableSet::NoPossiblePollable (_tao_elem));
+ CORBA::PollableSet::NoPossiblePollable *_tao_any_val = 0;
+ ACE_NEW (_tao_any_val, CORBA::PollableSet::NoPossiblePollable (_tao_elem));
if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_PollableSet::_tc_NoPossiblePollable, _tao_any_val, 1, ACE_TRY_ENV);
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::PollableSet::_tc_NoPossiblePollable,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY
+ ACE_CATCHANY
{
delete _tao_any_val;
}
ACE_ENDTRY;
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_PollableSet::NoPossiblePollable *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::PollableSet::NoPossiblePollable *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_PollableSet::_tc_NoPossiblePollable, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::PollableSet::_tc_NoPossiblePollable,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PollableSet::NoPossiblePollable *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::NoPossiblePollable *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA_PollableSet::_tc_NoPossiblePollable, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::PollableSet::_tc_NoPossiblePollable, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_PollableSet::NoPossiblePollable *)_tao_any.value ();
+ _tao_elem = (CORBA::PollableSet::NoPossiblePollable *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_PollableSet::NoPossiblePollable, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA_PollableSet::_tc_NoPossiblePollable, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::PollableSet::NoPossiblePollable, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CORBA_PollableSet::_tc_NoPossiblePollable, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::PollableSet::_tc_NoPossiblePollable,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
-void operator<<= (CORBA::Any &_tao_any, const CORBA_PollableSet::UnknownPollable &_tao_elem) // copying
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PollableSet::NoPossiblePollable *&_tao_elem)
{
- CORBA_PollableSet::UnknownPollable *_tao_any_val = 0;
- ACE_NEW (_tao_any_val,
- CORBA_PollableSet::UnknownPollable (_tao_elem));
- if (!_tao_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_PollableSet::_tc_UnknownPollable, _tao_any_val, 1, ACE_TRY_ENV);
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::PollableSet::_tc_NoPossiblePollable, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::PollableSet::NoPossiblePollable *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::PollableSet::NoPossiblePollable, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::PollableSet::NoPossiblePollable *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::PollableSet::_tc_NoPossiblePollable,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::PollableSet::NoPossiblePollable *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::PollableSet::NoPossiblePollable *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
}
ACE_CATCHANY
{
+ delete ACE_const_cast (CORBA::PollableSet::NoPossiblePollable *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+void operator<<= (CORBA::Any &_tao_any, const CORBA::PollableSet::UnknownPollable &_tao_elem) // copying
+{
+ CORBA::PollableSet::UnknownPollable *_tao_any_val = 0;
+ ACE_NEW (_tao_any_val, CORBA::PollableSet::UnknownPollable (_tao_elem));
+ if (!_tao_any_val) return;
+ ACE_TRY_NEW_ENV
+ {
+ TAO_OutputCDR stream;
+ stream << *_tao_any_val;
+ _tao_any._tao_replace (
+ CORBA::PollableSet::_tc_UnknownPollable,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_any_val,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
delete _tao_any_val;
}
ACE_ENDTRY;
}
-void operator<<= (CORBA::Any &_tao_any, CORBA_PollableSet::UnknownPollable *_tao_elem) // non copying
+void operator<<= (CORBA::Any &_tao_any, CORBA::PollableSet::UnknownPollable *_tao_elem) // non copying
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (CORBA_PollableSet::_tc_UnknownPollable, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ CORBA::PollableSet::_tc_UnknownPollable,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_PollableSet::UnknownPollable *&_tao_elem)
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::UnknownPollable *&_tao_elem)
{
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (CORBA_PollableSet::_tc_UnknownPollable, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (CORBA::PollableSet::_tc_UnknownPollable, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
- _tao_elem = (CORBA_PollableSet::UnknownPollable *)_tao_any.value ();
+ _tao_elem = (CORBA::PollableSet::UnknownPollable *)_tao_any.value ();
return 1;
}
else
{
- ACE_NEW_RETURN (_tao_elem, CORBA_PollableSet::UnknownPollable, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (CORBA_PollableSet::_tc_UnknownPollable, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ACE_NEW_RETURN (_tao_elem, CORBA::PollableSet::UnknownPollable, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (CORBA_PollableSet::_tc_UnknownPollable, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::PollableSet::_tc_UnknownPollable,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PollableSet::UnknownPollable *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (CORBA::PollableSet::_tc_UnknownPollable, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (CORBA::PollableSet::UnknownPollable *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, CORBA::PollableSet::UnknownPollable, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(CORBA::PollableSet::UnknownPollable *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ CORBA::PollableSet::_tc_UnknownPollable,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::PollableSet::UnknownPollable *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (CORBA::PollableSet::UnknownPollable *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (CORBA::PollableSet::UnknownPollable *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
diff --git a/TAO/tao/PollableC.h b/TAO/tao/PollableC.h
index 133726fb79e..c7672c2a047 100644
--- a/TAO/tao/PollableC.h
+++ b/TAO/tao/PollableC.h
@@ -405,20 +405,38 @@ private:
};
// Any operators for interface CORBA_Pollable
-TAO_Export void operator<<= (CORBA::Any &, CORBA_Pollable_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_Pollable *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA_Pollable_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA_Pollable *&);
+
// Any operators for interface CORBA::DIIPollable
-TAO_Export void operator<<= (CORBA::Any &, CORBA::DIIPollable_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::DIIPollable *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA::DIIPollable_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA::DIIPollable *&);
+
// Any operators for interface CORBA_PollableSet
-TAO_Export void operator<<= (CORBA::Any &, CORBA_PollableSet_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_PollableSet *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA_PollableSet::NoPossiblePollable &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA_PollableSet::NoPossiblePollable*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_PollableSet::NoPossiblePollable *&);
-TAO_Export void operator<<= (CORBA::Any &, const CORBA_PollableSet::UnknownPollable &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, CORBA_PollableSet::UnknownPollable*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_PollableSet::UnknownPollable *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA_PollableSet_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA_PollableSet *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA_PollableSet::NoPossiblePollable &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA_PollableSet::NoPossiblePollable*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA_PollableSet::NoPossiblePollable *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::PollableSet::NoPossiblePollable *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const CORBA_PollableSet::UnknownPollable &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ CORBA_PollableSet::UnknownPollable*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ CORBA_PollableSet::UnknownPollable *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const CORBA::PollableSet::UnknownPollable *&);
#ifndef __ACE_INLINE__
diff --git a/TAO/tao/TAOC.cpp b/TAO/tao/TAOC.cpp
index d683dfc6e6c..7b309b53287 100644
--- a/TAO/tao/TAOC.cpp
+++ b/TAO/tao/TAOC.cpp
@@ -144,12 +144,21 @@ TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ClientPriorityPolicy, &_tc_TAO_tc
TAO_NAMESPACE_END
void operator<<= (CORBA::Any &_tao_any, const TAO::PrioritySpecification &_tao_elem) // copying
{
- TAO::PrioritySpecification *_any_val;
+ TAO::PrioritySpecification *_any_val = 0;
ACE_NEW (_any_val, TAO::PrioritySpecification (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO::_tc_PrioritySpecification, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ TAO::_tc_PrioritySpecification,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -163,10 +172,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO::PrioritySpecification *_tao_elem) /
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO::_tc_PrioritySpecification, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ TAO::_tc_PrioritySpecification,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -175,40 +197,106 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::PrioritySpecificati
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO::_tc_PrioritySpecification, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO::_tc_PrioritySpecification, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (TAO::PrioritySpecification *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, TAO::PrioritySpecification, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (TAO::_tc_PrioritySpecification, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (TAO::_tc_PrioritySpecification, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO::_tc_PrioritySpecification,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO::PrioritySpecification *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (TAO::_tc_PrioritySpecification, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (TAO::PrioritySpecification *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, TAO::PrioritySpecification, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(TAO::PrioritySpecification *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO::_tc_PrioritySpecification,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (TAO::PrioritySpecification *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (TAO::PrioritySpecification *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (TAO::PrioritySpecification *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
+TAO::ClientPriorityPolicy_ptr (*_TAO_collocation_TAO_ClientPriorityPolicy_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
void operator<<= (CORBA::Any &_tao_any, TAO::ClientPriorityPolicy_ptr _tao_elem)
{
CORBA::Object_ptr *_tao_obj_ptr = 0;
@@ -216,8 +304,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO::ClientPriorityPolicy_ptr _tao_elem)
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = TAO::ClientPriorityPolicy::_duplicate (_tao_elem);
- _tao_any.replace (TAO::_tc_ClientPriorityPolicy, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ TAO::_tc_ClientPriorityPolicy,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -229,34 +332,49 @@ void operator<<= (CORBA::Any &_tao_any, TAO::ClientPriorityPolicy_ptr _tao_elem)
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::ClientPriorityPolicy_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = TAO::ClientPriorityPolicy::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO::_tc_ClientPriorityPolicy, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO::_tc_ClientPriorityPolicy, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (TAO::_tc_ClientPriorityPolicy, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = TAO::ClientPriorityPolicy::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (TAO::_tc_ClientPriorityPolicy, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO::_tc_ClientPriorityPolicy,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = TAO::ClientPriorityPolicy::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = TAO::ClientPriorityPolicy::_nil ();
return 0;
}
@@ -408,12 +526,21 @@ TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_BufferingConstraintPolicy, &_tc_T
TAO_NAMESPACE_END
void operator<<= (CORBA::Any &_tao_any, const TAO::BufferingConstraint &_tao_elem) // copying
{
- TAO::BufferingConstraint *_any_val;
+ TAO::BufferingConstraint *_any_val = 0;
ACE_NEW (_any_val, TAO::BufferingConstraint (_tao_elem));
if (!_any_val) return;
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO::_tc_BufferingConstraint, _any_val, 1, ACE_TRY_ENV); // copy the value
+ TAO_OutputCDR stream;
+ stream << *_any_val;
+ _tao_any._tao_replace (
+ TAO::_tc_BufferingConstraint,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _any_val,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
ACE_CATCHANY
@@ -427,10 +554,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO::BufferingConstraint *_tao_elem) //
{
ACE_TRY_NEW_ENV
{
- _tao_any.replace (TAO::_tc_BufferingConstraint, _tao_elem, 1, ACE_TRY_ENV); // consume it
+ TAO_OutputCDR stream;
+ stream << *_tao_elem;
+ _tao_any._tao_replace (
+ TAO::_tc_BufferingConstraint,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_elem,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
}
- ACE_CATCHANY {}
+ ACE_CATCHANY
+ {
+ delete _tao_elem;
+ _tao_elem = 0;
+ }
ACE_ENDTRY;
}
@@ -439,40 +579,106 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::BufferingConstraint
ACE_TRY_NEW_ENV
{
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO::_tc_BufferingConstraint, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO::_tc_BufferingConstraint, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
ACE_TRY_CHECK;
if (_tao_any.any_owns_data ())
{
_tao_elem = (TAO::BufferingConstraint *)_tao_any.value ();
return 1;
- }
+ }
else
{
ACE_NEW_RETURN (_tao_elem, TAO::BufferingConstraint, 0);
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
- if (stream.decode (TAO::_tc_BufferingConstraint, _tao_elem, 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *_tao_elem)
{
- ((CORBA::Any *)&_tao_any)->replace (TAO::_tc_BufferingConstraint, _tao_elem, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO::_tc_BufferingConstraint,
+ 1,
+ ACE_reinterpret_cast (void *, _tao_elem),
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
else
{
delete _tao_elem;
+ _tao_elem = 0;
}
}
}
ACE_CATCHANY
{
delete _tao_elem;
- return 0;
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO::BufferingConstraint *&_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
+ if (!type->equivalent (TAO::_tc_BufferingConstraint, ACE_TRY_ENV)) // not equal
+ {
+ _tao_elem = 0;
+ return 0;
+ }
+ ACE_TRY_CHECK;
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = (TAO::BufferingConstraint *)_tao_any.value ();
+ return 1;
+ }
+ else
+ {
+ ACE_NEW_RETURN (_tao_elem, TAO::BufferingConstraint, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *(TAO::BufferingConstraint *)_tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO::_tc_BufferingConstraint,
+ 1,
+ ACE_reinterpret_cast (void *, ACE_const_cast (TAO::BufferingConstraint *&, _tao_elem)),
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ else
+ {
+ delete ACE_const_cast (TAO::BufferingConstraint *&, _tao_elem);
+ _tao_elem = 0;
+ }
+ }
+ }
+ ACE_CATCHANY
+ {
+ delete ACE_const_cast (TAO::BufferingConstraint *&, _tao_elem);
+ _tao_elem = 0;
+ return 0;
}
ACE_ENDTRY;
return 0;
}
+TAO::BufferingConstraintPolicy_ptr (*_TAO_collocation_TAO_BufferingConstraintPolicy_Stub_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
void operator<<= (CORBA::Any &_tao_any, TAO::BufferingConstraintPolicy_ptr _tao_elem)
{
CORBA::Object_ptr *_tao_obj_ptr = 0;
@@ -480,8 +686,23 @@ void operator<<= (CORBA::Any &_tao_any, TAO::BufferingConstraintPolicy_ptr _tao_
{
ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
*_tao_obj_ptr = TAO::BufferingConstraintPolicy::_duplicate (_tao_elem);
- _tao_any.replace (TAO::_tc_BufferingConstraintPolicy, _tao_obj_ptr, 1, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ TAO_OutputCDR stream;
+ if (stream << *_tao_obj_ptr)
+ {
+ _tao_any._tao_replace (
+ TAO::_tc_BufferingConstraintPolicy,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ _tao_obj_ptr,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ delete _tao_obj_ptr;
+ }
}
ACE_CATCHANY
{
@@ -493,34 +714,49 @@ void operator<<= (CORBA::Any &_tao_any, TAO::BufferingConstraintPolicy_ptr _tao_
CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::BufferingConstraintPolicy_ptr &_tao_elem)
{
CORBA::Object_ptr *tmp = 0;
+ ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
ACE_TRY_NEW_ENV
{
_tao_elem = TAO::BufferingConstraintPolicy::_nil ();
CORBA::TypeCode_var type = _tao_any.type ();
- if (!type->equal (TAO::_tc_BufferingConstraintPolicy, ACE_TRY_ENV)) return 0; // not equal
+ if (!type->equivalent (TAO::_tc_BufferingConstraintPolicy, ACE_TRY_ENV)) // not equal
+ {
+ delete tmp;
+ return 0;
+ }
ACE_TRY_CHECK;
- TAO_InputCDR stream (_tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ());
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
CORBA::Object_var _tao_obj_var;
- ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
- if (stream.decode (TAO::_tc_BufferingConstraintPolicy, &_tao_obj_var.out (), 0, ACE_TRY_ENV)
- == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ if (stream >> _tao_obj_var.out ())
{
_tao_elem = TAO::BufferingConstraintPolicy::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
*tmp = (CORBA::Object_ptr) _tao_elem; // any owns the object
- ((CORBA::Any *)&_tao_any)->replace (TAO::_tc_BufferingConstraintPolicy, tmp, 1, ACE_TRY_ENV);
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ TAO::_tc_BufferingConstraintPolicy,
+ 1,
+ tmp,
+ ACE_TRY_ENV
+ );
ACE_TRY_CHECK;
return 1;
}
- // failure
+ else // failure
+ {
+ delete tmp;
+ }
}
ACE_CATCHANY
{
delete tmp;
+ _tao_elem = TAO::BufferingConstraintPolicy::_nil ();
return 0;
}
ACE_ENDTRY;
+ _tao_elem = TAO::BufferingConstraintPolicy::_nil ();
return 0;
}
diff --git a/TAO/tao/TAOC.h b/TAO/tao/TAOC.h
index 3f8b1fdecbf..ee90c5bdccf 100644
--- a/TAO/tao/TAOC.h
+++ b/TAO/tao/TAOC.h
@@ -421,18 +421,34 @@ TAO_NAMESPACE_CLOSE // module TAO
#if (TAO_HAS_CORBA_MESSAGING == 1)
-TAO_Export void operator<<= (CORBA::Any &, const TAO::PrioritySpecification &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, TAO::PrioritySpecification*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO::PrioritySpecification *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const TAO::PrioritySpecification &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO::PrioritySpecification*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO::PrioritySpecification *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const TAO::PrioritySpecification *&);
+
// Any operators for interface TAO::ClientPriorityPolicy
-TAO_Export void operator<<= (CORBA::Any &, TAO::ClientPriorityPolicy_ptr);
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO::ClientPriorityPolicy *&);
-TAO_Export void operator<<= (CORBA::Any &, const TAO::BufferingConstraint &); // copying version
-TAO_Export void operator<<= (CORBA::Any &, TAO::BufferingConstraint*); // noncopying version
-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO::BufferingConstraint *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO::ClientPriorityPolicy_ptr);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO::ClientPriorityPolicy *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ const TAO::BufferingConstraint &); // copying version
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO::BufferingConstraint*); // noncopying version
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO::BufferingConstraint *&);
+TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &,
+ const TAO::BufferingConstraint *&);
+
// Any operators for interface TAO::BufferingConstraintPolicy
-void operator<<= (CORBA::Any &, TAO::BufferingConstraintPolicy_ptr);
-CORBA::Boolean operator>>= (const CORBA::Any &, TAO::BufferingConstraintPolicy *&);
+TAO_Export void operator<<= (CORBA::Any &,
+ TAO::BufferingConstraintPolicy_ptr);
+CORBA::Boolean operator>>= (const CORBA::Any &,
+ TAO::BufferingConstraintPolicy *&);
#endif /* TAO_HAS_CORBA_MESSAGING == 1 */