summaryrefslogtreecommitdiff
path: root/TAO/tao/TAOC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/TAOC.cpp')
-rw-r--r--TAO/tao/TAOC.cpp325
1 files changed, 280 insertions, 45 deletions
diff --git a/TAO/tao/TAOC.cpp b/TAO/tao/TAOC.cpp
index 4aca9968af3..7b309b53287 100644
--- a/TAO/tao/TAOC.cpp
+++ b/TAO/tao/TAOC.cpp
@@ -1,6 +1,5 @@
/* -*- C++ -*- $Id$ */
-
// ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******
// TAO and the TAO IDL Compiler have been developed by the Center for
// Distributed Object Computing at Washington University, St. Louis.
@@ -145,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
@@ -164,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;
}
@@ -176,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;
@@ -217,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
{
@@ -230,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;
}
@@ -409,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
@@ -428,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;
}
@@ -440,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;
@@ -481,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
{
@@ -494,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;
}