diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-13 16:55:21 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-03-13 16:55:21 +0000 |
commit | 8fc9cdb820d0fe4922dec4ba6f1f956bc0f12795 (patch) | |
tree | 84d863386093976429bfc3621739296c5f718c6b | |
parent | aee08c825ea5f0b0fce20776a42c82e3b37f5242 (diff) | |
download | ATCD-8fc9cdb820d0fe4922dec4ba6f1f956bc0f12795.tar.gz |
ChangeLogTag:Mon Mar 13 08:23:23 2000 Carlos O'Ryan <coryan@uci.edu>
56 files changed, 4183 insertions, 10648 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 37c179a7fcf..471edbba8cd 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,159 +1,234 @@ +Mon Mar 13 08:23:23 2000 Carlos O'Ryan <coryan@uci.edu> + + * tao/Any.h: + * tao/Any.cpp: + The _tao_replace() functions do not require an ACE_TRY_ENV + argument. + Any _tao_replace() function that requires a void* also requires + the destructor function. + + * tao/BoundsC.h: + * tao/BoundsC.cpp: + * tao/CONV_FRAMEC.cpp: + * tao/CurrentC.cpp: + * tao/DomainC.cpp: + * tao/DynAnyC.h: + * tao/DynAny_i.cpp: + * tao/GIOPC.cpp: + * tao/IOPC.cpp: + * tao/IOPC.h: + * tao/IORC.h: + * tao/IORC.cpp: + * tao/ImplRepoC.h: + * tao/ImplRepoC.i: + * tao/ImplRepoC.cpp: + * tao/ImplRepoS.cpp: + * tao/ImplRepoS.h: + * tao/ImplRepoS.i: + * tao/ImplRepoS_T.h: + * tao/ImplRepoS_T.i: + * tao/ImplRepoS_T.cpp: + * tao/InterceptorC.h: + * tao/InterceptorC.cpp: + * tao/InterfaceC.h: + * tao/InterfaceC.cpp: + * tao/MessagingC.h: + * tao/MessagingC.cpp: + * tao/MessagingS.cpp: + * tao/NVList.cpp: + * tao/ObjectIDList.h: + * tao/ObjectIDList.cpp: + * tao/POAC.h: + * tao/POAC.cpp: + * tao/PolicyC.h: + * tao/PolicyC.cpp: + * tao/PollableC.h: + * tao/PollableC.cpp: + * tao/Sequence.h: + * tao/Sequence.cpp: + * tao/Services.h: + * tao/Services.cpp: + * tao/TAOC.h: + * tao/TAOC.cpp: + * tao/TimeBaseC.h: + * tao/TimeBaseC.cpp: + Changed all the hand-crafted files to use the new _tao_replace + style functions. + + * TAO_IDL/be/be_visitor_array/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_enum/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_exception/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_interface/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_structure/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_union/any_op_cs.cpp: + The _tao_replace() functions do not require the ACE_TRY_ENV + argument anymore. This let us simplify many of the + implementations for >>= and <<= operators. We also identified + some cases of duplicated code and removed as much as possible of + that. + + * tests/Param_Test/Param_Test.dsw: + * tests/Param_Test/anyop.dsp: + * tests/Param_Test/anyop.cpp: + Added the anyop test to the NT project files. + Fri Mar 10 19:06:05 2000 Jeff Parsons <parsons@cs.wustl.edu> - * tao/DynAnyC.h: - * tao/DynAnyC.cpp: - Removed some unnecessary _ptr_type typedefs. + * tao/DynAnyC.h: + * tao/DynAnyC.cpp: + Removed some unnecessary _ptr_type typedefs. Fri Mar 10 14:54:20 2000 Jeff Parsons <parsons@cs.wustl.edu> - * TAO_IDL/be/be_visitor_array/array_cs.cpp: - * TAO_IDL/be/be_visitor_exception/exception_cs.cpp: - * TAO_IDL/be/be_visitor_interface/interface_cs.cpp: - * TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp: - * TAO_IDL/be/be_visitor_structure/structure_cs.cpp: - * TAO_IDL/be/be_visitor_union/union_cs.cpp: - In the definition of the static function - _tao_any_destructor, prepending the global "::" - to the scoped name of the class or struct keeps - gcc happy. Thanks to Carlos for pointing this out. + * TAO_IDL/be/be_visitor_array/array_cs.cpp: + * TAO_IDL/be/be_visitor_exception/exception_cs.cpp: + * TAO_IDL/be/be_visitor_interface/interface_cs.cpp: + * TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp: + * TAO_IDL/be/be_visitor_structure/structure_cs.cpp: + * TAO_IDL/be/be_visitor_union/union_cs.cpp: + In the definition of the static function + _tao_any_destructor, prepending the global "::" + to the scoped name of the class or struct keeps + gcc happy. Thanks to Carlos for pointing this out. Fri Mar 10 12:24:01 2000 Carlos O'Ryan <coryan@uci.edu> - * examples/POA/DSI/Database_i.cpp: - * orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp: - * orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp: - * orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp: - * orbsvcs/orbsvcs/Trader/Constraint_Nodes.cpp: - * orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp: - * orbsvcs/tests/Property/client.cpp: - * orbsvcs/tests/Trading/Offer_Exporter.cpp: - * orbsvcs/tests/Trading/TT_Info.cpp: - * tests/CDR/basic_types.cpp: - * tests/Param_Test/objref.cpp: - * tests/Param_Test/objref.h: - * utils/catior/catior.cpp: - Fixed uses of encode(), decode(), replace(), the void* - constructor for Any and obsolete >>= or <<= operators. - - * */Makefile: - Updated dependencies + * examples/POA/DSI/Database_i.cpp: + * orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp: + * orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp: + * orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp: + * orbsvcs/orbsvcs/Trader/Constraint_Nodes.cpp: + * orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.cpp: + * orbsvcs/tests/Property/client.cpp: + * orbsvcs/tests/Trading/Offer_Exporter.cpp: + * orbsvcs/tests/Trading/TT_Info.cpp: + * tests/CDR/basic_types.cpp: + * tests/Param_Test/objref.cpp: + * tests/Param_Test/objref.h: + * utils/catior/catior.cpp: + Fixed uses of encode(), decode(), replace(), the void* + constructor for Any and obsolete >>= or <<= operators. + + * */Makefile: + Updated dependencies Fri Mar 10 11:28:17 2000 Carlos O'Ryan <coryan@uci.edu> - * tao/Any.cpp: - The >>= operator for 'const Any*' was not working properly, - thanks to Jeff for letting me know. + * tao/Any.cpp: + The >>= operator for 'const Any*' was not working properly, + thanks to Jeff for letting me know. - * tao/GIOPC.h: - * tao/GIOPC.cpp: - Another pair of files updated. + * tao/GIOPC.h: + * tao/GIOPC.cpp: + Another pair of files updated. Fri Mar 10 12:49:21 2000 Jeff Paraons <parsons@cs.wustl.edu> - * TAO_IDL/be/be_codegen.cpp - * TAO_IDL/be/be_visitor_argument.cpp - * TAO_IDL/be/be_visitor_factory.cpp - * TAO_IDL/be/be_visitor_operation.cpp - * TAO_IDL/be/be_visitor_argument/marshal_ss.cpp - * TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp - * TAO_IDL/be/be_visitor_argument/pre_invoke_cs.cpp - * TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp - * TAO_IDL/be/be_visitor_operation/argument.cpp - * TAO_IDL/be/be_visitor_operation/operation_cs.cpp - * TAO_IDL/be/be_visitor_operation/operation_ss.cpp - * TAO_IDL/be/be_visitor_operation/rettype_marshal_ss.cpp - * TAO_IDL/be/be_visitor_operation/rettype_post_upcall_ss.cpp - * TAO_IDL/be/be_visitor_operation/rettype_pre_invoke_cs.cpp - * TAO_IDL/be/be_visitor_operation/rettype_vardecl_ss.cpp - * TAO_IDL/be/be_visitor_union/any_op_cs.cpp - * TAO_IDL/be/be_visitor_valuetype/arglist.cpp - * TAO_IDL/be_include/be_codegen.h - * TAO_IDL/be_include/be_visitor_argument.h - * TAO_IDL/be_include/be_visitor_factory.h - * TAO_IDL/be_include/be_visitor_operation.h - * TAO_IDL/be_include/be_visitor_argument/marshal_ss.h - * TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h - * TAO_IDL/be_include/be_visitor_argument/pre_invoke_cs.h - * TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h - * TAO_IDL/be_include/be_visitor_operation/operation_cs.h - * TAO_IDL/be_include/be_visitor_operation/operation_ss.h - * TAO_IDL/be_include/be_visitor_operation/rettype_marshal_ss.h - * TAO_IDL/be_include/be_visitor_operation/rettype_post_upcall_ss.h - * TAO_IDL/be_include/be_visitor_operation/rettype_pre_invoke_cs.h - * TAO_IDL/be_include/be_visitor_operation/rettype_vardecl_ss.h - * TAO_IDL/be_include/be_visitor_union/any_op_cs.h - * TAO_IDL/driver/drv_args.cpp - * TAO_IDL/include/idl_global.h - * TAO_IDL/util/utl_global.cpp - Changes to remove the generation of code using interpretive - marshaling. - - * TAO_IDL/be/be_visitor_argument/invoke_cs.cpp - * TAO_IDL/be/be_visitor_argument/post_invoke_cs.cpp - * TAO_IDL/be/be_visitor_operation/rettype_post_invoke_cs.cpp - * TAO_IDL/be_include/be_visitor_argument/invoke_cs.h - * TAO_IDL/be_include/be_visitor_argument/post_invoke_cs.h - * TAO_IDL/be_include/be_visitor_operation/rettype_post_invoke_cs.h - Files added or renamed from other files removed below. - - * TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp - * TAO_IDL/be/be_visitor_argument/compiled_marshal_ss.cpp - * TAO_IDL/be/be_visitor_argument/docall_cs.cpp - * TAO_IDL/be/be_visitor_argument/post_docall_compiled_cs.cpp - * TAO_IDL/be/be_visitor_argument/post_docall_cs.cpp - * TAO_IDL/be/be_visitor_argument/pre_docall_cs.cpp - * TAO_IDL/be/be_visitor_argument/pre_upcall_ss.cpp - * TAO_IDL/be/be_visitor_operation/compiled_marshal.cpp - * TAO_IDL/be/be_visitor_operation/rettype_docall_cs.cpp - * TAO_IDL/be/be_visitor_operation/rettype_post_docall_cs.cpp - * TAO_IDL/be/be_visitor_operation/rettype_pre_docall_cs.cpp - * TAO_IDL/be_include/be_visitor_argument/compiled_marshal_cs.h - * TAO_IDL/be_include/be_visitor_argument/compiled_marshal_ss.h - * TAO_IDL/be_include/be_visitor_argument/docall_cs.h - * TAO_IDL/be_include/be_visitor_argument/post_docall_compiled_cs.h - * TAO_IDL/be_include/be_visitor_argument/post_docall_cs.h - * TAO_IDL/be_include/be_visitor_argument/pre_docall_cs.h - * TAO_IDL/be_include/be_visitor_argument/pre_upcall_ss.h - * TAO_IDL/be_include/be_visitor_operation/compiled_marshal.h - * TAO_IDL/be_include/be_visitor_operation/rettype_docall_cs.h - * TAO_IDL/be_include/be_visitor_operation/rettype_post_docall_cs.h - * TAO_IDL/be_include/be_visitor_operation/rettype_pre_docall_cs.h - Files removed. + * TAO_IDL/be/be_codegen.cpp + * TAO_IDL/be/be_visitor_argument.cpp + * TAO_IDL/be/be_visitor_factory.cpp + * TAO_IDL/be/be_visitor_operation.cpp + * TAO_IDL/be/be_visitor_argument/marshal_ss.cpp + * TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp + * TAO_IDL/be/be_visitor_argument/pre_invoke_cs.cpp + * TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp + * TAO_IDL/be/be_visitor_operation/argument.cpp + * TAO_IDL/be/be_visitor_operation/operation_cs.cpp + * TAO_IDL/be/be_visitor_operation/operation_ss.cpp + * TAO_IDL/be/be_visitor_operation/rettype_marshal_ss.cpp + * TAO_IDL/be/be_visitor_operation/rettype_post_upcall_ss.cpp + * TAO_IDL/be/be_visitor_operation/rettype_pre_invoke_cs.cpp + * TAO_IDL/be/be_visitor_operation/rettype_vardecl_ss.cpp + * TAO_IDL/be/be_visitor_union/any_op_cs.cpp + * TAO_IDL/be/be_visitor_valuetype/arglist.cpp + * TAO_IDL/be_include/be_codegen.h + * TAO_IDL/be_include/be_visitor_argument.h + * TAO_IDL/be_include/be_visitor_factory.h + * TAO_IDL/be_include/be_visitor_operation.h + * TAO_IDL/be_include/be_visitor_argument/marshal_ss.h + * TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h + * TAO_IDL/be_include/be_visitor_argument/pre_invoke_cs.h + * TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h + * TAO_IDL/be_include/be_visitor_operation/operation_cs.h + * TAO_IDL/be_include/be_visitor_operation/operation_ss.h + * TAO_IDL/be_include/be_visitor_operation/rettype_marshal_ss.h + * TAO_IDL/be_include/be_visitor_operation/rettype_post_upcall_ss.h + * TAO_IDL/be_include/be_visitor_operation/rettype_pre_invoke_cs.h + * TAO_IDL/be_include/be_visitor_operation/rettype_vardecl_ss.h + * TAO_IDL/be_include/be_visitor_union/any_op_cs.h + * TAO_IDL/driver/drv_args.cpp + * TAO_IDL/include/idl_global.h + * TAO_IDL/util/utl_global.cpp + Changes to remove the generation of code using interpretive + marshaling. + + * TAO_IDL/be/be_visitor_argument/invoke_cs.cpp + * TAO_IDL/be/be_visitor_argument/post_invoke_cs.cpp + * TAO_IDL/be/be_visitor_operation/rettype_post_invoke_cs.cpp + * TAO_IDL/be_include/be_visitor_argument/invoke_cs.h + * TAO_IDL/be_include/be_visitor_argument/post_invoke_cs.h + * TAO_IDL/be_include/be_visitor_operation/rettype_post_invoke_cs.h + Files added or renamed from other files removed below. + + * TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp + * TAO_IDL/be/be_visitor_argument/compiled_marshal_ss.cpp + * TAO_IDL/be/be_visitor_argument/docall_cs.cpp + * TAO_IDL/be/be_visitor_argument/post_docall_compiled_cs.cpp + * TAO_IDL/be/be_visitor_argument/post_docall_cs.cpp + * TAO_IDL/be/be_visitor_argument/pre_docall_cs.cpp + * TAO_IDL/be/be_visitor_argument/pre_upcall_ss.cpp + * TAO_IDL/be/be_visitor_operation/compiled_marshal.cpp + * TAO_IDL/be/be_visitor_operation/rettype_docall_cs.cpp + * TAO_IDL/be/be_visitor_operation/rettype_post_docall_cs.cpp + * TAO_IDL/be/be_visitor_operation/rettype_pre_docall_cs.cpp + * TAO_IDL/be_include/be_visitor_argument/compiled_marshal_cs.h + * TAO_IDL/be_include/be_visitor_argument/compiled_marshal_ss.h + * TAO_IDL/be_include/be_visitor_argument/docall_cs.h + * TAO_IDL/be_include/be_visitor_argument/post_docall_compiled_cs.h + * TAO_IDL/be_include/be_visitor_argument/post_docall_cs.h + * TAO_IDL/be_include/be_visitor_argument/pre_docall_cs.h + * TAO_IDL/be_include/be_visitor_argument/pre_upcall_ss.h + * TAO_IDL/be_include/be_visitor_operation/compiled_marshal.h + * TAO_IDL/be_include/be_visitor_operation/rettype_docall_cs.h + * TAO_IDL/be_include/be_visitor_operation/rettype_post_docall_cs.h + * TAO_IDL/be_include/be_visitor_operation/rettype_pre_docall_cs.h + Files removed. Fri Mar 10 09:49:40 2000 Carlos O'Ryan <coryan@uci.edu> - * tao/Any.h: - * tao/Any.cpp: - More memory management fixes for the >>= and <<= operators. - Moved some static _tao_any_destructor functions to the Any - class, it is easier to maintain it that way. + * tao/Any.h: + * tao/Any.cpp: + More memory management fixes for the >>= and <<= operators. + Moved some static _tao_any_destructor functions to the Any + class, it is easier to maintain it that way. - * tao/Object.h: - * tao/Object.cpp: - Add the _tao_any_destructor helper function. + * tao/Object.h: + * tao/Object.cpp: + Add the _tao_any_destructor helper function. - * tao/DomainC.h: - * tao/DomainC.cpp: - Changed to use the new _tao_any_destructors in the right places. + * tao/DomainC.h: + * tao/DomainC.cpp: + Changed to use the new _tao_any_destructors in the right places. - * tao/DynAny_i.cpp: - It is better just to return 0 than to cast away const. + * tao/DynAny_i.cpp: + It is better just to return 0 than to cast away const. Fri Mar 10 11:28:15 2000 Jeff Parsons <parsons@cs.wustl.edu> - * tao/TAO.dsp: - * tao/TAO_static.dsp: - Added BoundsC.cpp to these projects. + * tao/TAO.dsp: + * tao/TAO_static.dsp: + Added BoundsC.cpp to these projects. - * tao/DynAny_i,cpp: - In get_string() cast away the constness of the internal - char* pointer in the ACE_THROW_RETURN statement. + * tao/DynAny_i,cpp: + In get_string() cast away the constness of the internal + char* pointer in the ACE_THROW_RETURN statement. Thu Mar 9 21:02:10 2000 Carlos O'Ryan <coryan@uci.edu> - * TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_cs.cpp: + * TAO_IDL/be/be_visitor_operation/ami_exception_holder_operation_cs.cpp: - Fixed typo. + Fixed typo. Thu Mar 9 18:50:44 2000 Carlos O'Ryan <coryan@uci.edu> diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp index 62fec777a98..6ede455da3a 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp @@ -57,8 +57,6 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) *os << "void operator<<= (CORBA::Any &_tao_any, const " << node->name () << "_forany &_tao_elem)" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "stream << _tao_elem;" << be_nl << "if (_tao_elem.nocopy ()) // no copy" << be_idt_nl @@ -68,8 +66,7 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << "stream.begin ()," << be_nl << "1," << be_nl << "(void *)_tao_elem.in ()," << be_nl - << node->name () << "_forany::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "_forany::_tao_any_destructor" << be_uidt_nl << ");" << be_uidt << be_uidt_nl << "else // copy" << be_idt_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl @@ -78,13 +75,8 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << "stream.begin ()," << be_nl << "1," << be_nl << node->name () << "_dup (_tao_elem.in ())," << be_nl - << node->name () << "_forany::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt << be_uidt << be_uidt_nl - << "}" << be_nl - << "ACE_TRY_CHECK;" << be_nl - << "ACE_CATCHANY {}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl + << node->name () << "_forany::_tao_any_destructor" << be_uidt_nl + << ");" << be_uidt << be_uidt << be_uidt << be_uidt_nl << "}\n\n"; os->indent (); @@ -117,8 +109,7 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << node->tc_name () << "," << be_nl << "1," << be_nl << "_tao_elem.inout ()," << be_nl - << node->name () << "_forany::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "_forany::_tao_any_destructor" << be_uidt_nl << ");" << be_uidt_nl << "ACE_TRY_CHECK;" << be_nl << "return 1;" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp index 29e55939276..30dfde02ead 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp @@ -56,22 +56,13 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) *os << "void operator<<= (CORBA::Any &_tao_any, " << node->name () << " _tao_elem)" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "stream << _tao_elem;" << be_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl << node->tc_name () << "," << be_nl << "TAO_ENCAP_BYTE_ORDER," << be_nl - << "stream.begin ()," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl + << "stream.begin ()" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}\n" << be_nl; *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, " diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp index 5b3e5d589aa..20305a8bab6 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp @@ -56,29 +56,18 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) *os << "void operator<<= (CORBA::Any &_tao_any, const " << node->name () << " &_tao_elem) // copying" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "stream << _tao_elem;" << be_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl << node->tc_name () << "," << be_nl << "TAO_ENCAP_BYTE_ORDER," << be_nl - << "stream.begin ()," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY " << be_nl - << "{" << be_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl + << "stream.begin ()" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}\n" << be_nl; *os << "void operator<<= (CORBA::Any &_tao_any, " << node->name () << " *_tao_elem) // non copying" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "stream << *_tao_elem;" << be_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl @@ -87,17 +76,8 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) << "stream.begin ()," << be_nl << "1," << be_nl << "_tao_elem," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "delete _tao_elem;" << be_nl - << "_tao_elem = 0;" << be_uidt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}\n" << be_nl; *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, " @@ -133,10 +113,8 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) << node->tc_name () << "," << be_nl << "1," << be_nl << "ACE_reinterpret_cast (void *, _tao_elem)," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl << "return 1;" << be_uidt_nl << "}" << be_nl << "else" << be_nl @@ -191,10 +169,8 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) << "1," << be_nl << "ACE_reinterpret_cast (void *, ACE_const_cast (" << node->name () << " *&, _tao_elem))," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl << "return 1;" << be_uidt_nl << "}" << be_nl << "else" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp index 17de951310f..9cd335ec55b 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp @@ -70,8 +70,6 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << "void operator<<= (CORBA::Any &_tao_any, " << node->full_name () << "_ptr _tao_elem)" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "if (stream << _tao_elem)" << be_nl << "{" << be_idt_nl @@ -81,16 +79,9 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) << "stream.begin ()," << be_nl << "1," << be_nl << node->full_name () << "::_duplicate (_tao_elem)," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl << "}\n" << be_nl; *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, " @@ -121,10 +112,8 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) << node->tc_name () << "," << be_nl << "1," << be_nl << "_tao_elem," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl << "return 1;" << be_uidt_nl << "}" << be_uidt_nl << "}" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp index 95eb19cf185..e93c413ec00 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp @@ -57,43 +57,20 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << "const " << node->name () << " &_tao_elem" << be_uidt_nl << ") // copying" << be_uidt_nl << "{" << be_idt_nl - << node->name () << " *_tao_any_val;" << be_nl - << "ACE_NEW (_tao_any_val, " << node->name () - << " (_tao_elem));" << be_nl - << "if (!_tao_any_val) return;" << be_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl - << "if (stream << *_tao_any_val)" << be_nl + << "if (stream << _tao_elem)" << be_nl << "{" << be_idt_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl << node->tc_name () << "," << be_nl << "TAO_ENCAP_BYTE_ORDER," << be_nl - << "stream.begin ()," << be_nl - << "1," << be_nl - << "_tao_any_val," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK; " << be_uidt_nl - << "}" << be_nl - << "else" << be_nl - << "{" << be_idt_nl - << "delete _tao_any_val;" << be_uidt_nl + << "stream.begin ()" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "delete _tao_any_val;" << be_uidt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl << "}\n" << be_nl; *os << "void operator<<= (CORBA::Any &_tao_any, " << node->name () << " *_tao_elem) // non copying" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "stream << *_tao_elem;" << be_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl @@ -102,17 +79,8 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << "stream.begin ()," << be_nl << "1," << be_nl << "_tao_elem," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "delete _tao_elem;" << be_nl - << "_tao_elem = 0;" << be_uidt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}\n" << be_nl; *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, " @@ -148,10 +116,8 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << node->tc_name () << "," << be_nl << "1," << be_nl << "ACE_reinterpret_cast (void *, _tao_elem)," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl << "return 1;" << be_uidt_nl << "}" << be_nl << "else" << be_nl @@ -174,61 +140,10 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const " << node->name () << " *&_tao_elem)" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) // not equal" << be_idt_nl - << "{" << be_idt_nl - << "_tao_elem = 0;" << be_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl - << "if (_tao_any.any_owns_data ())" << be_nl - << "{" << be_idt_nl - << "_tao_elem = (" << node->name () << " *)_tao_any.value ();" - << be_nl - << "return 1;" << be_uidt_nl - << "}" << be_nl - << "else" << be_nl // else any does not own the data - << "{" << be_idt_nl - << "ACE_NEW_RETURN (_tao_elem, " << node->name () << ", 0);" - << be_nl - << "TAO_InputCDR stream (" << be_idt << be_idt_nl - << "_tao_any._tao_get_cdr ()," << be_nl - << "_tao_any._tao_byte_order ()" << be_uidt_nl - << ");" << be_uidt_nl - << "if (stream >> *(" << node->name () << " *)_tao_elem)" << be_nl - << "{" << be_idt_nl - << "((CORBA::Any *)&_tao_any)->_tao_replace (" - << be_idt << be_idt_nl - << node->tc_name () << "," << be_nl - << "1," << be_nl - << "ACE_reinterpret_cast (void *, ACE_const_cast (" - << node->name () << " *&, _tao_elem))," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl - << "return 1;" << be_uidt_nl - << "}" << be_nl - << "else" << be_nl - << "{" << be_idt_nl - << "delete ACE_const_cast (" << node->name () - << " *&, _tao_elem);" << be_nl - << "_tao_elem = 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "}" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "delete ACE_const_cast (" << node->name () - << " *&, _tao_elem);" << be_nl - << "_tao_elem = 0;" << be_nl - << "return 0; " << be_uidt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_nl - << "return 0;" << be_uidt_nl + << "return _tao_any >>= ACE_const_cast(" << be_idt << be_idt_nl + << node->name () << "*&," << be_nl + << "_tao_elem" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}\n\n"; node->cli_stub_any_op_gen (1); diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index 28414ed5186..f1d1cf5e053 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -56,29 +56,18 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) *os << "void operator<<= (CORBA::Any &_tao_any, const " << node->name () << " &_tao_elem) // copying" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "stream << _tao_elem;" << be_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl << node->tc_name () << "," << be_nl << "TAO_ENCAP_BYTE_ORDER," << be_nl - << "stream.begin ()," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl + << "stream.begin ()" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}\n" << be_nl; *os << "void operator<<= (CORBA::Any &_tao_any, " << node->name () << " *_tao_elem) // non copying" << be_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "stream << *_tao_elem;" << be_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl @@ -87,16 +76,8 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << "stream.begin ()," << be_nl << "1," << be_nl << "_tao_elem," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "delete _tao_elem;" << be_uidt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}\n" << be_nl; *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, " @@ -132,8 +113,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << node->tc_name () << "," << be_nl << "1," << be_nl << "ACE_reinterpret_cast (void *, _tao_elem)," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl << ");" << be_uidt_nl << "ACE_TRY_CHECK;" << be_nl << "return 1;" << be_uidt_nl @@ -157,62 +137,9 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) *os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const " << node->name () << " *&_tao_elem)" << be_nl - << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) // not equal" << be_idt_nl - << "{" << be_idt_nl - << "_tao_elem = 0;" << be_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl - << "if (_tao_any.any_owns_data ())" << be_nl - << "{" << be_idt_nl - << "_tao_elem = (" << node->name () << " *)_tao_any.value ();" - << be_nl - << "return 1;" << be_nl - << "}" << be_uidt_nl - << "else" << be_nl // else any does not own the data - << "{" << be_idt_nl - << "ACE_NEW_RETURN (_tao_elem, " << node->name () << ", 0);" - << be_nl - << "TAO_InputCDR stream (" << be_idt << be_idt_nl - << "_tao_any._tao_get_cdr ()," << be_nl - << "_tao_any._tao_byte_order ()" << be_uidt_nl - << ");" << be_uidt_nl - << "if (stream >> *(" << node->name () << " *)_tao_elem)" << be_nl - << "{" << be_idt_nl - << "((CORBA::Any *)&_tao_any)->_tao_replace (" - << be_idt << be_idt_nl - << node->tc_name () << "," << be_nl - << "1," << be_nl - << "ACE_reinterpret_cast (void *, ACE_const_cast (" - << node->name () << " *&, _tao_elem))," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl - << "return 1;" << be_uidt_nl - << "}" << be_nl - << "else" << be_nl - << "{" << be_idt_nl - << "delete ACE_const_cast (" << node->name () - << " *&, _tao_elem);" << be_nl - << "_tao_elem = 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "}" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "delete ACE_const_cast (" << node->name () - << " *&, _tao_elem);" << be_nl - << "_tao_elem = 0;" << be_nl - << "return 0; " << be_uidt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_nl - << "return 0;" << be_uidt_nl + << "{" << be_nl + << " return _tao_any >>= ACE_const_cast(" + << node->name () << "*&,_tao_elem);" << be_nl << "}\n\n"; // all we have to do is to visit the scope and generate code diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp index a88d4b0a42a..3530481ca18 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp @@ -57,24 +57,15 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << "const " << node->name () << " &_tao_elem" << be_uidt_nl << ")" << be_uidt_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "if (stream << _tao_elem)" << be_nl << "{" << be_idt_nl << "_tao_any._tao_replace (" << be_idt << be_idt_nl << node->tc_name () << "," << be_nl << "TAO_ENCAP_BYTE_ORDER," << be_nl - << "stream.begin ()," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl + << "stream.begin ()" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << "}" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl << "}\n" << be_nl; *os << "void operator<<= (" << be_idt << be_idt_nl @@ -82,8 +73,6 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << node->name () << " *_tao_elem" << be_uidt_nl << ")" << be_uidt_nl << "{" << be_idt_nl - << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl << "TAO_OutputCDR stream;" << be_nl << "if (stream << *_tao_elem)" << be_nl << "{" << be_idt_nl @@ -93,21 +82,9 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << "stream.begin ()," << be_nl << "1," << be_nl << "_tao_elem," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl - << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl - << "}" << be_nl - << "else" << be_nl - << "{" << be_idt_nl - << "delete _tao_elem;" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_nl + << ");" << be_uidt << be_uidt_nl << "}" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "delete _tao_elem;" << be_uidt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_uidt_nl << "}\n" << be_nl; *os << "CORBA::Boolean operator>>= (" << be_idt << be_idt_nl @@ -145,10 +122,8 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << node->tc_name () << "," << be_nl << "1," << be_nl << "ACE_reinterpret_cast (void *, _tao_elem)," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_uidt_nl << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl << "return 1;" << be_uidt_nl << "}" << be_nl << "else" << be_nl @@ -206,10 +181,8 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << "1," << be_nl << "ACE_reinterpret_cast (void *, ACE_const_cast (" << node->name () << " *&, _tao_elem))," << be_nl - << node->name () << "::_tao_any_destructor," << be_nl - << "ACE_TRY_ENV" << be_uidt_nl + << node->name () << "::_tao_any_destructor" << be_nl << ");" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl << "return 1;" << be_uidt_nl << "}" << be_nl << "else" << be_nl @@ -268,4 +241,3 @@ be_visitor_union_any_op_cs::visit_union_branch (be_union_branch *node) } return 0; } - diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp index 42ade0776ac..16fb1b2f369 100644 --- a/TAO/tao/Any.cpp +++ b/TAO/tao/Any.cpp @@ -180,56 +180,39 @@ CORBA_Any::CORBA_Any (const CORBA_Any &src) CORBA_Any & CORBA_Any::operator= (const CORBA_Any &src) { - ACE_DECLARE_NEW_CORBA_ENV; - - ACE_TRY - { - // check if it is a self assignment - if (this == &src) - { - return *this; - } - - // Decrement the refcount on the Message_Block we hold, it does not - // matter if we own the data or not, because we always own the - // message block (i.e. it is always cloned or duplicated. - ACE_Message_Block::release ((ACE_Message_Block *) this->cdr_); - this->cdr_ = 0; + // check if it is a self assignment + if (this == &src) + return *this; - // If we own any previous data, deallocate it. - this->free_value (ACE_TRY_ENV); - ACE_TRY_CHECK; - - if (this->type_ != 0) - { - CORBA::release (this->type_); - } + // Decrement the refcount on the Message_Block we hold, it does not + // matter if we own the data or not, because we always own the + // message block (i.e. it is always cloned or duplicated. + ACE_Message_Block::release ((ACE_Message_Block *) this->cdr_); + this->cdr_ = 0; - // Now copy the contents of the source to ourselves. - if (src.type_ != 0) - { - this->type_ = - CORBA::TypeCode::_duplicate (src.type_); - } - else - { - this->type_ = - CORBA::TypeCode::_duplicate (CORBA::_tc_null); - } + // If we own any previous data, deallocate it. + this->free_value (); - this->any_owns_data_ = 0; + if (this->type_ != 0) + { + CORBA::release (this->type_); + } - this->byte_order_ = src.byte_order_; - ACE_NEW_RETURN (this->cdr_, ACE_Message_Block, *this); - ACE_CDR::consolidate (this->cdr_, src.cdr_); - // Simply duplicate the cdr string here. We can save the decode - // operation if there's no need to extract the object. + // Now copy the contents of the source to ourselves. + if (src.type_ != 0) + { + this->type_ = + CORBA::TypeCode::_duplicate (src.type_); } - ACE_CATCHANY + else { - return *this; + this->type_ = + CORBA::TypeCode::_duplicate (CORBA::_tc_null); } - ACE_ENDTRY; + + this->byte_order_ = src.byte_order_; + ACE_NEW_RETURN (this->cdr_, ACE_Message_Block, *this); + ACE_CDR::consolidate (this->cdr_, src.cdr_); return *this; } @@ -238,29 +221,17 @@ CORBA_Any::operator= (const CORBA_Any &src) CORBA_Any::~CORBA_Any (void) { - ACE_DECLARE_NEW_CORBA_ENV; - - ACE_TRY - { - // decrement the refcount on the Message_Block we hold, it does not - // matter if we own the data or not, because we always own the - // message block (i.e. it is always cloned or duplicated. + // decrement the refcount on the Message_Block we hold, it does not + // matter if we own the data or not, because we always own the + // message block (i.e. it is always cloned or duplicated. - ACE_Message_Block::release (this->cdr_); - this->cdr_ = 0; + ACE_Message_Block::release (this->cdr_); + this->cdr_ = 0; - this->free_value (ACE_TRY_ENV); - ACE_TRY_CHECK; + this->free_value (); - if (this->type_) - CORBA::release (this->type_); - } - ACE_CATCHANY - { - // do nothing - } - ACE_ENDTRY; - ACE_CHECK; + if (this->type_) + CORBA::release (this->type_); } // TAO proprietary methods, used in the implementation of the >>= and @@ -269,8 +240,7 @@ CORBA_Any::~CORBA_Any (void) void CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, int byte_order, - const ACE_Message_Block *mb, - CORBA::Environment &ACE_TRY_ENV) + const ACE_Message_Block *mb) { // Decrement the refcount on the Message_Block we hold, it does not // matter if we own the data or not, because we always own the @@ -278,8 +248,7 @@ CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, ACE_Message_Block::release (this->cdr_); this->cdr_ = 0; - this->free_value (ACE_TRY_ENV); - ACE_CHECK; + this->free_value (); // Duplicate tc and then release this->type_, just in case tc and // type_ are the same thing. @@ -300,7 +269,7 @@ CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, const ACE_Message_Block *mb, CORBA::Boolean any_owns_data, void* value, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Any::_tao_destructor destructor) { // Decrement the refcount on the Message_Block we hold, it does not // matter if we own the data or not, because we always own the @@ -308,8 +277,7 @@ CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, ACE_Message_Block::release (this->cdr_); this->cdr_ = 0; - this->free_value (ACE_TRY_ENV); - ACE_CHECK; + this->free_value (); this->any_owns_data_ = any_owns_data; this->value_ = value; @@ -325,21 +293,7 @@ CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, ACE_CDR::consolidate (this->cdr_, mb); // We can save the decode operation if there's no need to extract // the object. -} -void -CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, - int byte_order, - const ACE_Message_Block *mb, - CORBA::Boolean any_owns_data, - void* value, - CORBA::Any::_tao_destructor destructor, - CORBA::Environment &ACE_TRY_ENV) -{ - this->_tao_replace (tc, byte_order, mb, - any_owns_data, value, - ACE_TRY_ENV); - ACE_CHECK; this->destructor_ = destructor; } @@ -347,10 +301,9 @@ void CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, CORBA::Boolean any_owns_data, void* value, - CORBA::Environment &ACE_TRY_ENV) + CORBA::Any::_tao_destructor destructor) { - this->free_value (ACE_TRY_ENV); - ACE_CHECK; + this->free_value (); this->any_owns_data_ = any_owns_data; this->value_ = value; @@ -360,38 +313,20 @@ CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, CORBA::TypeCode_ptr tmp = CORBA::TypeCode::_duplicate (tc); CORBA::release (this->type_); this->type_ = tmp; -} -void -CORBA_Any::_tao_replace (CORBA::TypeCode_ptr tc, - CORBA::Boolean any_owns_data, - void* value, - CORBA::Any::_tao_destructor destructor, - CORBA::Environment &ACE_TRY_ENV) -{ - this->_tao_replace (tc, any_owns_data, value, ACE_TRY_ENV); - ACE_CHECK; this->destructor_ = destructor; } // Free internal data. void -CORBA_Any::free_value (CORBA::Environment &ACE_TRY_ENV) +CORBA_Any::free_value (void) { - if (this->any_owns_data_ && this->value_ != 0) + if (this->any_owns_data_ + && this->value_ != 0 + && this->destructor_ != 0) { - if (this->destructor_ == 0) - { - // This is not exception safe. - DEEP_FREE (this->type_, this->value_, 0, ACE_TRY_ENV); - ACE_CHECK; - ::operator delete (this->value_); - } - else - { - (*this->destructor_) (this->value_); - } + (*this->destructor_) (this->value_); } this->any_owns_data_ = 0; this->value_ = 0; @@ -453,9 +388,7 @@ CORBA_Any::_tao_decode (TAO_InputCDR &cdr, // Stick it into the Any. It gets duplicated there. this->_tao_replace (this->type_, cdr.byte_order (), - &mb, - ACE_TRY_ENV); - ACE_CHECK; + &mb); } // insertion operators @@ -463,232 +396,102 @@ CORBA_Any::_tao_decode (TAO_InputCDR &cdr, void CORBA_Any::operator<<= (CORBA::Short s) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << s; - this->_tao_replace (CORBA::_tc_short, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Short insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << s; + this->_tao_replace (CORBA::_tc_short, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::UShort s) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << s; - this->_tao_replace (CORBA::_tc_ushort, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::UShort insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << s; + this->_tao_replace (CORBA::_tc_ushort, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::Long l) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << l; - this->_tao_replace (CORBA::_tc_long, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Long insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << l; + this->_tao_replace (CORBA::_tc_long, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::ULong l) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << l; - this->_tao_replace (CORBA::_tc_ulong, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::ULong insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << l; + this->_tao_replace (CORBA::_tc_ulong, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::LongLong l) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << l; - this->_tao_replace (CORBA::_tc_longlong, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::LongLong insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << l; + this->_tao_replace (CORBA::_tc_longlong, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::ULongLong l) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << l; - this->_tao_replace (CORBA::_tc_ulonglong, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::ULongLong insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << l; + this->_tao_replace (CORBA::_tc_ulonglong, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::Float f) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << f; - this->_tao_replace (CORBA::_tc_float, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Float insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << f; + this->_tao_replace (CORBA::_tc_float, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::Double d) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << d; - this->_tao_replace (CORBA::_tc_double, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Double insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << d; + this->_tao_replace (CORBA::_tc_double, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::LongDouble d) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << d; - this->_tao_replace (CORBA::_tc_longdouble, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::LongDouble insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << d; + this->_tao_replace (CORBA::_tc_longdouble, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } // insertion of Any - copying void CORBA_Any::operator<<= (const CORBA_Any& a) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << a; - this->_tao_replace (CORBA::_tc_any, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Any copying insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << a; + this->_tao_replace (CORBA::_tc_any, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } // insertion of Any - non-copying @@ -702,27 +505,14 @@ CORBA::Any::_tao_any_destructor (void *x) void CORBA::Any::operator<<= (CORBA::Any* a) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << *a; - this->_tao_replace (CORBA::_tc_any, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - a, - CORBA::Any::_tao_any_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Any non-copying insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << *a; + this->_tao_replace (CORBA::_tc_any, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + a, + CORBA::Any::_tao_any_destructor); } // implementing the special types @@ -730,117 +520,51 @@ CORBA::Any::operator<<= (CORBA::Any* a) void CORBA_Any::operator<<= (from_boolean b) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << b; - this->_tao_replace (CORBA::_tc_boolean, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Boolean insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << b; + this->_tao_replace (CORBA::_tc_boolean, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (from_octet o) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << o; - this->_tao_replace (CORBA::_tc_octet, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Octet insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << o; + this->_tao_replace (CORBA::_tc_octet, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (from_char c) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << c; - this->_tao_replace (CORBA::_tc_char, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Char insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << c; + this->_tao_replace (CORBA::_tc_char, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (from_wchar wc) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - TAO_OutputCDR stream; - stream << wc; - this->_tao_replace (CORBA::_tc_wchar, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::WChar insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << wc; + this->_tao_replace (CORBA::_tc_wchar, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void CORBA_Any::operator<<= (CORBA::TypeCode_ptr tc) { - ACE_DECLARE_NEW_CORBA_ENV; - - ACE_TRY - { - TAO_OutputCDR stream; - stream << tc; - this->_tao_replace (CORBA::_tc_TypeCode, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::TypeCode_ptr insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << tc; + this->_tao_replace (CORBA::_tc_TypeCode, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void @@ -856,9 +580,7 @@ CORBA_Any::operator<<= (const CORBA_Exception &exception) this->_tao_replace (exception._type (), TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; + stream.begin ()); } ACE_CATCHANY { @@ -889,26 +611,12 @@ CORBA::Any::operator<<= (CORBA::Object_ptr *objptr) if (objptr == 0) return; // @@ Should we raise an exception? - ACE_DECLARE_NEW_CORBA_ENV; - - ACE_TRY - { - TAO_OutputCDR stream; - stream << *objptr; - delete objptr; - this->_tao_replace (CORBA::_tc_Object, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in CORBA::Object_ptr insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << *objptr; + delete objptr; + this->_tao_replace (CORBA::_tc_Object, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } // Insertion of from_string. @@ -916,133 +624,105 @@ CORBA::Any::operator<<= (CORBA::Object_ptr *objptr) void CORBA_Any::operator<<= (from_string s) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_OutputCDR stream; + stream << s; - ACE_TRY - { - TAO_OutputCDR stream; - stream << s; - - // If the inserted string is bounded, we create a typecode. - static CORBA::Long _oc_string [] = - { - // CDR typecode octets - TAO_ENCAP_BYTE_ORDER, // native endian + padding; "tricky" - 0 // ... unbounded string to start with - }; + // If the inserted string is bounded, we create a typecode. + static CORBA::Long _oc_string [] = + { + // CDR typecode octets + TAO_ENCAP_BYTE_ORDER, // native endian + padding; "tricky" + 0 // ... unbounded string to start with + }; - CORBA::TypeCode_ptr tc = 0; + CORBA::TypeCode_ptr tc = 0; - if (s.bound_ > 0) - { - // Bounded string. - _oc_string [1] = s.bound_; - // @@ It seems like this could be leaked! - ACE_NEW (tc, - CORBA::TypeCode (CORBA::tk_string, - sizeof _oc_string, - (char *) &_oc_string, - 1, - sizeof (CORBA::String_var))); - } - else - { - tc = CORBA::_tc_string; // unbounded. - } - - char *tmp; - // Non-copying. - if (s.nocopy_) - { - tmp = s.val_; - } - else - { - tmp = CORBA::string_dup (s.val_); - } + if (s.bound_ > 0) + { + // Bounded string. + _oc_string [1] = s.bound_; + // @@ It seems like this could be leaked! + ACE_NEW (tc, + CORBA::TypeCode (CORBA::tk_string, + sizeof _oc_string, + (char *) &_oc_string, + 1, + sizeof (CORBA::String_var))); + } + else + { + tc = CORBA::_tc_string; // unbounded. + } - this->_tao_replace (tc, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - tmp, - CORBA::Any::_tao_any_string_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + char *tmp; + // Non-copying. + if (s.nocopy_) + { + tmp = s.val_; } - ACE_CATCHANY + else { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in bounded string insertion\n"))); + tmp = CORBA::string_dup (s.val_); } - ACE_ENDTRY; - ACE_CHECK; + + this->_tao_replace (tc, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + tmp, + CORBA::Any::_tao_any_string_destructor); } void CORBA_Any::operator<<= (from_wstring ws) { - ACE_DECLARE_NEW_CORBA_ENV; - - ACE_TRY - { - TAO_OutputCDR stream; - stream << ws; + TAO_OutputCDR stream; + stream << ws; - // If the inserted string is bounded, we create a typecode. - static CORBA::Long _oc_wstring [] = - { - // CDR typecode octets - TAO_ENCAP_BYTE_ORDER, // native endian + padding; "tricky" - 0 // ... unbounded string to start with - }; + // If the inserted string is bounded, we create a typecode. + static CORBA::Long _oc_wstring [] = + { + // CDR typecode octets + TAO_ENCAP_BYTE_ORDER, // native endian + padding; "tricky" + 0 // ... unbounded string to start with + }; - CORBA::TypeCode_ptr tc = 0; - - if (ws.bound_ > 0) - { - // Bounded string. - _oc_wstring [1] = ws.bound_; - // @@ TODO It seems like this is leaked! - ACE_NEW (tc, - CORBA::TypeCode (CORBA::tk_wstring, - sizeof _oc_wstring, - (char *) &_oc_wstring, - 1, - sizeof (CORBA::WString_var))); - } - else - { - tc = CORBA::_tc_wstring; // unbounded. - } + CORBA::TypeCode_ptr tc = 0; - CORBA::WChar *tmp; - // Non-copying. - if (ws.nocopy_) - { - tmp = ws.val_; - } - else - { - tmp = CORBA::wstring_dup (ws.val_); - } + if (ws.bound_ > 0) + { + // Bounded string. + _oc_wstring [1] = ws.bound_; + // @@ TODO It seems like this is leaked! + ACE_NEW (tc, + CORBA::TypeCode (CORBA::tk_wstring, + sizeof _oc_wstring, + (char *) &_oc_wstring, + 1, + sizeof (CORBA::WString_var))); + } + else + { + tc = CORBA::_tc_wstring; // unbounded. + } - this->_tao_replace (tc, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - tmp, - CORBA::Any::_tao_any_wstring_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::WChar *tmp; + // Non-copying. + if (ws.nocopy_) + { + tmp = ws.val_; } - ACE_CATCHANY + else { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in bounded wstring insertion\n"))); + tmp = CORBA::wstring_dup (ws.val_); } - ACE_ENDTRY; - ACE_CHECK; + + this->_tao_replace (tc, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + tmp, + CORBA::Any::_tao_any_wstring_destructor); } // Extraction: these are safe and hence we have to check that the @@ -1375,9 +1055,7 @@ CORBA_Any::operator>>= (const CORBA::Any *&a) const this)->_tao_replace (CORBA::_tc_any, 1, ACE_static_cast(CORBA::Any*,tmp), - CORBA::Any::_tao_any_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::Any::_tao_any_destructor); ACE_const_cast (CORBA::Any *&, a) = tmp._retn (); return 1; @@ -1436,9 +1114,7 @@ CORBA_Any::operator>>= (const char *&s) const this)->_tao_replace (CORBA::_tc_string, 1, tmp.inout (), - CORBA::Any::_tao_any_string_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::Any::_tao_any_string_destructor); s = tmp._retn (); return 1; @@ -1493,9 +1169,7 @@ CORBA_Any::operator>>= (const CORBA::WChar *&s) const this)->_tao_replace (CORBA::_tc_wstring, 1, tmp.inout (), - CORBA::Any::_tao_any_wstring_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::Any::_tao_any_wstring_destructor); s = tmp._retn (); return 1; @@ -1549,9 +1223,7 @@ CORBA_Any::operator>>= (CORBA::TypeCode_ptr &tc) const this)->_tao_replace (CORBA::_tc_TypeCode, 1, tmp.in (), - CORBA::Any::_tao_any_tc_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::Any::_tao_any_tc_destructor); tc = tmp._retn (); return 1; @@ -1731,9 +1403,7 @@ CORBA_Any::operator>>= (to_string s) const this)->_tao_replace (CORBA::_tc_string, 1, ACE_static_cast(char*,tmp), - CORBA::Any::_tao_any_string_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::Any::_tao_any_string_destructor); s.val_ = tmp._retn (); return 1; @@ -1795,9 +1465,7 @@ CORBA_Any::operator>>= (to_wstring ws) const this)->_tao_replace (CORBA::_tc_string, 1, ACE_static_cast(CORBA::WChar*,tmp), - CORBA::Any::_tao_any_wstring_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::Any::_tao_any_wstring_destructor); ws.val_ = tmp._retn (); return 1; @@ -1838,14 +1506,25 @@ CORBA_Any::operator>>= (to_object obj) const if (kind != CORBA::tk_objref) return 0; - if (this->any_owns_data_ && this->value_) - { - // CORBA 2.3 has changed the behavior of this operator. Caller - // is now responsible for release. - obj.ref_ = - CORBA::Object::_duplicate (*(CORBA::Object_ptr *)this->value_); - return 1; - } + // It is hard to apply this optimization, because value_ points + // to a derived class from CORBA::Object, and with multiple + // virtual inheritance. One posibility is to use a helper + // function to upcast from void* to CORBA::Object_ptr, but this + // is only useful to implement the >>=(to_object) operator, + // which is very rarely used. + // It is better to just demarshal the object everytime, + // specially because the caller is owns the returned object. + // + // if (this->any_owns_data_ && this->value_) + // { + // // CORBA 2.3 has changed the behavior of this operator. Caller + // // is now responsible for release. + // obj.ref_ = + // CORBA::Object::_duplicate ( + // (*this->upcast_) (this->value_) + // ); + // return 1; + // } // @@ This uses ORB_Core instance because we need one to // demarshal objects (to create the right profiles for that @@ -1873,50 +1552,22 @@ CORBA_Any::operator>>= (to_object obj) const void CORBA_Any::operator<<= (const char* s) { - ACE_DECLARE_NEW_CORBA_ENV; - - ACE_TRY - { - TAO_OutputCDR stream; - stream << s; - this->_tao_replace (CORBA::_tc_string, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in unbounded string insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << s; + this->_tao_replace (CORBA::_tc_string, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } // and the version for unbounded wide string void CORBA_Any::operator<<= (const CORBA::WChar* s) { - ACE_DECLARE_NEW_CORBA_ENV; - - ACE_TRY - { - TAO_OutputCDR stream; - stream << s; - this->_tao_replace (CORBA::_tc_wstring, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("Exception in unbounded wstring insertion\n"))); - } - ACE_ENDTRY; - ACE_CHECK; + TAO_OutputCDR stream; + stream << s; + this->_tao_replace (CORBA::_tc_wstring, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } CORBA::Boolean @@ -1985,9 +1636,7 @@ operator>> (TAO_InputCDR &cdr, // Stick it into the Any. It gets duplicated there. x._tao_replace (tc.in (), cdr.byte_order (), - &mb, - ACE_TRY_ENV); - ACE_CHECK; + &mb); } ACE_CATCH (CORBA_Exception, ex) { diff --git a/TAO/tao/Any.h b/TAO/tao/Any.h index f0c403f0be3..f3cf7d7a819 100644 --- a/TAO/tao/Any.h +++ b/TAO/tao/Any.h @@ -336,8 +336,7 @@ public: void _tao_replace (CORBA::TypeCode_ptr, int byte_order, - const ACE_Message_Block *mb, - CORBA::Environment &ACE_TRY_ENV); + const ACE_Message_Block *mb); // Replace via message block instead of <value_>. void _tao_replace (CORBA::TypeCode_ptr type, @@ -345,25 +344,13 @@ public: const ACE_Message_Block *mb, CORBA::Boolean any_owns_data, void* value, - CORBA::Environment &ACE_TRY_ENV); - void _tao_replace (CORBA::TypeCode_ptr type, - int byte_order, - const ACE_Message_Block *mb, - CORBA::Boolean any_owns_data, - void* value, - CORBA::Any::_tao_destructor destructor, - CORBA::Environment &ACE_TRY_ENV); + CORBA::Any::_tao_destructor destructor); // Replace all the contents of the any, used in the <<= operators. void _tao_replace (CORBA::TypeCode_ptr type, CORBA::Boolean any_owns_data, void* value, - CORBA::Environment &ACE_TRY_ENV); - void _tao_replace (CORBA::TypeCode_ptr type, - CORBA::Boolean any_owns_data, - void* value, - CORBA::Any::_tao_destructor destructor, - CORBA::Environment &ACE_TRY_ENV); + CORBA::Any::_tao_destructor destructor); // Replace the value of the Any, used in the >>= operators. void _tao_encode (TAO_OutputCDR &cdr, @@ -388,7 +375,7 @@ public: // Used to release Anys contained into anys. protected: - void free_value (CORBA::Environment &ACE_TRY_ENV); + void free_value (void); // Release the <value_>. private: @@ -408,7 +395,6 @@ private: CORBA::Any::_tao_destructor destructor_; // If not zero this is the function used to destroy objects. - // 94-9-14 hides unsigned char insert/extract void operator<<= (unsigned char); CORBA::Boolean operator>>= (unsigned char&) const; diff --git a/TAO/tao/BoundsC.cpp b/TAO/tao/BoundsC.cpp index 942cdf15433..e614c6897da 100644 --- a/TAO/tao/BoundsC.cpp +++ b/TAO/tao/BoundsC.cpp @@ -93,39 +93,23 @@ CORBA::Exception *CORBA_Bounds::_alloc (void) void operator<<= (CORBA::Any &_tao_any, const CORBA::Bounds &_tao_elem) { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace (CORBA::_tc_Bounds, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace (CORBA::_tc_Bounds, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } void operator<<= (CORBA::Any &_tao_any, CORBA::Bounds *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace (CORBA::_tc_Bounds, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - CORBA::Bounds::_tao_any_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY {} - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace (CORBA::_tc_Bounds, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CORBA::Bounds::_tao_any_destructor); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Bounds *&_tao_elem) @@ -152,9 +136,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Bounds *&_tao_ele CORBA::_tc_Bounds, 1, ACE_reinterpret_cast (void*, _tao_elem), - CORBA::Bounds::_tao_any_destructor, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::Bounds::_tao_any_destructor); return 1; } else diff --git a/TAO/tao/BoundsC.h b/TAO/tao/BoundsC.h index 24964583da5..6232646cbaf 100644 --- a/TAO/tao/BoundsC.h +++ b/TAO/tao/BoundsC.h @@ -47,7 +47,6 @@ CORBA_Bounds (void); // default ctor CORBA_Bounds (const CORBA_Bounds &); // copy ctor ~CORBA_Bounds (void); // dtor - static void _tao_any_destructor (void*); CORBA_Bounds &operator= (const CORBA_Bounds &); @@ -59,7 +58,7 @@ CORBA::Environment &); static CORBA_Bounds *_narrow (CORBA::Exception *); - + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); diff --git a/TAO/tao/CONV_FRAMEC.cpp b/TAO/tao/CONV_FRAMEC.cpp index 268aa91a095..c9f880f52c1 100644 --- a/TAO/tao/CONV_FRAMEC.cpp +++ b/TAO/tao/CONV_FRAMEC.cpp @@ -290,47 +290,27 @@ TAO_NAMESPACE_END void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponent &_tao_elem) // copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetComponent, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetComponent, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponent *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetComponent, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - CONV_FRAME::CodeSetComponent::_tao_any_destructor, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetComponent, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CONV_FRAME::CodeSetComponent::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponent *&_tao_elem) @@ -362,10 +342,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo CONV_FRAME::_tc_CodeSetComponent, 1, ACE_reinterpret_cast (void *, _tao_elem), - CONV_FRAME::CodeSetComponent::_tao_any_destructor, - ACE_TRY_ENV + CONV_FRAME::CodeSetComponent::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -414,10 +392,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe CONV_FRAME::_tc_CodeSetComponent, 1, ACE_const_cast (CONV_FRAME::CodeSetComponent *&, _tao_elem), - CONV_FRAME::CodeSetComponent::_tao_any_destructor, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; + CONV_FRAME::CodeSetComponent::_tao_any_destructor + ); return 1; } else @@ -439,47 +415,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponentInfo &_tao_elem) // copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetComponentInfo, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetComponentInfo, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponentInfo *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetComponentInfo, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetComponentInfo, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetComponentInfo *&_tao_elem) @@ -511,10 +467,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetCompo CONV_FRAME::_tc_CodeSetComponentInfo, 1, ACE_reinterpret_cast (void *, _tao_elem), - CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor, - ACE_TRY_ENV + CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -563,10 +517,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe CONV_FRAME::_tc_CodeSetComponentInfo, 1, ACE_reinterpret_cast (void *, ACE_const_cast (CONV_FRAME::CodeSetComponentInfo *&, _tao_elem)), - CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor, - ACE_TRY_ENV + CONV_FRAME::CodeSetComponentInfo::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -588,47 +540,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetContext &_tao_elem) // copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetContext, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetContext, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, CONV_FRAME::CodeSetContext *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - CONV_FRAME::_tc_CodeSetContext, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - CONV_FRAME::CodeSetContext::_tao_any_destructor, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + CONV_FRAME::_tc_CodeSetContext, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CONV_FRAME::CodeSetContext::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetContext *&_tao_elem) @@ -660,10 +592,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CONV_FRAME::CodeSetConte CONV_FRAME::_tc_CodeSetContext, 1, ACE_reinterpret_cast (void *, _tao_elem), - CONV_FRAME::CodeSetContext::_tao_any_destructor, - ACE_TRY_ENV + CONV_FRAME::CodeSetContext::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -712,10 +642,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CONV_FRAME::CodeSe CONV_FRAME::_tc_CodeSetContext, 1, ACE_reinterpret_cast (void *, ACE_const_cast (CONV_FRAME::CodeSetContext *&, _tao_elem)), - CONV_FRAME::CodeSetContext::_tao_any_destructor, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; + CONV_FRAME::CodeSetContext::_tao_any_destructor + ); return 1; } else diff --git a/TAO/tao/CurrentC.cpp b/TAO/tao/CurrentC.cpp index b1179f411d4..9e85770ae97 100644 --- a/TAO/tao/CurrentC.cpp +++ b/TAO/tao/CurrentC.cpp @@ -89,24 +89,15 @@ const char* CORBA_Current::_interface_repository_id (void) const void operator<<= (CORBA::Any &_tao_any, CORBA::Current_ptr _tao_elem) { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - if (stream << _tao_elem) + TAO_OutputCDR stream; + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_Current, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } } - ACE_CATCHANY - { - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Current_ptr &_tao_elem) @@ -133,10 +124,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Current_ptr &_tao CORBA::_tc_Current, 1, _tao_elem, - CORBA::Current::_tao_any_destructor, - ACE_TRY_ENV + CORBA::Current::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } } diff --git a/TAO/tao/DomainC.cpp b/TAO/tao/DomainC.cpp index 037431430d9..32f34b4199f 100644 --- a/TAO/tao/DomainC.cpp +++ b/TAO/tao/DomainC.cpp @@ -346,24 +346,15 @@ void CORBA_DomainManager::_tao_any_destructor (void* x) void operator<<= (CORBA::Any &_tao_any, CORBA::DomainManager_ptr _tao_elem) { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - if (stream << _tao_elem) + TAO_OutputCDR stream; + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_DomainManager, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DomainManager_ptr &_tao_elem) @@ -395,10 +386,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DomainManager_ptr CORBA::_tc_DomainManager, 1, _tao_elem, - CORBA::DomainManager::_tao_any_destructor, - ACE_TRY_ENV + CORBA::DomainManager::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } } @@ -430,24 +419,15 @@ CORBA_ConstructionPolicy::_tao_any_destructor (void *x) void operator<<= (CORBA::Any &_tao_any, CORBA::ConstructionPolicy_ptr _tao_elem) { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_ConstructionPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstructionPolicy_ptr &_tao_elem) @@ -479,10 +459,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstructionPolic CORBA::_tc_ConstructionPolicy, 1, _tao_elem, - CORBA::ConstructionPolicy::_tao_any_destructor, - ACE_TRY_ENV + CORBA::ConstructionPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } } @@ -514,47 +492,29 @@ void operator<<= ( const CORBA::DomainManagerList &_tao_elem ) // copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_DomainManagerList, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; } void operator<<= (CORBA::Any &_tao_any, CORBA::DomainManagerList *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - CORBA::_tc_DomainManagerList, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - CORBA::DomainManagerList::_tao_any_destructor, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + CORBA::_tc_DomainManagerList, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CORBA::DomainManagerList::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DomainManagerList *&_tao_elem) @@ -586,10 +546,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DomainManagerList CORBA::_tc_DomainManagerList, 1, ACE_reinterpret_cast (void *, _tao_elem), - CORBA::DomainManagerList::_tao_any_destructor, - ACE_TRY_ENV + CORBA::DomainManagerList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else diff --git a/TAO/tao/DynAnyC.h b/TAO/tao/DynAnyC.h index 923656cb380..f5c45ef668e 100644 --- a/TAO/tao/DynAnyC.h +++ b/TAO/tao/DynAnyC.h @@ -96,7 +96,7 @@ private: CORBA_DynAny_ptr &ptr_; }; -class TAO_Export CORBA_DynAny : public virtual ACE_CORBA_1 (Object) +class TAO_Export CORBA_DynAny : public virtual CORBA_Object { public: #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 diff --git a/TAO/tao/DynAny_i.cpp b/TAO/tao/DynAny_i.cpp index d627f41fd85..0df5b4fda22 100644 --- a/TAO/tao/DynAny_i.cpp +++ b/TAO/tao/DynAny_i.cpp @@ -433,10 +433,8 @@ TAO_DynAny_i::insert_reference (CORBA::Object_ptr value, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - obj.in (), - CORBA::Object::_tao_any_destructor, - ACE_TRY_ENV); - ACE_CHECK; + obj._retn (), + CORBA::Object::_tao_any_destructor); } else { diff --git a/TAO/tao/GIOPC.cpp b/TAO/tao/GIOPC.cpp index 202e7c59179..a18efda7ed7 100644 --- a/TAO/tao/GIOPC.cpp +++ b/TAO/tao/GIOPC.cpp @@ -397,46 +397,27 @@ GIOP::IORAddressingInfo::_tao_any_destructor (void *x) void operator<<= (CORBA::Any &_tao_any, const GIOP::IORAddressingInfo &_tao_elem) // copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - GIOP::_tc_IORAddressingInfo, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + GIOP::_tc_IORAddressingInfo, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, GIOP::IORAddressingInfo *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - GIOP::_tc_IORAddressingInfo, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - GIOP::IORAddressingInfo::_tao_any_destructor, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + GIOP::_tc_IORAddressingInfo, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + GIOP::IORAddressingInfo::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, GIOP::IORAddressingInfo *&_tao_elem) @@ -468,10 +449,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, GIOP::IORAddressingInfo GIOP::_tc_IORAddressingInfo, 1, ACE_reinterpret_cast (void *, _tao_elem), - GIOP::IORAddressingInfo::_tao_any_destructor, - ACE_TRY_ENV + GIOP::IORAddressingInfo::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -485,7 +464,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, GIOP::IORAddressingInfo { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -508,24 +487,15 @@ void operator<<= ( const GIOP::TargetAddress &_tao_elem ) { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - if (stream << _tao_elem) + TAO_OutputCDR stream; + if (stream << _tao_elem) { _tao_any._tao_replace ( GIOP::_tc_TargetAddress, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; } void operator<<= ( @@ -533,10 +503,8 @@ void operator<<= ( GIOP::TargetAddress *_tao_elem ) { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - if (stream << *_tao_elem) + TAO_OutputCDR stream; + if (stream << *_tao_elem) { _tao_any._tao_replace ( GIOP::_tc_TargetAddress, @@ -544,16 +512,9 @@ void operator<<= ( stream.begin (), 1, _tao_elem, - GIOP::IORAddressingInfo::_tao_any_destructor, - ACE_TRY_ENV + GIOP::IORAddressingInfo::_tao_any_destructor ); - ACE_TRY_CHECK; } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; } CORBA::Boolean operator>>= ( @@ -582,17 +543,15 @@ CORBA::Boolean operator>>= ( _tao_any._tao_get_cdr (), _tao_any._tao_byte_order () ); - + if (stream >> *_tao_elem) { ((CORBA::Any *)&_tao_any)->_tao_replace ( GIOP::_tc_TargetAddress, 1, ACE_reinterpret_cast (void *, _tao_elem), - GIOP::IORAddressingInfo::_tao_any_destructor, - ACE_TRY_ENV + GIOP::IORAddressingInfo::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else diff --git a/TAO/tao/IOPC.cpp b/TAO/tao/IOPC.cpp index 63a24296780..ec55e3b7187 100644 --- a/TAO/tao/IOPC.cpp +++ b/TAO/tao/IOPC.cpp @@ -537,34 +537,23 @@ 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 = 0; - ACE_NEW (_any_val, IOP::TaggedProfile (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( IOP::_tc_TaggedProfile, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void IOP::TaggedProfile::_tao_any_destructor (void *x) +{ + IOP::TaggedProfile *tmp = ACE_const_cast(IOP::TaggedProfile*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, IOP::TaggedProfile *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -573,16 +562,8 @@ void operator<<= (CORBA::Any &_tao_any, IOP::TaggedProfile *_tao_elem) // non co stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + IOP::TaggedProfile::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedProfile *&_tao_elem) @@ -614,9 +595,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedProfile *&_ta IOP::_tc_TaggedProfile, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + IOP::TaggedProfile::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -630,7 +610,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedProfile *&_ta { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -665,9 +645,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedProfile IOP::_tc_TaggedProfile, 1, ACE_reinterpret_cast (void *, ACE_const_cast (IOP::TaggedProfile *&, _tao_elem)), - ACE_TRY_ENV + IOP::TaggedProfile::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -681,7 +660,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedProfile { delete ACE_const_cast (IOP::TaggedProfile *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -689,34 +668,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedProfile void operator<<= (CORBA::Any &_tao_any, const IOP::IOR &_tao_elem) // copying { - IOP::IOR *_any_val = 0; - ACE_NEW (_any_val, IOP::IOR (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( IOP::_tc_IOR, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void IOP::IOR::_tao_any_destructor (void *x) +{ + IOP::IOR *tmp = ACE_const_cast(IOP::IOR*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, IOP::IOR *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -725,16 +693,8 @@ void operator<<= (CORBA::Any &_tao_any, IOP::IOR *_tao_elem) // non copying stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + IOP::IOR::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::IOR *&_tao_elem) @@ -766,9 +726,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::IOR *&_tao_elem) IOP::_tc_IOR, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + IOP::IOR::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -782,7 +741,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::IOR *&_tao_elem) { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -817,9 +776,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::IOR *&_tao_el IOP::_tc_IOR, 1, ACE_reinterpret_cast (void *, ACE_const_cast (IOP::IOR *&, _tao_elem)), - ACE_TRY_ENV + IOP::IOR::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -833,7 +791,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::IOR *&_tao_el { delete ACE_const_cast (IOP::IOR *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -841,34 +799,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::IOR *&_tao_el void operator<<= (CORBA::Any &_tao_any, const IOP::TaggedComponent &_tao_elem) // copying { - IOP::TaggedComponent *_any_val = 0; - ACE_NEW (_any_val, IOP::TaggedComponent (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( IOP::_tc_TaggedComponent, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void IOP::TaggedComponent::_tao_any_destructor (void *x) +{ + IOP::TaggedComponent *tmp = ACE_const_cast(IOP::TaggedComponent*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, IOP::TaggedComponent *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -877,16 +824,8 @@ void operator<<= (CORBA::Any &_tao_any, IOP::TaggedComponent *_tao_elem) // non stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + IOP::TaggedComponent::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedComponent *&_tao_elem) @@ -918,9 +857,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedComponent *&_ IOP::_tc_TaggedComponent, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + IOP::TaggedComponent::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -934,7 +872,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedComponent *&_ { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -969,9 +907,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedCompone IOP::_tc_TaggedComponent, 1, ACE_reinterpret_cast (void *, ACE_const_cast (IOP::TaggedComponent *&, _tao_elem)), - ACE_TRY_ENV + IOP::TaggedComponent::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -985,7 +922,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedCompone { delete ACE_const_cast (IOP::TaggedComponent *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -996,40 +933,25 @@ void operator<<= ( const IOP::MultipleComponentProfile &_tao_elem ) // copying { - IOP::MultipleComponentProfile *_tao_any_val; - ACE_NEW (_tao_any_val, IOP::MultipleComponentProfile (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( IOP::_tc_MultipleComponentProfile, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void IOP::MultipleComponentProfile::_tao_any_destructor (void *x) +{ + IOP::MultipleComponentProfile *tmp = ACE_const_cast(IOP::MultipleComponentProfile*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, IOP::MultipleComponentProfile *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1038,16 +960,8 @@ void operator<<= (CORBA::Any &_tao_any, IOP::MultipleComponentProfile *_tao_elem stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + IOP::MultipleComponentProfile::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::MultipleComponentProfile *&_tao_elem) @@ -1079,9 +993,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::MultipleComponentPr IOP::_tc_MultipleComponentProfile, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + IOP::MultipleComponentProfile::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1095,7 +1008,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::MultipleComponentPr { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1130,9 +1043,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::MultipleCompo IOP::_tc_MultipleComponentProfile, 1, ACE_reinterpret_cast (void *, ACE_const_cast (IOP::MultipleComponentProfile *&, _tao_elem)), - ACE_TRY_ENV + IOP::MultipleComponentProfile::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1146,7 +1058,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::MultipleCompo { delete ACE_const_cast (IOP::MultipleComponentProfile *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1154,34 +1066,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::MultipleCompo void operator<<= (CORBA::Any &_tao_any, const IOP::ServiceContext &_tao_elem) // copying { - IOP::ServiceContext *_any_val = 0; - ACE_NEW (_any_val, IOP::ServiceContext (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( IOP::_tc_ServiceContext, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void IOP::ServiceContext::_tao_any_destructor (void *x) +{ + IOP::ServiceContext *tmp = ACE_const_cast(IOP::ServiceContext*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, IOP::ServiceContext *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1190,16 +1091,8 @@ void operator<<= (CORBA::Any &_tao_any, IOP::ServiceContext *_tao_elem) // non c stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + IOP::ServiceContext::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContext *&_tao_elem) @@ -1231,9 +1124,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContext *&_t IOP::_tc_ServiceContext, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + IOP::ServiceContext::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1247,7 +1139,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContext *&_t { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1282,9 +1174,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::ServiceContex IOP::_tc_ServiceContext, 1, ACE_reinterpret_cast (void *, ACE_const_cast (IOP::ServiceContext *&, _tao_elem)), - ACE_TRY_ENV + IOP::ServiceContext::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1298,7 +1189,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::ServiceContex { delete ACE_const_cast (IOP::ServiceContext *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1309,40 +1200,25 @@ void operator<<= ( const IOP::ServiceContextList &_tao_elem ) // copying { - IOP::ServiceContextList *_tao_any_val; - ACE_NEW (_tao_any_val, IOP::ServiceContextList (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( IOP::_tc_ServiceContextList, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void IOP::ServiceContextList::_tao_any_destructor (void *x) +{ + IOP::ServiceContextList *tmp = ACE_const_cast(IOP::ServiceContextList*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, IOP::ServiceContextList *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1351,16 +1227,8 @@ void operator<<= (CORBA::Any &_tao_any, IOP::ServiceContextList *_tao_elem) // n stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + IOP::ServiceContextList::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContextList *&_tao_elem) @@ -1392,9 +1260,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContextList IOP::_tc_ServiceContextList, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + IOP::ServiceContextList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1408,7 +1275,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::ServiceContextList { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1443,9 +1310,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::ServiceContex IOP::_tc_ServiceContextList, 1, ACE_reinterpret_cast (void *, ACE_const_cast (IOP::ServiceContextList *&, _tao_elem)), - ACE_TRY_ENV + IOP::ServiceContextList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1459,7 +1325,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::ServiceContex { delete ACE_const_cast (IOP::ServiceContextList *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; diff --git a/TAO/tao/IOPC.h b/TAO/tao/IOPC.h index 286278acd76..471d9372fd9 100644 --- a/TAO/tao/IOPC.h +++ b/TAO/tao/IOPC.h @@ -52,6 +52,8 @@ TAO_NAMESPACE IOP struct TAO_Export TaggedProfile { + static void _tao_any_destructor (void*); + ProfileId tag; class TAO_Export _tao_seq_Octet : public TAO_Unbounded_Sequence<CORBA::Octet> @@ -130,6 +132,8 @@ TAO_NAMESPACE IOP struct TAO_Export IOR { + static void _tao_any_destructor (void*); + TAO_String_Manager type_id; @@ -209,6 +213,8 @@ TAO_NAMESPACE IOP struct TAO_Export TaggedComponent { + static void _tao_any_destructor (void*); + ComponentId tag; class TAO_Export _tao_seq_Octet : public TAO_Unbounded_Sequence<CORBA::Octet> @@ -299,6 +305,8 @@ TAO_NAMESPACE IOP ); MultipleComponentProfile (const MultipleComponentProfile &); // copy ctor ~MultipleComponentProfile (void); // dtor + + static void _tao_any_destructor (void*); }; typedef MultipleComponentProfile *MultipleComponentProfile_ptr; @@ -403,6 +411,8 @@ TAO_NAMESPACE IOP struct TAO_Export ServiceContext { + static void _tao_any_destructor (void*); + ServiceId context_id; // ************************************************************* @@ -497,6 +507,8 @@ TAO_NAMESPACE IOP ); ServiceContextList (const ServiceContextList &); // copy ctor ~ServiceContextList (void); // dtor + + static void _tao_any_destructor (void*); }; typedef ServiceContextList *ServiceContextList_ptr; @@ -574,53 +586,53 @@ TAO_NAMESPACE IOP } TAO_NAMESPACE_CLOSE // module IOP -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const IOP::TaggedProfile &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, IOP::TaggedProfile*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::TaggedProfile *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::TaggedProfile *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const IOP::IOR &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, IOP::IOR*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::IOR *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::IOR *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const IOP::TaggedComponent &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, IOP::TaggedComponent*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::TaggedComponent *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::TaggedComponent *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const IOP::MultipleComponentProfile &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, IOP::MultipleComponentProfile*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::MultipleComponentProfile *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::MultipleComponentProfile *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const IOP::ServiceContext &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, IOP::ServiceContext*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::ServiceContext *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::ServiceContext *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const IOP::ServiceContextList &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, IOP::ServiceContextList*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::ServiceContextList *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 bf314cce209..f1b9286fdc6 100644 --- a/TAO/tao/IORC.cpp +++ b/TAO/tao/IORC.cpp @@ -459,47 +459,31 @@ TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_TAO_IOR_Manipulation, &_tc_TAO_tc TAO_NAMESPACE_END void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation_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 = TAO_IOP::TAO_IOR_Manipulation::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - TAO_IOP::_tc_TAO_IOR_Manipulation, + TAO_IOP::_tc_TAO_IOR_Manipulation, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void TAO_IOP::TAO_IOR_Manipulation::_tao_any_destructor (void *x) +{ + TAO_IOP::TAO_IOR_Manipulation *tmp = ACE_static_cast(TAO_IOP::TAO_IOR_Manipulation*,x); + CORBA::release (tmp); } 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->equivalent (TAO_IOP::_tc_TAO_IOR_Manipulation, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -512,24 +496,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul { _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)->_tao_replace ( TAO_IOP::_tc_TAO_IOR_Manipulation, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + TAO_IOP::TAO_IOR_Manipulation::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = TAO_IOP::TAO_IOR_Manipulation::_nil (); return 0; } @@ -549,34 +526,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)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList::_tao_any_destructor (void *x) +{ + TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *tmp = ACE_static_cast(TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -585,16 +551,8 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::EmptyProf stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&_tao_elem) @@ -626,9 +584,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul TAO_IOP::TAO_IOR_Manipulation::_tc_EmptyProfileList, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -642,7 +599,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -650,85 +607,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul 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; + return _tao_any >>= ACE_const_cast(TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&,_tao_elem); } 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)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void TAO_IOP::TAO_IOR_Manipulation::NotFound::_tao_any_destructor (void *x) +{ + TAO_IOP::TAO_IOR_Manipulation::NotFound *tmp = ACE_static_cast(TAO_IOP::TAO_IOR_Manipulation::NotFound*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::NotFound *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -737,16 +637,8 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::NotFound stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::NotFound::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::NotFound *&_tao_elem) @@ -778,9 +670,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul TAO_IOP::TAO_IOR_Manipulation::_tc_NotFound, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::NotFound::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -794,7 +685,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -802,85 +693,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul 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; + return _tao_any >>= ACE_const_cast(TAO_IOP::TAO_IOR_Manipulation::NotFound *&,_tao_elem); } 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)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void TAO_IOP::TAO_IOR_Manipulation::Duplicate::_tao_any_destructor (void *x) +{ + TAO_IOP::TAO_IOR_Manipulation::Duplicate *tmp = ACE_static_cast(TAO_IOP::TAO_IOR_Manipulation::Duplicate*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::Duplicate *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -889,16 +723,8 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::Duplicate stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::Duplicate::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::Duplicate *&_tao_elem) @@ -930,9 +756,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul TAO_IOP::TAO_IOR_Manipulation::_tc_Duplicate, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::Duplicate::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -946,7 +771,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -954,85 +779,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul 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; + return _tao_any >>= ACE_const_cast(TAO_IOP::TAO_IOR_Manipulation::Duplicate *&,_tao_elem); } 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)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _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 + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR::_tao_any_destructor (void *x) +{ + TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *tmp = ACE_static_cast(TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1041,16 +809,8 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::Invalid_I stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&_tao_elem) @@ -1082,9 +842,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul TAO_IOP::TAO_IOR_Manipulation::_tc_Invalid_IOR, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1098,7 +857,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1106,53 +865,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul 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; + return _tao_any >>= ACE_const_cast(TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&,_tao_elem); } void operator<<= ( @@ -1160,40 +873,25 @@ void operator<<= ( const TAO_IOP::TAO_IOR_Manipulation::IORList &_tao_elem ) // copying { - TAO_IOP::TAO_IOR_Manipulation::IORList *_tao_any_val; - ACE_NEW (_tao_any_val, TAO_IOP::TAO_IOR_Manipulation::IORList (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void TAO_IOP::TAO_IOR_Manipulation::IORList::_tao_any_destructor (void *x) +{ + TAO_IOP::TAO_IOR_Manipulation::IORList *tmp = ACE_static_cast(TAO_IOP::TAO_IOR_Manipulation::IORList*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::IORList *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1202,16 +900,8 @@ void operator<<= (CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::IORList * stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::IORList::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipulation::IORList *&_tao_elem) @@ -1243,9 +933,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul TAO_IOP::TAO_IOR_Manipulation::_tc_IORList, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TAO_IOP::TAO_IOR_Manipulation::IORList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1259,7 +948,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1267,53 +956,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO_IOP::TAO_IOR_Manipul 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; + return _tao_any >>= ACE_const_cast(TAO_IOP::TAO_IOR_Manipulation::IORList *&,_tao_elem); } CORBA::Boolean operator<< ( diff --git a/TAO/tao/IORC.h b/TAO/tao/IORC.h index 5a5a5bf9ee9..f0e06d55d1b 100644 --- a/TAO/tao/IORC.h +++ b/TAO/tao/IORC.h @@ -122,7 +122,7 @@ TAO_NAMESPACE TAO_IOP TAO_default_environment () ); static TAO_IOR_Manipulation_ptr _nil (void); - + static void _tao_any_destructor (void*); #if !defined (_TAO_IOP_TAO_IOR_MANIPULATION_EMPTYPROFILELIST___PTR_CH_) #define _TAO_IOP_TAO_IOR_MANIPULATION_EMPTYPROFILELIST___PTR_CH_ @@ -154,7 +154,7 @@ TAO_NAMESPACE TAO_IOP CORBA::Environment &); static EmptyProfileList *_narrow (CORBA::Exception *); - + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -197,6 +197,7 @@ TAO_NAMESPACE TAO_IOP CORBA::Environment &); static NotFound *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension @@ -240,6 +241,7 @@ TAO_NAMESPACE TAO_IOP CORBA::Environment &); static Duplicate *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension @@ -283,6 +285,7 @@ TAO_NAMESPACE TAO_IOP CORBA::Environment &); static Invalid_IOR *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension @@ -316,6 +319,8 @@ TAO_NAMESPACE TAO_IOP ); IORList (const IORList &); // copy ctor ~IORList (void); // dtor + + static void _tao_any_destructor (void*); }; typedef IORList *IORList_ptr; @@ -478,49 +483,49 @@ 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_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::EmptyProfileList *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::NotFound &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::NotFound*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::NotFound *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::NotFound *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::Duplicate &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::Duplicate*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::Duplicate *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::Duplicate *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::Invalid_IOR *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TAO_IOP::TAO_IOR_Manipulation::IORList &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::IORList*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO_IOP::TAO_IOR_Manipulation::IORList *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 8a3592e8970..dcc0257c920 100644 --- a/TAO/tao/ImplRepoC.cpp +++ b/TAO/tao/ImplRepoC.cpp @@ -13,18 +13,24 @@ #include "ImplRepoC.i" #endif /* !defined INLINE */ +void ::ImplementationRepository::ServerObject::_tao_any_destructor (void *x) +{ + ImplementationRepository::ServerObject *tmp = ACE_static_cast (ImplementationRepository::ServerObject*,x); + CORBA::release (tmp); +} + ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV ) { if (CORBA::is_nil (obj)) - return ImplementationRepository::ServerObject::_nil (); + return ServerObject::_nil (); CORBA::Boolean is_a = obj->_is_a ("IDL:ImplementationRepository/ServerObject:1.0", ACE_TRY_ENV); - ACE_CHECK_RETURN (ImplementationRepository::ServerObject::_nil ()); + ACE_CHECK_RETURN (ServerObject::_nil ()); if (is_a == 0) - return ImplementationRepository::ServerObject::_nil (); - return ImplementationRepository::ServerObject::_unchecked_narrow (obj, ACE_TRY_ENV); + return ServerObject::_nil (); + return ServerObject::_unchecked_narrow (obj, ACE_TRY_ENV); } ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject::_unchecked_narrow ( @@ -33,21 +39,21 @@ ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObjec ) { if (CORBA::is_nil (obj)) - return ImplementationRepository::ServerObject::_nil (); + return ServerObject::_nil (); TAO_Stub* stub = obj->_stubobj (); stub->_incr_refcnt (); - ImplementationRepository::ServerObject_ptr default_proxy = ImplementationRepository::ServerObject::_nil (); + ServerObject_ptr default_proxy = ServerObject::_nil (); if (obj->_is_collocated () && _TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer != 0) { default_proxy = _TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer (obj); } if (CORBA::is_nil (default_proxy)) - ACE_NEW_RETURN (default_proxy, ImplementationRepository::ServerObject (stub), ImplementationRepository::ServerObject::_nil ()); + ACE_NEW_RETURN (default_proxy, ServerObject (stub), ServerObject::_nil ()); return TAO_ImplementationRepository_ServerObject_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy); } ImplementationRepository::ServerObject_ptr -ImplementationRepository::ServerObject::_duplicate (ImplementationRepository::ServerObject_ptr obj) +ImplementationRepository::ServerObject::_duplicate (ServerObject_ptr obj) { if (!CORBA::is_nil (obj)) obj->_incr_refcnt (); @@ -112,6 +118,8 @@ void ImplementationRepository::ServerObject::ping ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -221,6 +229,8 @@ void ImplementationRepository::ServerObject::shutdown ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -301,7 +311,7 @@ ImplementationRepository::TAO_ImplementationRepository_ServerObject_Default_Prox ImplementationRepository::ServerObject_ptr ImplementationRepository::TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory::create_proxy ( - ImplementationRepository::ServerObject_ptr proxy, + ::ImplementationRepository::ServerObject_ptr proxy, CORBA::Environment & ) { @@ -357,9 +367,9 @@ return 0; ImplementationRepository::ServerObject_ptr ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter::create_proxy ( - ImplementationRepository::ServerObject_ptr proxy, - CORBA::Environment & - ) + ::ImplementationRepository::ServerObject_ptr proxy, + CORBA::Environment & + ) { ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, 0)); @@ -373,7 +383,7 @@ ImplementationRepository::TAO_ImplementationRepository_ServerObject_Proxy_Factor return this->proxy_factory_->create_proxy (proxy); } -ImplementationRepository::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (ImplementationRepository::ServerObject_ptr proxy) +ImplementationRepository::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base::TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (::ImplementationRepository::ServerObject_ptr proxy) : base_proxy_ (proxy) { } @@ -444,6 +454,12 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (ImplementationRepository) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_EnvironmentVariable, &_tc_TAO_tc_ImplementationRepository_EnvironmentVariable) TAO_NAMESPACE_END +void ::ImplementationRepository::EnvironmentVariable::_tao_any_destructor (void *x) +{ + ImplementationRepository::EnvironmentVariable *tmp = ACE_static_cast (ImplementationRepository::EnvironmentVariable*,x); + delete tmp; +} + static const CORBA::Long _oc_ImplementationRepository_Address[] = { TAO_ENCAP_BYTE_ORDER, // byte order @@ -467,7 +483,7 @@ TAO_NAMESPACE_END ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_allocate_buffer (CORBA::ULong length) { ImplementationRepository::EnvironmentVariable* tmp = 0; - tmp = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (length); + tmp = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (length); if (this->buffer_ != 0) { @@ -477,7 +493,7 @@ TAO_NAMESPACE_END tmp[i] = old[i]; if (this->release_) - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (old); + _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (old); } this->buffer_ = tmp; @@ -491,7 +507,7 @@ TAO_NAMESPACE_END ImplementationRepository::EnvironmentVariable *tmp = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable *,this->buffer_); - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); + _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); this->buffer_ = 0; } @@ -544,6 +560,11 @@ ImplementationRepository::EnvironmentList::EnvironmentList (const EnvironmentLis {} ImplementationRepository::EnvironmentList::~EnvironmentList (void) // dtor {} +void ::ImplementationRepository::EnvironmentList::_tao_any_destructor (void *x) +{ + ImplementationRepository::EnvironmentList *tmp = ACE_static_cast (ImplementationRepository::EnvironmentList*,x); + delete tmp; +} #endif /* end #if !defined */ @@ -648,6 +669,12 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (ImplementationRepository) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_StartupOptions, &_tc_TAO_tc_ImplementationRepository_StartupOptions) TAO_NAMESPACE_END +void ::ImplementationRepository::StartupOptions::_tao_any_destructor (void *x) +{ + ImplementationRepository::StartupOptions *tmp = ACE_static_cast (ImplementationRepository::StartupOptions*,x); + delete tmp; +} + static const CORBA::Long _oc_ImplementationRepository_ServerInformation[] = { TAO_ENCAP_BYTE_ORDER, // byte order @@ -726,6 +753,12 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (ImplementationRepository) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ServerInformation, &_tc_TAO_tc_ImplementationRepository_ServerInformation) TAO_NAMESPACE_END +void ::ImplementationRepository::ServerInformation::_tao_any_destructor (void *x) +{ + ImplementationRepository::ServerInformation *tmp = ACE_static_cast (ImplementationRepository::ServerInformation*,x); + delete tmp; +} + #if !defined (TAO_USE_SEQUENCE_TEMPLATES) @@ -736,7 +769,7 @@ TAO_NAMESPACE_END ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_allocate_buffer (CORBA::ULong length) { ImplementationRepository::ServerInformation* tmp = 0; - tmp = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (length); + tmp = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (length); if (this->buffer_ != 0) { @@ -746,7 +779,7 @@ TAO_NAMESPACE_END tmp[i] = old[i]; if (this->release_) - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (old); + _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (old); } this->buffer_ = tmp; @@ -760,7 +793,7 @@ TAO_NAMESPACE_END ImplementationRepository::ServerInformation *tmp = ACE_reinterpret_cast (ImplementationRepository::ServerInformation *,this->buffer_); - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); + _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); this->buffer_ = 0; } @@ -813,6 +846,11 @@ ImplementationRepository::ServerInformationList::ServerInformationList (const Se {} ImplementationRepository::ServerInformationList::~ServerInformationList (void) // dtor {} +void ::ImplementationRepository::ServerInformationList::_tao_any_destructor (void *x) +{ + ImplementationRepository::ServerInformationList *tmp = ACE_static_cast (ImplementationRepository::ServerInformationList*,x); + delete tmp; +} #endif /* end #if !defined */ @@ -906,18 +944,24 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (ImplementationRepository) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ServerInformationList, &_tc_TAO_tc_ImplementationRepository_ServerInformationList) TAO_NAMESPACE_END +void ::ImplementationRepository::Administration::_tao_any_destructor (void *x) +{ + ImplementationRepository::Administration *tmp = ACE_static_cast (ImplementationRepository::Administration*,x); + CORBA::release (tmp); +} + ImplementationRepository::Administration_ptr ImplementationRepository::Administration::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV ) { if (CORBA::is_nil (obj)) - return ImplementationRepository::Administration::_nil (); + return Administration::_nil (); CORBA::Boolean is_a = obj->_is_a ("IDL:ImplementationRepository/Administration:1.0", ACE_TRY_ENV); - ACE_CHECK_RETURN (ImplementationRepository::Administration::_nil ()); + ACE_CHECK_RETURN (Administration::_nil ()); if (is_a == 0) - return ImplementationRepository::Administration::_nil (); - return ImplementationRepository::Administration::_unchecked_narrow (obj, ACE_TRY_ENV); + return Administration::_nil (); + return Administration::_unchecked_narrow (obj, ACE_TRY_ENV); } ImplementationRepository::Administration_ptr ImplementationRepository::Administration::_unchecked_narrow ( @@ -926,21 +970,21 @@ ImplementationRepository::Administration_ptr ImplementationRepository::Administr ) { if (CORBA::is_nil (obj)) - return ImplementationRepository::Administration::_nil (); + return Administration::_nil (); TAO_Stub* stub = obj->_stubobj (); stub->_incr_refcnt (); - ImplementationRepository::Administration_ptr default_proxy = ImplementationRepository::Administration::_nil (); + Administration_ptr default_proxy = Administration::_nil (); if (obj->_is_collocated () && _TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer != 0) { default_proxy = _TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer (obj); } if (CORBA::is_nil (default_proxy)) - ACE_NEW_RETURN (default_proxy, ImplementationRepository::Administration (stub), ImplementationRepository::Administration::_nil ()); + ACE_NEW_RETURN (default_proxy, Administration (stub), Administration::_nil ()); return TAO_ImplementationRepository_Administration_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy); } ImplementationRepository::Administration_ptr -ImplementationRepository::Administration::_duplicate (ImplementationRepository::Administration_ptr obj) +ImplementationRepository::Administration::_duplicate (Administration_ptr obj) { if (!CORBA::is_nil (obj)) obj->_incr_refcnt (); @@ -949,7 +993,7 @@ ImplementationRepository::Administration::_duplicate (ImplementationRepository:: // default constructor ImplementationRepository::Administration::AlreadyRegistered::AlreadyRegistered (void) - : CORBA_UserException (ImplementationRepository::Administration::_tc_AlreadyRegistered) + : CORBA_UserException (::ImplementationRepository::Administration::_tc_AlreadyRegistered) { } @@ -958,15 +1002,21 @@ ImplementationRepository::Administration::AlreadyRegistered::~AlreadyRegistered { } +void ::ImplementationRepository::Administration::AlreadyRegistered::_tao_any_destructor (void *x) +{ + ImplementationRepository::Administration::AlreadyRegistered *tmp = ACE_static_cast (ImplementationRepository::Administration::AlreadyRegistered*,x); + delete tmp; +} + // copy constructor -ImplementationRepository::Administration::AlreadyRegistered::AlreadyRegistered (const ImplementationRepository::Administration::AlreadyRegistered &_tao_excp) +ImplementationRepository::Administration::AlreadyRegistered::AlreadyRegistered (const ::ImplementationRepository::Administration::AlreadyRegistered &_tao_excp) : CORBA_UserException (_tao_excp._type ()) { } // assignment operator ImplementationRepository::Administration::AlreadyRegistered& -ImplementationRepository::Administration::AlreadyRegistered::operator= (const ImplementationRepository::Administration::AlreadyRegistered &_tao_excp) +ImplementationRepository::Administration::AlreadyRegistered::operator= (const ::ImplementationRepository::Administration::AlreadyRegistered &_tao_excp) { this->CORBA_UserException::operator= (_tao_excp); @@ -978,7 +1028,7 @@ ImplementationRepository::Administration::AlreadyRegistered_ptr ImplementationRepository::Administration::AlreadyRegistered::_narrow (CORBA::Exception *exc) { if (!ACE_OS::strcmp ("IDL:ImplementationRepository/Administration/AlreadyRegistered:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (ImplementationRepository::Administration::AlreadyRegistered_ptr, exc); + return ACE_dynamic_cast (AlreadyRegistered_ptr, exc); else return 0; } @@ -989,16 +1039,20 @@ void ImplementationRepository::Administration::AlreadyRegistered::_raise () TAO_RAISE(*this); } -void ImplementationRepository::Administration::AlreadyRegistered::_tao_encode (TAO_OutputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) const + +void ImplementationRepository::Administration::AlreadyRegistered::_tao_encode ( + TAO_OutputCDR &cdr, + CORBA::Environment &ACE_TRY_ENV) const { if (cdr << *this) return; ACE_THROW (CORBA::MARSHAL ()); } -void ImplementationRepository::Administration::AlreadyRegistered::_tao_decode (TAO_InputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) + +void ImplementationRepository::Administration::AlreadyRegistered::_tao_decode ( + TAO_InputCDR &cdr, + CORBA::Environment &ACE_TRY_ENV) { if (cdr >> *this) return; @@ -1009,7 +1063,7 @@ void ImplementationRepository::Administration::AlreadyRegistered::_tao_decode (T CORBA::Exception *ImplementationRepository::Administration::AlreadyRegistered::_alloc (void) { CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ImplementationRepository::Administration::AlreadyRegistered, 0); + ACE_NEW_RETURN (retval, ::ImplementationRepository::Administration::AlreadyRegistered, 0); return retval; } @@ -1025,7 +1079,7 @@ CORBA::TypeCode_ptr ImplementationRepository::Administration::_tc_AlreadyRegiste // default constructor ImplementationRepository::Administration::CannotActivate::CannotActivate (void) - : CORBA_UserException (ImplementationRepository::Administration::_tc_CannotActivate) + : CORBA_UserException (::ImplementationRepository::Administration::_tc_CannotActivate) { } @@ -1034,8 +1088,14 @@ ImplementationRepository::Administration::CannotActivate::~CannotActivate (void) { } +void ::ImplementationRepository::Administration::CannotActivate::_tao_any_destructor (void *x) +{ + ImplementationRepository::Administration::CannotActivate *tmp = ACE_static_cast (ImplementationRepository::Administration::CannotActivate*,x); + delete tmp; +} + // copy constructor -ImplementationRepository::Administration::CannotActivate::CannotActivate (const ImplementationRepository::Administration::CannotActivate &_tao_excp) +ImplementationRepository::Administration::CannotActivate::CannotActivate (const ::ImplementationRepository::Administration::CannotActivate &_tao_excp) : CORBA_UserException (_tao_excp._type ()) { this->reason = CORBA::string_dup (_tao_excp.reason.in ()); @@ -1043,7 +1103,7 @@ ImplementationRepository::Administration::CannotActivate::CannotActivate (const // assignment operator ImplementationRepository::Administration::CannotActivate& -ImplementationRepository::Administration::CannotActivate::operator= (const ImplementationRepository::Administration::CannotActivate &_tao_excp) +ImplementationRepository::Administration::CannotActivate::operator= (const ::ImplementationRepository::Administration::CannotActivate &_tao_excp) { this->CORBA_UserException::operator= (_tao_excp); @@ -1056,7 +1116,7 @@ ImplementationRepository::Administration::CannotActivate_ptr ImplementationRepository::Administration::CannotActivate::_narrow (CORBA::Exception *exc) { if (!ACE_OS::strcmp ("IDL:ImplementationRepository/Administration/CannotActivate:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (ImplementationRepository::Administration::CannotActivate_ptr, exc); + return ACE_dynamic_cast (CannotActivate_ptr, exc); else return 0; } @@ -1067,16 +1127,20 @@ void ImplementationRepository::Administration::CannotActivate::_raise () TAO_RAISE(*this); } -void ImplementationRepository::Administration::CannotActivate::_tao_encode (TAO_OutputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) const + +void ImplementationRepository::Administration::CannotActivate::_tao_encode ( + TAO_OutputCDR &cdr, + CORBA::Environment &ACE_TRY_ENV) const { if (cdr << *this) return; ACE_THROW (CORBA::MARSHAL ()); } -void ImplementationRepository::Administration::CannotActivate::_tao_decode (TAO_InputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) + +void ImplementationRepository::Administration::CannotActivate::_tao_decode ( + TAO_InputCDR &cdr, + CORBA::Environment &ACE_TRY_ENV) { if (cdr >> *this) return; @@ -1087,7 +1151,7 @@ void ImplementationRepository::Administration::CannotActivate::_tao_decode (TAO_ CORBA::Exception *ImplementationRepository::Administration::CannotActivate::_alloc (void) { CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ImplementationRepository::Administration::CannotActivate, 0); + ACE_NEW_RETURN (retval, ::ImplementationRepository::Administration::CannotActivate, 0); return retval; } @@ -1114,7 +1178,7 @@ CORBA::TypeCode_ptr ImplementationRepository::Administration::_tc_CannotActivate // default constructor ImplementationRepository::Administration::NotFound::NotFound (void) - : CORBA_UserException (ImplementationRepository::Administration::_tc_NotFound) + : CORBA_UserException (::ImplementationRepository::Administration::_tc_NotFound) { } @@ -1123,15 +1187,21 @@ ImplementationRepository::Administration::NotFound::~NotFound (void) { } +void ::ImplementationRepository::Administration::NotFound::_tao_any_destructor (void *x) +{ + ImplementationRepository::Administration::NotFound *tmp = ACE_static_cast (ImplementationRepository::Administration::NotFound*,x); + delete tmp; +} + // copy constructor -ImplementationRepository::Administration::NotFound::NotFound (const ImplementationRepository::Administration::NotFound &_tao_excp) +ImplementationRepository::Administration::NotFound::NotFound (const ::ImplementationRepository::Administration::NotFound &_tao_excp) : CORBA_UserException (_tao_excp._type ()) { } // assignment operator ImplementationRepository::Administration::NotFound& -ImplementationRepository::Administration::NotFound::operator= (const ImplementationRepository::Administration::NotFound &_tao_excp) +ImplementationRepository::Administration::NotFound::operator= (const ::ImplementationRepository::Administration::NotFound &_tao_excp) { this->CORBA_UserException::operator= (_tao_excp); @@ -1143,7 +1213,7 @@ ImplementationRepository::Administration::NotFound_ptr ImplementationRepository::Administration::NotFound::_narrow (CORBA::Exception *exc) { if (!ACE_OS::strcmp ("IDL:ImplementationRepository/Administration/NotFound:1.0", exc->_id ())) // same type - return ACE_dynamic_cast (ImplementationRepository::Administration::NotFound_ptr, exc); + return ACE_dynamic_cast (NotFound_ptr, exc); else return 0; } @@ -1154,16 +1224,20 @@ void ImplementationRepository::Administration::NotFound::_raise () TAO_RAISE(*this); } -void ImplementationRepository::Administration::NotFound::_tao_encode (TAO_OutputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) const + +void ImplementationRepository::Administration::NotFound::_tao_encode ( + TAO_OutputCDR &cdr, + CORBA::Environment &ACE_TRY_ENV) const { if (cdr << *this) return; ACE_THROW (CORBA::MARSHAL ()); } -void ImplementationRepository::Administration::NotFound::_tao_decode (TAO_InputCDR &cdr, - CORBA::Environment &ACE_TRY_ENV) + +void ImplementationRepository::Administration::NotFound::_tao_decode ( + TAO_InputCDR &cdr, + CORBA::Environment &ACE_TRY_ENV) { if (cdr >> *this) return; @@ -1174,7 +1248,7 @@ void ImplementationRepository::Administration::NotFound::_tao_decode (TAO_InputC CORBA::Exception *ImplementationRepository::Administration::NotFound::_alloc (void) { CORBA::Exception *retval = 0; - ACE_NEW_RETURN (retval, ImplementationRepository::Administration::NotFound, 0); + ACE_NEW_RETURN (retval, ::ImplementationRepository::Administration::NotFound, 0); return retval; } @@ -1255,6 +1329,8 @@ void ImplementationRepository::Administration::activate_server ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -1377,6 +1453,8 @@ void ImplementationRepository::Administration::register_server ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -1494,6 +1572,8 @@ void ImplementationRepository::Administration::reregister_server ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -1616,6 +1696,8 @@ void ImplementationRepository::Administration::remove_server ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -1737,6 +1819,8 @@ void ImplementationRepository::Administration::shutdown_server ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -1860,6 +1944,8 @@ char * ImplementationRepository::Administration::server_is_running ( ); TAO_INTERCEPTOR_CHECK_RETURN (0); CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK_RETURN (0); @@ -1990,6 +2076,8 @@ void ImplementationRepository::Administration::server_is_shutting_down ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -2113,6 +2201,8 @@ void ImplementationRepository::Administration::find ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -2235,6 +2325,8 @@ void ImplementationRepository::Administration::list ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -2325,7 +2417,7 @@ ImplementationRepository::TAO_ImplementationRepository_Administration_Default_Pr ImplementationRepository::Administration_ptr ImplementationRepository::TAO_ImplementationRepository_Administration_Default_Proxy_Factory::create_proxy ( - ImplementationRepository::Administration_ptr proxy, + ::ImplementationRepository::Administration_ptr proxy, CORBA::Environment & ) { @@ -2381,9 +2473,9 @@ return 0; ImplementationRepository::Administration_ptr ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter::create_proxy ( - ImplementationRepository::Administration_ptr proxy, - CORBA::Environment & - ) + ::ImplementationRepository::Administration_ptr proxy, + CORBA::Environment & + ) { ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, 0)); @@ -2397,7 +2489,7 @@ ImplementationRepository::TAO_ImplementationRepository_Administration_Proxy_Fact return this->proxy_factory_->create_proxy (proxy); } -ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::TAO_ImplementationRepository_Administration_Smart_Proxy_Base (ImplementationRepository::Administration_ptr proxy) +ImplementationRepository::TAO_ImplementationRepository_Administration_Smart_Proxy_Base::TAO_ImplementationRepository_Administration_Smart_Proxy_Base (::ImplementationRepository::Administration_ptr proxy) : base_proxy_ (proxy) { } @@ -2581,18 +2673,24 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (ImplementationRepository) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Administration, &_tc_TAO_tc_ImplementationRepository_Administration) TAO_NAMESPACE_END +void ::ImplementationRepository::ServerInformationIterator::_tao_any_destructor (void *x) +{ + ImplementationRepository::ServerInformationIterator *tmp = ACE_static_cast (ImplementationRepository::ServerInformationIterator*,x); + CORBA::release (tmp); +} + ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV ) { if (CORBA::is_nil (obj)) - return ImplementationRepository::ServerInformationIterator::_nil (); + return ServerInformationIterator::_nil (); CORBA::Boolean is_a = obj->_is_a ("IDL:ImplementationRepository/ServerInformationIterator:1.0", ACE_TRY_ENV); - ACE_CHECK_RETURN (ImplementationRepository::ServerInformationIterator::_nil ()); + ACE_CHECK_RETURN (ServerInformationIterator::_nil ()); if (is_a == 0) - return ImplementationRepository::ServerInformationIterator::_nil (); - return ImplementationRepository::ServerInformationIterator::_unchecked_narrow (obj, ACE_TRY_ENV); + return ServerInformationIterator::_nil (); + return ServerInformationIterator::_unchecked_narrow (obj, ACE_TRY_ENV); } ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator::_unchecked_narrow ( @@ -2601,21 +2699,21 @@ ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository ) { if (CORBA::is_nil (obj)) - return ImplementationRepository::ServerInformationIterator::_nil (); + return ServerInformationIterator::_nil (); TAO_Stub* stub = obj->_stubobj (); stub->_incr_refcnt (); - ImplementationRepository::ServerInformationIterator_ptr default_proxy = ImplementationRepository::ServerInformationIterator::_nil (); + ServerInformationIterator_ptr default_proxy = ServerInformationIterator::_nil (); if (obj->_is_collocated () && _TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer != 0) { default_proxy = _TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer (obj); } if (CORBA::is_nil (default_proxy)) - ACE_NEW_RETURN (default_proxy, ImplementationRepository::ServerInformationIterator (stub), ImplementationRepository::ServerInformationIterator::_nil ()); + ACE_NEW_RETURN (default_proxy, ServerInformationIterator (stub), ServerInformationIterator::_nil ()); return TAO_ImplementationRepository_ServerInformationIterator_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy); } ImplementationRepository::ServerInformationIterator_ptr -ImplementationRepository::ServerInformationIterator::_duplicate (ImplementationRepository::ServerInformationIterator_ptr obj) +ImplementationRepository::ServerInformationIterator::_duplicate (ServerInformationIterator_ptr obj) { if (!CORBA::is_nil (obj)) obj->_incr_refcnt (); @@ -2683,6 +2781,8 @@ CORBA::Boolean ImplementationRepository::ServerInformationIterator::next_n ( ); TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval); CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval); @@ -2805,6 +2905,8 @@ void ImplementationRepository::ServerInformationIterator::destroy ( ); TAO_INTERCEPTOR_CHECK; CORBA::Short flag = 131; + // Tremporary hack until GIOP 1.2 is implemented. + _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV); TAO_INTERCEPTOR_CHECK; @@ -2885,7 +2987,7 @@ ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory::create_proxy ( - ImplementationRepository::ServerInformationIterator_ptr proxy, + ::ImplementationRepository::ServerInformationIterator_ptr proxy, CORBA::Environment & ) { @@ -2941,9 +3043,9 @@ return 0; ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter::create_proxy ( - ImplementationRepository::ServerInformationIterator_ptr proxy, - CORBA::Environment & - ) + ::ImplementationRepository::ServerInformationIterator_ptr proxy, + CORBA::Environment & + ) { ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, this->lock_, 0)); @@ -2957,7 +3059,7 @@ ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator return this->proxy_factory_->create_proxy (proxy); } -ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (ImplementationRepository::ServerInformationIterator_ptr proxy) +ImplementationRepository::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base::TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (::ImplementationRepository::ServerInformationIterator_ptr proxy) : base_proxy_ (proxy) { } @@ -3019,47 +3121,28 @@ ImplementationRepository::ServerObject_ptr (*_TAO_collocation_ImplementationRepo ) = 0; void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerObject_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 = ImplementationRepository::ServerObject::_duplicate (_tao_elem); - 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 + TAO_OutputCDR stream; + if (stream << _tao_elem) { - delete _tao_obj_ptr; + _tao_any._tao_replace ( + ImplementationRepository::_tc_ServerObject, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + ImplementationRepository::ServerObject::_duplicate (_tao_elem), + ImplementationRepository::ServerObject::_tao_any_destructor + ); } - ACE_ENDTRY; } 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)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3072,24 +3155,18 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { _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)->_tao_replace ( ImplementationRepository::_tc_ServerObject, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + ImplementationRepository::ServerObject::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = ImplementationRepository::ServerObject::_nil (); return 0; } @@ -3109,52 +3186,27 @@ 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 = 0; - ACE_NEW (_any_val, ImplementationRepository::EnvironmentVariable (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { - 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 - { - delete _any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_EnvironmentVariable, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::EnvironmentVariable *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - 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 - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_EnvironmentVariable, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + ImplementationRepository::EnvironmentVariable::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::EnvironmentVariable *&_tao_elem) @@ -3186,7 +3238,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository ImplementationRepository::_tc_EnvironmentVariable, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + ImplementationRepository::EnvironmentVariable::_tao_any_destructor ); ACE_TRY_CHECK; return 1; @@ -3202,7 +3254,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3210,53 +3262,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository 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; + return _tao_any >>= ACE_const_cast(ImplementationRepository::EnvironmentVariable*&,_tao_elem); } void operator<<= ( @@ -3264,58 +3270,29 @@ void operator<<= ( const ImplementationRepository::EnvironmentList &_tao_elem ) // copying { - ImplementationRepository::EnvironmentList *_tao_any_val; - ACE_NEW (_tao_any_val, ImplementationRepository::EnvironmentList (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { - 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 - { - delete _tao_any_val; - } - ACE_ENDTRY; -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::EnvironmentList *_tao_elem) // non copying -{ - ACE_TRY_NEW_ENV + TAO_OutputCDR stream; + if (stream << _tao_elem) { - 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 + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; } - ACE_ENDTRY; +} + +void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::EnvironmentList *_tao_elem) // non copying +{ + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_EnvironmentList, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + ImplementationRepository::EnvironmentList::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::EnvironmentList *&_tao_elem) @@ -3347,9 +3324,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository ImplementationRepository::_tc_EnvironmentList, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + ImplementationRepository::EnvironmentList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3363,7 +3339,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3398,9 +3374,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo ImplementationRepository::_tc_EnvironmentList, 1, ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::EnvironmentList *&, _tao_elem)), - ACE_TRY_ENV + ImplementationRepository::EnvironmentList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3414,7 +3389,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo { delete ACE_const_cast (ImplementationRepository::EnvironmentList *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3422,29 +3397,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ActivationMode _tao_elem) { - ImplementationRepository::ActivationMode *_tao_any_val; - ACE_NEW (_tao_any_val, ImplementationRepository::ActivationMode (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_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 _tao_any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_ActivationMode, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ActivationMode &_tao_elem) @@ -3476,52 +3435,27 @@ 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 = 0; - ACE_NEW (_any_val, ImplementationRepository::StartupOptions (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { - 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 - { - delete _any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_StartupOptions, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::StartupOptions *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - 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 - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_StartupOptions, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + ImplementationRepository::StartupOptions::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::StartupOptions *&_tao_elem) @@ -3553,7 +3487,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository ImplementationRepository::_tc_StartupOptions, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + ImplementationRepository::StartupOptions::_tao_any_destructor ); ACE_TRY_CHECK; return 1; @@ -3569,7 +3503,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3577,103 +3511,32 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository 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; + return _tao_any >>= ACE_const_cast(ImplementationRepository::StartupOptions*&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::ServerInformation &_tao_elem) // copying { - ImplementationRepository::ServerInformation *_any_val = 0; - ACE_NEW (_any_val, ImplementationRepository::ServerInformation (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { - 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 - { - delete _any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_ServerInformation, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformation *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - 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 - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_ServerInformation, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + ImplementationRepository::ServerInformation::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ServerInformation *&_tao_elem) @@ -3705,7 +3568,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository ImplementationRepository::_tc_ServerInformation, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + ImplementationRepository::ServerInformation::_tao_any_destructor ); ACE_TRY_CHECK; return 1; @@ -3721,7 +3584,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3729,53 +3592,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository 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; + return _tao_any >>= ACE_const_cast(ImplementationRepository::ServerInformation*&,_tao_elem); } void operator<<= ( @@ -3783,58 +3600,29 @@ void operator<<= ( const ImplementationRepository::ServerInformationList &_tao_elem ) // copying { - ImplementationRepository::ServerInformationList *_tao_any_val; - ACE_NEW (_tao_any_val, ImplementationRepository::ServerInformationList (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { - 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 + TAO_OutputCDR stream; + if (stream << _tao_elem) { - delete _tao_any_val; - } - ACE_ENDTRY; -} - -void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformationList *_tao_elem) // non copying -{ - ACE_TRY_NEW_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 + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; } - ACE_ENDTRY; +} + +void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformationList *_tao_elem) // non copying +{ + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::_tc_ServerInformationList, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + ImplementationRepository::ServerInformationList::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::ServerInformationList *&_tao_elem) @@ -3866,9 +3654,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository ImplementationRepository::_tc_ServerInformationList, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + ImplementationRepository::ServerInformationList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3882,7 +3669,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3917,9 +3704,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo ImplementationRepository::_tc_ServerInformationList, 1, ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::ServerInformationList *&, _tao_elem)), - ACE_TRY_ENV + ImplementationRepository::ServerInformationList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3933,7 +3719,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo { delete ACE_const_cast (ImplementationRepository::ServerInformationList *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3944,47 +3730,28 @@ ImplementationRepository::Administration_ptr (*_TAO_collocation_ImplementationRe ) = 0; void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration_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 = ImplementationRepository::Administration::_duplicate (_tao_elem); - 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 + TAO_OutputCDR stream; + if (stream << _tao_elem) { - delete _tao_obj_ptr; + _tao_any._tao_replace ( + ImplementationRepository::_tc_Administration, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + ImplementationRepository::Administration::_duplicate (_tao_elem), + ImplementationRepository::Administration::_tao_any_destructor + ); } - ACE_ENDTRY; } 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)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3997,24 +3764,18 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { _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)->_tao_replace ( ImplementationRepository::_tc_Administration, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + ImplementationRepository::Administration::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = ImplementationRepository::Administration::_nil (); return 0; } @@ -4034,52 +3795,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administration::AlreadyRegistered &_tao_elem) // copying { - 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_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 - { - delete _tao_any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::Administration::_tc_AlreadyRegistered, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration::AlreadyRegistered *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - 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 - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::Administration::_tc_AlreadyRegistered, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + ImplementationRepository::Administration::AlreadyRegistered::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::Administration::AlreadyRegistered *&_tao_elem) @@ -4111,9 +3847,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository ImplementationRepository::Administration::_tc_AlreadyRegistered, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + ImplementationRepository::Administration::AlreadyRegistered::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4127,7 +3862,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -4162,9 +3897,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo ImplementationRepository::Administration::_tc_AlreadyRegistered, 1, ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::Administration::AlreadyRegistered *&, _tao_elem)), - ACE_TRY_ENV + ImplementationRepository::Administration::AlreadyRegistered::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4178,7 +3912,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo { delete ACE_const_cast (ImplementationRepository::Administration::AlreadyRegistered *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -4186,52 +3920,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administration::CannotActivate &_tao_elem) // copying { - 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_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 - { - delete _tao_any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::Administration::_tc_CannotActivate, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration::CannotActivate *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - 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 - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::Administration::_tc_CannotActivate, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + ImplementationRepository::Administration::CannotActivate::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::Administration::CannotActivate *&_tao_elem) @@ -4263,9 +3972,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository ImplementationRepository::Administration::_tc_CannotActivate, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + ImplementationRepository::Administration::CannotActivate::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4279,7 +3987,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -4314,9 +4022,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo ImplementationRepository::Administration::_tc_CannotActivate, 1, ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::Administration::CannotActivate *&, _tao_elem)), - ACE_TRY_ENV + ImplementationRepository::Administration::CannotActivate::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4330,7 +4037,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo { delete ACE_const_cast (ImplementationRepository::Administration::CannotActivate *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -4338,52 +4045,27 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo void operator<<= (CORBA::Any &_tao_any, const ImplementationRepository::Administration::NotFound &_tao_elem) // copying { - 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_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 - { - delete _tao_any_val; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::Administration::_tc_NotFound, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::Administration::NotFound *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { - 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 - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + ImplementationRepository::Administration::_tc_NotFound, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + ImplementationRepository::Administration::NotFound::_tao_any_destructor + ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository::Administration::NotFound *&_tao_elem) @@ -4415,9 +4097,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository ImplementationRepository::Administration::_tc_NotFound, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + ImplementationRepository::Administration::NotFound::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4431,7 +4112,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -4466,9 +4147,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo ImplementationRepository::Administration::_tc_NotFound, 1, ACE_reinterpret_cast (void *, ACE_const_cast (ImplementationRepository::Administration::NotFound *&, _tao_elem)), - ACE_TRY_ENV + ImplementationRepository::Administration::NotFound::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4482,7 +4162,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const ImplementationRepo { delete ACE_const_cast (ImplementationRepository::Administration::NotFound *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -4493,47 +4173,28 @@ ImplementationRepository::ServerInformationIterator_ptr (*_TAO_collocation_Imple ) = 0; void operator<<= (CORBA::Any &_tao_any, ImplementationRepository::ServerInformationIterator_ptr _tao_elem) { - CORBA::Object_ptr *_tao_obj_ptr = 0; - ACE_TRY_NEW_ENV + TAO_OutputCDR stream; + if (stream << _tao_elem) { - ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr); - *_tao_obj_ptr = ImplementationRepository::ServerInformationIterator::_duplicate (_tao_elem); - 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 - { - delete _tao_obj_ptr; + _tao_any._tao_replace ( + ImplementationRepository::_tc_ServerInformationIterator, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + ImplementationRepository::ServerInformationIterator::_duplicate (_tao_elem), + ImplementationRepository::ServerInformationIterator::_tao_any_destructor + ); } - ACE_ENDTRY; } 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)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -4546,24 +4207,18 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, ImplementationRepository { _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)->_tao_replace ( ImplementationRepository::_tc_ServerInformationIterator, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + ImplementationRepository::ServerInformationIterator::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = ImplementationRepository::ServerInformationIterator::_nil (); return 0; } @@ -4609,6 +4264,9 @@ CORBA::Boolean operator>> ( { // 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++) @@ -4648,6 +4306,9 @@ CORBA::Boolean operator>> ( { // 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++) diff --git a/TAO/tao/ImplRepoC.h b/TAO/tao/ImplRepoC.h index 870167331ad..1c4fe4589b5 100644 --- a/TAO/tao/ImplRepoC.h +++ b/TAO/tao/ImplRepoC.h @@ -10,26 +10,17 @@ #ifndef _TAO_IDL_IMPLREPOC_H_ #define _TAO_IDL_IMPLREPOC_H_ -#include "tao/Object.h" -#include "tao/Managed_Types.h" -#include "tao/POAC.h" -#include "tao/Servant_Base.h" -#include "tao/Operation_Table.h" -#include "tao/Stub.h" -#include "tao/ORB_Core.h" -#include "tao/Server_Request.h" -#include "tao/NVList.h" -#include "tao/Object_Adapter.h" -#include "tao/Invocation.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ +#include "tao/corba.h" #if defined (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION) #include "ace/streams.h" #endif /* ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION */ +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "corbafwd.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO @@ -143,9 +134,11 @@ class TAO_Export ServerObject : public virtual ACE_CORBA_1 (Object) ); static ServerObject_ptr _nil (void) { - return (ImplementationRepository::ServerObject_ptr)0; + return (ServerObject_ptr)0; } + static void _tao_any_destructor (void*); + virtual void ping ( CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () @@ -189,8 +182,8 @@ public: virtual ~TAO_ImplementationRepository_ServerObject_Default_Proxy_Factory (void); - virtual ImplementationRepository::ServerObject_ptr create_proxy ( - ImplementationRepository::ServerObject_ptr proxy, + virtual ServerObject_ptr create_proxy ( + ServerObject_ptr proxy, CORBA::Environment &env = TAO_default_environment () ); @@ -213,8 +206,8 @@ public: TAO_default_environment () ); - ImplementationRepository::ServerObject_ptr create_proxy ( - ImplementationRepository::ServerObject_ptr proxy, + ServerObject_ptr create_proxy ( + ServerObject_ptr proxy, CORBA::Environment &env = TAO_default_environment () ); @@ -231,10 +224,10 @@ protected: }; typedef ACE_Singleton<TAO_ImplementationRepository_ServerObject_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_ServerObject_PROXY_FACTORY_ADAPTER; - class TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base : public virtual ImplementationRepository::ServerObject + class TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, ServerObject) { public: - TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (ImplementationRepository::ServerObject_ptr proxy); + TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (::ImplementationRepository::ServerObject_ptr proxy); ~TAO_ImplementationRepository_ServerObject_Smart_Proxy_Base (void); virtual void ping ( CORBA::Environment &ACE_TRY_ENV = @@ -253,7 +246,7 @@ protected: )); private: - ImplementationRepository::ServerObject_var base_proxy_; + ::ImplementationRepository::ServerObject_var base_proxy_; }; @@ -263,16 +256,16 @@ TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ServerObject; struct EnvironmentVariable; class EnvironmentVariable_var; -typedef EnvironmentVariable* EnvironmentVariable_ptr; struct TAO_Export EnvironmentVariable { #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef EnvironmentVariable_ptr _ptr_type; typedef EnvironmentVariable_var _var_type; #endif /* ! __GNUC__ || g++ >= 2.8 */ + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager value; }; @@ -293,6 +286,8 @@ public: operator const EnvironmentVariable &() const; operator EnvironmentVariable &(); operator EnvironmentVariable &() const; + operator EnvironmentVariable *&(); // variable-size types only + // in, inout, out, _retn const EnvironmentVariable &in (void) const; EnvironmentVariable &inout (void); @@ -400,7 +395,8 @@ public: CORBA::Boolean release=0 ); EnvironmentList (const EnvironmentList &); // copy ctor - ~EnvironmentList (void); // dtor + ~EnvironmentList (void); + static void _tao_any_destructor (void*); #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) typedef EnvironmentList_ptr _ptr_type; @@ -435,6 +431,8 @@ public: operator const EnvironmentList &() const; operator EnvironmentList &(); operator EnvironmentList &() const; + operator EnvironmentList *&(); // variable-size base types only + EnvironmentVariable &operator[] (CORBA::ULong index); // in, inout, out, _retn const EnvironmentList &in (void) const; @@ -491,20 +489,20 @@ TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_ActivationMode; struct StartupOptions; class StartupOptions_var; -typedef StartupOptions* StartupOptions_ptr; struct TAO_Export StartupOptions { #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef StartupOptions_ptr _ptr_type; typedef StartupOptions_var _var_type; #endif /* ! __GNUC__ || g++ >= 2.8 */ + static void _tao_any_destructor (void*); + TAO_String_Manager command_line; - ImplementationRepository::EnvironmentList environment; + ACE_NESTED_CLASS (ImplementationRepository, EnvironmentList) environment; TAO_String_Manager working_directory; - ImplementationRepository::ActivationMode activation; + ACE_NESTED_CLASS (ImplementationRepository, ActivationMode) activation; }; class TAO_Export StartupOptions_var @@ -523,6 +521,8 @@ public: operator const StartupOptions &() const; operator StartupOptions &(); operator StartupOptions &() const; + operator StartupOptions *&(); // variable-size types only + // in, inout, out, _retn const StartupOptions &in (void) const; StartupOptions &inout (void); @@ -556,19 +556,19 @@ TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_StartupOptions; struct ServerInformation; class ServerInformation_var; -typedef ServerInformation* ServerInformation_ptr; struct TAO_Export ServerInformation { #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef ServerInformation_ptr _ptr_type; typedef ServerInformation_var _var_type; #endif /* ! __GNUC__ || g++ >= 2.8 */ + static void _tao_any_destructor (void*); + TAO_String_Manager logical_server; TAO_String_Manager server; - ImplementationRepository::StartupOptions startup; + ACE_NESTED_CLASS (ImplementationRepository, StartupOptions) startup; TAO_String_Manager location; }; @@ -588,6 +588,8 @@ public: operator const ServerInformation &() const; operator ServerInformation &(); operator ServerInformation &() const; + operator ServerInformation *&(); // variable-size types only + // in, inout, out, _retn const ServerInformation &in (void) const; ServerInformation &inout (void); @@ -690,7 +692,8 @@ public: CORBA::Boolean release=0 ); ServerInformationList (const ServerInformationList &); // copy ctor - ~ServerInformationList (void); // dtor + ~ServerInformationList (void); + static void _tao_any_destructor (void*); #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) typedef ServerInformationList_ptr _ptr_type; @@ -725,6 +728,8 @@ public: operator const ServerInformationList &() const; operator ServerInformationList &(); operator ServerInformationList &() const; + operator ServerInformationList *&(); // variable-size base types only + ServerInformation &operator[] (CORBA::ULong index); // in, inout, out, _retn const ServerInformationList &in (void) const; @@ -924,9 +929,11 @@ public: ); static Administration_ptr _nil (void) { - return (ImplementationRepository::Administration_ptr)0; + return (Administration_ptr)0; } + static void _tao_any_destructor (void*); + #if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION_ALREADYREGISTERED___PTR_CH_) #define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION_ALREADYREGISTERED___PTR_CH_ @@ -951,16 +958,19 @@ public: AlreadyRegistered (void); // default ctor AlreadyRegistered (const AlreadyRegistered &); // copy ctor - ~AlreadyRegistered (void); // dtor + ~AlreadyRegistered (void); + static void _tao_any_destructor (void*); AlreadyRegistered &operator= (const AlreadyRegistered &); virtual void _raise (void); - virtual void _tao_encode (TAO_OutputCDR &cdr, - CORBA::Environment &) const; - virtual void _tao_decode (TAO_InputCDR &cdr, - CORBA::Environment &); + virtual void _tao_encode ( + TAO_OutputCDR &, + CORBA::Environment &) const; + virtual void _tao_decode ( + TAO_InputCDR &, + CORBA::Environment &); static AlreadyRegistered *_narrow (CORBA::Exception *); @@ -1000,16 +1010,19 @@ public: CannotActivate (void); // default ctor CannotActivate (const CannotActivate &); // copy ctor - ~CannotActivate (void); // dtor + ~CannotActivate (void); + static void _tao_any_destructor (void*); CannotActivate &operator= (const CannotActivate &); virtual void _raise (void); - virtual void _tao_encode (TAO_OutputCDR &cdr, - CORBA::Environment &) const; - virtual void _tao_decode (TAO_InputCDR &cdr, - CORBA::Environment &); + virtual void _tao_encode ( + TAO_OutputCDR &, + CORBA::Environment &) const; + virtual void _tao_decode ( + TAO_InputCDR &, + CORBA::Environment &); static CannotActivate *_narrow (CORBA::Exception *); @@ -1051,16 +1064,19 @@ public: NotFound (void); // default ctor NotFound (const NotFound &); // copy ctor - ~NotFound (void); // dtor + ~NotFound (void); + static void _tao_any_destructor (void*); NotFound &operator= (const NotFound &); virtual void _raise (void); - virtual void _tao_encode (TAO_OutputCDR &cdr, - CORBA::Environment &) const; - virtual void _tao_decode (TAO_InputCDR &cdr, - CORBA::Environment &); + virtual void _tao_encode ( + TAO_OutputCDR &, + CORBA::Environment &) const; + virtual void _tao_decode ( + TAO_InputCDR &, + CORBA::Environment &); static NotFound *_narrow (CORBA::Exception *); @@ -1198,8 +1214,8 @@ public: virtual ~TAO_ImplementationRepository_Administration_Default_Proxy_Factory (void); - virtual ImplementationRepository::Administration_ptr create_proxy ( - ImplementationRepository::Administration_ptr proxy, + virtual Administration_ptr create_proxy ( + Administration_ptr proxy, CORBA::Environment &env = TAO_default_environment () ); @@ -1222,8 +1238,8 @@ public: TAO_default_environment () ); - ImplementationRepository::Administration_ptr create_proxy ( - ImplementationRepository::Administration_ptr proxy, + Administration_ptr create_proxy ( + Administration_ptr proxy, CORBA::Environment &env = TAO_default_environment () ); @@ -1240,10 +1256,10 @@ protected: }; typedef ACE_Singleton<TAO_ImplementationRepository_Administration_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_Administration_PROXY_FACTORY_ADAPTER; - class TAO_ImplementationRepository_Administration_Smart_Proxy_Base : public virtual ImplementationRepository::Administration + class TAO_ImplementationRepository_Administration_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, Administration) { public: - TAO_ImplementationRepository_Administration_Smart_Proxy_Base (ImplementationRepository::Administration_ptr proxy); + TAO_ImplementationRepository_Administration_Smart_Proxy_Base (::ImplementationRepository::Administration_ptr proxy); ~TAO_ImplementationRepository_Administration_Smart_Proxy_Base (void); virtual void activate_server ( const char * server, @@ -1342,7 +1358,7 @@ protected: )); private: - ImplementationRepository::Administration_var base_proxy_; + ::ImplementationRepository::Administration_var base_proxy_; }; @@ -1441,9 +1457,11 @@ public: ); static ServerInformationIterator_ptr _nil (void) { - return (ImplementationRepository::ServerInformationIterator_ptr)0; + return (ServerInformationIterator_ptr)0; } + static void _tao_any_destructor (void*); + virtual CORBA::Boolean next_n ( CORBA::ULong how_many, ImplementationRepository::ServerInformationList_out server_list, @@ -1489,8 +1507,8 @@ public: virtual ~TAO_ImplementationRepository_ServerInformationIterator_Default_Proxy_Factory (void); - virtual ImplementationRepository::ServerInformationIterator_ptr create_proxy ( - ImplementationRepository::ServerInformationIterator_ptr proxy, + virtual ServerInformationIterator_ptr create_proxy ( + ServerInformationIterator_ptr proxy, CORBA::Environment &env = TAO_default_environment () ); @@ -1513,8 +1531,8 @@ public: TAO_default_environment () ); - ImplementationRepository::ServerInformationIterator_ptr create_proxy ( - ImplementationRepository::ServerInformationIterator_ptr proxy, + ServerInformationIterator_ptr create_proxy ( + ServerInformationIterator_ptr proxy, CORBA::Environment &env = TAO_default_environment () ); @@ -1531,10 +1549,10 @@ protected: }; typedef ACE_Singleton<TAO_ImplementationRepository_ServerInformationIterator_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX> TAO_ImplementationRepository_ServerInformationIterator_PROXY_FACTORY_ADAPTER; - class TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base : public virtual ImplementationRepository::ServerInformationIterator + class TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base : public virtual ACE_NESTED_CLASS (ImplementationRepository, ServerInformationIterator) { public: - TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (ImplementationRepository::ServerInformationIterator_ptr proxy); + TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (::ImplementationRepository::ServerInformationIterator_ptr proxy); ~TAO_ImplementationRepository_ServerInformationIterator_Smart_Proxy_Base (void); virtual CORBA::Boolean next_n ( CORBA::ULong how_many, @@ -1555,7 +1573,7 @@ protected: )); private: - ImplementationRepository::ServerInformationIterator_var base_proxy_; + ::ImplementationRepository::ServerInformationIterator_var base_proxy_; }; @@ -1571,86 +1589,48 @@ 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 *&); // 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 *&); +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 *&); // 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 *&); +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 ); @@ -1660,10 +1640,8 @@ TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, ImplementationReposit #ifndef __ACE_INLINE__ -TAO_Export CORBA::Boolean -operator<< (TAO_OutputCDR &, const ImplementationRepository::ServerObject_ptr ); -TAO_Export CORBA::Boolean -operator>> (TAO_InputCDR &, ImplementationRepository::ServerObject_ptr &); +TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::ServerObject_ptr ); +TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::ServerObject_ptr &); TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::EnvironmentVariable &); TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::EnvironmentVariable &); @@ -1702,10 +1680,8 @@ TAO_Export CORBA::Boolean operator>> ( #endif /* _TAO_CDR_OP_ImplementationRepository_ServerInformationList_H_ */ -TAO_Export CORBA::Boolean -operator<< (TAO_OutputCDR &, const ImplementationRepository::Administration_ptr ); -TAO_Export CORBA::Boolean -operator>> (TAO_InputCDR &, ImplementationRepository::Administration_ptr &); +TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::Administration_ptr ); +TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::Administration_ptr &); TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::Administration::AlreadyRegistered &); TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::Administration::AlreadyRegistered &); @@ -1730,10 +1706,8 @@ TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository:: TAO_Export ostream& operator<< (ostream &, const ImplementationRepository::Administration::NotFound &); # endif /* ACE_LACKS_IOSTREAM_TOTALLY */ -TAO_Export CORBA::Boolean -operator<< (TAO_OutputCDR &, const ImplementationRepository::ServerInformationIterator_ptr ); -TAO_Export CORBA::Boolean -operator>> (TAO_InputCDR &, ImplementationRepository::ServerInformationIterator_ptr &); +TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const ImplementationRepository::ServerInformationIterator_ptr ); +TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::ServerInformationIterator_ptr &); #endif /* __ACE_INLINE__ */ diff --git a/TAO/tao/ImplRepoC.i b/TAO/tao/ImplRepoC.i index 3a4bac9eea9..66160e7d0c9 100644 --- a/TAO/tao/ImplRepoC.i +++ b/TAO/tao/ImplRepoC.i @@ -30,23 +30,23 @@ ImplementationRepository::ServerObject::~ServerObject (void) // destructor ACE_INLINE ImplementationRepository::ServerObject_var::ServerObject_var (void) // default constructor - : ptr_ (ImplementationRepository::ServerObject::_nil ()) + : ptr_ (ServerObject::_nil ()) {} ACE_INLINE -ImplementationRepository::ServerObject_var::ServerObject_var (ImplementationRepository::ServerObject_ptr p) +ImplementationRepository::ServerObject_var::ServerObject_var (ServerObject_ptr p) : ptr_ (p) {} -ACE_INLINE ImplementationRepository::ServerObject_ptr +ACE_INLINE ::ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject_var::ptr (void) const { return this->ptr_; } ACE_INLINE -ImplementationRepository::ServerObject_var::ServerObject_var (const ImplementationRepository::ServerObject_var &p) // copy constructor - : ptr_ (ImplementationRepository::ServerObject::_duplicate (p.ptr ())) +ImplementationRepository::ServerObject_var::ServerObject_var (const ::ImplementationRepository::ServerObject_var &p) // copy constructor + : ptr_ (ServerObject::_duplicate (p.ptr ())) {} ACE_INLINE @@ -56,7 +56,7 @@ ImplementationRepository::ServerObject_var::~ServerObject_var (void) // destruct } ACE_INLINE ImplementationRepository::ServerObject_var & -ImplementationRepository::ServerObject_var::operator= (ImplementationRepository::ServerObject_ptr p) +ImplementationRepository::ServerObject_var::operator= (ServerObject_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; @@ -64,60 +64,60 @@ ImplementationRepository::ServerObject_var::operator= (ImplementationRepository: } ACE_INLINE ImplementationRepository::ServerObject_var & -ImplementationRepository::ServerObject_var::operator= (const ImplementationRepository::ServerObject_var &p) +ImplementationRepository::ServerObject_var::operator= (const ::ImplementationRepository::ServerObject_var &p) { if (this != &p) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::ServerObject::_duplicate (p.ptr ()); + this->ptr_ = ::ImplementationRepository::ServerObject::_duplicate (p.ptr ()); } return *this; } ACE_INLINE -ImplementationRepository::ServerObject_var::operator const ImplementationRepository::ServerObject_ptr &() const // cast +ImplementationRepository::ServerObject_var::operator const ::ImplementationRepository::ServerObject_ptr &() const // cast { return this->ptr_; } ACE_INLINE -ImplementationRepository::ServerObject_var::operator ImplementationRepository::ServerObject_ptr &() // cast +ImplementationRepository::ServerObject_var::operator ::ImplementationRepository::ServerObject_ptr &() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerObject_ptr +ACE_INLINE ::ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerObject_ptr +ACE_INLINE ::ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject_var::in (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerObject_ptr & +ACE_INLINE ::ImplementationRepository::ServerObject_ptr & ImplementationRepository::ServerObject_var::inout (void) { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerObject_ptr & +ACE_INLINE ::ImplementationRepository::ServerObject_ptr & ImplementationRepository::ServerObject_var::out (void) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::ServerObject::_nil (); + this->ptr_ = ::ImplementationRepository::ServerObject::_nil (); return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerObject_ptr +ACE_INLINE ::ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject_var::_retn (void) { // yield ownership of managed obj reference - ImplementationRepository::ServerObject_ptr val = this->ptr_; - this->ptr_ = ImplementationRepository::ServerObject::_nil (); + ::ImplementationRepository::ServerObject_ptr val = this->ptr_; + this->ptr_ = ::ImplementationRepository::ServerObject::_nil (); return val; } @@ -133,59 +133,59 @@ ImplementationRepository::ServerObject_var::_retn (void) // ************************************************************* ACE_INLINE -ImplementationRepository::ServerObject_out::ServerObject_out (ImplementationRepository::ServerObject_ptr &p) +ImplementationRepository::ServerObject_out::ServerObject_out (ServerObject_ptr &p) : ptr_ (p) { - this->ptr_ = ImplementationRepository::ServerObject::_nil (); + this->ptr_ = ::ImplementationRepository::ServerObject::_nil (); } ACE_INLINE -ImplementationRepository::ServerObject_out::ServerObject_out (ImplementationRepository::ServerObject_var &p) // constructor from _var +ImplementationRepository::ServerObject_out::ServerObject_out (ServerObject_var &p) // constructor from _var : ptr_ (p.out ()) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::ServerObject::_nil (); + this->ptr_ = ::ImplementationRepository::ServerObject::_nil (); } ACE_INLINE -ImplementationRepository::ServerObject_out::ServerObject_out (const ImplementationRepository::ServerObject_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplementationRepository::ServerObject_out&,p).ptr_) +ImplementationRepository::ServerObject_out::ServerObject_out (const ::ImplementationRepository::ServerObject_out &p) // copy constructor + : ptr_ (ACE_const_cast (ServerObject_out &, p).ptr_) {} -ACE_INLINE ImplementationRepository::ServerObject_out & -ImplementationRepository::ServerObject_out::operator= (const ImplementationRepository::ServerObject_out &p) +ACE_INLINE ::ImplementationRepository::ServerObject_out & +ImplementationRepository::ServerObject_out::operator= (const ::ImplementationRepository::ServerObject_out &p) { - this->ptr_ = ACE_const_cast (ImplementationRepository::ServerObject_out&,p).ptr_; + this->ptr_ = ACE_const_cast (ServerObject_out&, p).ptr_; return *this; } ACE_INLINE ImplementationRepository::ServerObject_out & -ImplementationRepository::ServerObject_out::operator= (const ImplementationRepository::ServerObject_var &p) +ImplementationRepository::ServerObject_out::operator= (const ::ImplementationRepository::ServerObject_var &p) { - this->ptr_ = ImplementationRepository::ServerObject::_duplicate (p.ptr ()); + this->ptr_ = ::ImplementationRepository::ServerObject::_duplicate (p.ptr ()); return *this; } ACE_INLINE ImplementationRepository::ServerObject_out & -ImplementationRepository::ServerObject_out::operator= (ImplementationRepository::ServerObject_ptr p) +ImplementationRepository::ServerObject_out::operator= (ServerObject_ptr p) { this->ptr_ = p; return *this; } ACE_INLINE -ImplementationRepository::ServerObject_out::operator ImplementationRepository::ServerObject_ptr &() // cast +ImplementationRepository::ServerObject_out::operator ::ImplementationRepository::ServerObject_ptr &() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerObject_ptr & +ACE_INLINE ::ImplementationRepository::ServerObject_ptr & ImplementationRepository::ServerObject_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerObject_ptr +ACE_INLINE ::ImplementationRepository::ServerObject_ptr ImplementationRepository::ServerObject_out::operator-> (void) { return this->ptr_; @@ -204,15 +204,15 @@ ImplementationRepository::EnvironmentVariable_var::EnvironmentVariable_var (void {} ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::EnvironmentVariable_var (ImplementationRepository::EnvironmentVariable *p) +ImplementationRepository::EnvironmentVariable_var::EnvironmentVariable_var (EnvironmentVariable *p) : ptr_ (p) {} ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::EnvironmentVariable_var (const ImplementationRepository::EnvironmentVariable_var &p) // copy constructor +ImplementationRepository::EnvironmentVariable_var::EnvironmentVariable_var (const ::ImplementationRepository::EnvironmentVariable_var &p) // copy constructor { if (p.ptr_) - ACE_NEW (this->ptr_, ImplementationRepository::EnvironmentVariable (*p.ptr_)); + ACE_NEW (this->ptr_, ::ImplementationRepository::EnvironmentVariable (*p.ptr_)); else this->ptr_ = 0; } @@ -224,68 +224,75 @@ ImplementationRepository::EnvironmentVariable_var::~EnvironmentVariable_var (voi } ACE_INLINE ImplementationRepository::EnvironmentVariable_var & -ImplementationRepository::EnvironmentVariable_var::operator= (ImplementationRepository::EnvironmentVariable *p) +ImplementationRepository::EnvironmentVariable_var::operator= (EnvironmentVariable *p) { delete this->ptr_; this->ptr_ = p; return *this; } -ACE_INLINE ImplementationRepository::EnvironmentVariable_var & -ImplementationRepository::EnvironmentVariable_var::operator= (const ImplementationRepository::EnvironmentVariable_var &p) +ACE_INLINE ::ImplementationRepository::EnvironmentVariable_var & +ImplementationRepository::EnvironmentVariable_var::operator= (const ::ImplementationRepository::EnvironmentVariable_var &p) { if (this != &p) { delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ImplementationRepository::EnvironmentVariable (*p.ptr_), *this); + ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::EnvironmentVariable (*p.ptr_), *this); } return *this; } -ACE_INLINE const ImplementationRepository::EnvironmentVariable * +ACE_INLINE const ::ImplementationRepository::EnvironmentVariable * ImplementationRepository::EnvironmentVariable_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentVariable * +ACE_INLINE ::ImplementationRepository::EnvironmentVariable * ImplementationRepository::EnvironmentVariable_var::operator-> (void) { return this->ptr_; } ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::operator const ImplementationRepository::EnvironmentVariable &() const // cast +ImplementationRepository::EnvironmentVariable_var::operator const ::ImplementationRepository::EnvironmentVariable &() const // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::operator ImplementationRepository::EnvironmentVariable &() // cast +ImplementationRepository::EnvironmentVariable_var::operator ::ImplementationRepository::EnvironmentVariable &() // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::EnvironmentVariable_var::operator ImplementationRepository::EnvironmentVariable &() const// cast +ImplementationRepository::EnvironmentVariable_var::operator ::ImplementationRepository::EnvironmentVariable &() const // cast { return *this->ptr_; } -ACE_INLINE const ImplementationRepository::EnvironmentVariable & +// variable-size types only +ACE_INLINE +ImplementationRepository::EnvironmentVariable_var::operator ::ImplementationRepository::EnvironmentVariable *&() // cast +{ + return this->ptr_; +} + +ACE_INLINE const ::ImplementationRepository::EnvironmentVariable & ImplementationRepository::EnvironmentVariable_var::in (void) const { return *this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentVariable & +ACE_INLINE ::ImplementationRepository::EnvironmentVariable & ImplementationRepository::EnvironmentVariable_var::inout (void) { return *this->ptr_; } // mapping for variable size -ACE_INLINE ImplementationRepository::EnvironmentVariable *& +ACE_INLINE ::ImplementationRepository::EnvironmentVariable *& ImplementationRepository::EnvironmentVariable_var::out (void) { delete this->ptr_; @@ -293,15 +300,15 @@ ImplementationRepository::EnvironmentVariable_var::out (void) return this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentVariable * +ACE_INLINE ::ImplementationRepository::EnvironmentVariable * ImplementationRepository::EnvironmentVariable_var::_retn (void) { - ImplementationRepository::EnvironmentVariable *tmp = this->ptr_; + ::ImplementationRepository::EnvironmentVariable *tmp = this->ptr_; this->ptr_ = 0; return tmp; } -ACE_INLINE ImplementationRepository::EnvironmentVariable * +ACE_INLINE ::ImplementationRepository::EnvironmentVariable * ImplementationRepository::EnvironmentVariable_var::ptr (void) const { return this->ptr_; @@ -312,14 +319,14 @@ ImplementationRepository::EnvironmentVariable_var::ptr (void) const // ************************************************************* ACE_INLINE -ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (ImplementationRepository::EnvironmentVariable *&p) +ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (::ImplementationRepository::EnvironmentVariable *&p) : ptr_ (p) { this->ptr_ = 0; } ACE_INLINE -ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (ImplementationRepository::EnvironmentVariable_var &p) // constructor from _var +ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (EnvironmentVariable_var &p) // constructor from _var : ptr_ (p.out ()) { delete this->ptr_; @@ -327,37 +334,37 @@ ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (Impl } ACE_INLINE -ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (const ImplementationRepository::EnvironmentVariable_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplementationRepository::EnvironmentVariable_out&,p).ptr_) +ImplementationRepository::EnvironmentVariable_out::EnvironmentVariable_out (const ::ImplementationRepository::EnvironmentVariable_out &p) // copy constructor + : ptr_ (ACE_const_cast (EnvironmentVariable_out&, p).ptr_) {} ACE_INLINE ImplementationRepository::EnvironmentVariable_out & -ImplementationRepository::EnvironmentVariable_out::operator= (const ImplementationRepository::EnvironmentVariable_out &p) +ImplementationRepository::EnvironmentVariable_out::operator= (const ::ImplementationRepository::EnvironmentVariable_out &p) { - this->ptr_ = ACE_const_cast (ImplementationRepository::EnvironmentVariable_out&,p).ptr_; + this->ptr_ = ACE_const_cast (EnvironmentVariable_out&, p).ptr_; return *this; } ACE_INLINE ImplementationRepository::EnvironmentVariable_out & -ImplementationRepository::EnvironmentVariable_out::operator= (ImplementationRepository::EnvironmentVariable *p) +ImplementationRepository::EnvironmentVariable_out::operator= (EnvironmentVariable *p) { this->ptr_ = p; return *this; } ACE_INLINE -ImplementationRepository::EnvironmentVariable_out::operator ImplementationRepository::EnvironmentVariable *&() // cast +ImplementationRepository::EnvironmentVariable_out::operator ::ImplementationRepository::EnvironmentVariable *&() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentVariable *& +ACE_INLINE ::ImplementationRepository::EnvironmentVariable *& ImplementationRepository::EnvironmentVariable_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentVariable * +ACE_INLINE ::ImplementationRepository::EnvironmentVariable * ImplementationRepository::EnvironmentVariable_out::operator-> (void) { return this->ptr_; @@ -392,7 +399,7 @@ ImplementationRepository::EnvironmentVariable_out::operator-> (void) ACE_INLINE ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (CORBA::ULong maximum) // Constructor using a maximum length value. - : TAO_Unbounded_Base_Sequence (maximum, ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (maximum)) + : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (maximum)) { } @@ -406,13 +413,13 @@ ImplementationRepository::EnvironmentVariable_out::operator-> (void) } ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (const ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &rhs) + ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList (const _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &rhs) // Copy constructor. : TAO_Unbounded_Base_Sequence (rhs) { if (rhs.buffer_ != 0) { - ImplementationRepository::EnvironmentVariable *tmp1 = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (this->maximum_); + ImplementationRepository::EnvironmentVariable *tmp1 = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (this->maximum_); ImplementationRepository::EnvironmentVariable * const tmp2 = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable * ACE_CAST_CONST, rhs.buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) @@ -427,7 +434,7 @@ ImplementationRepository::EnvironmentVariable_out::operator-> (void) } ACE_INLINE ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList & - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::operator= (const ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &rhs) + ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::operator= (const _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList &rhs) // Assignment operator. { if (this == &rhs) @@ -439,12 +446,12 @@ ImplementationRepository::EnvironmentVariable_out::operator-> (void) { // free the old buffer ImplementationRepository::EnvironmentVariable *tmp = ACE_reinterpret_cast (ImplementationRepository::EnvironmentVariable *, this->buffer_); - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); - this->buffer_ = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (rhs.maximum_); + _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); + this->buffer_ = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (rhs.maximum_); } } else - this->buffer_ = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (rhs.maximum_); + this->buffer_ = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (rhs.maximum_); TAO_Unbounded_Base_Sequence::operator= (rhs); @@ -487,7 +494,7 @@ ImplementationRepository::EnvironmentVariable_out::operator-> (void) // We retain ownership. if (this->buffer_ == 0) { - result = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (this->length_); + result = _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::allocbuf (this->length_); this->buffer_ = result; } else @@ -528,7 +535,7 @@ ImplementationRepository::EnvironmentVariable_out::operator-> (void) if (this->buffer_ && this->release_ == 1) { ImplementationRepository::EnvironmentVariable *tmp = ACE_reinterpret_cast(ImplementationRepository::EnvironmentVariable*,this->buffer_); - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); + _TAO_Unbounded_Sequence_ImplementationRepository_EnvironmentList::freebuf (tmp); } this->buffer_ = data; this->release_ = release; @@ -552,15 +559,15 @@ ImplementationRepository::EnvironmentList_var::EnvironmentList_var (void) // def {} ACE_INLINE -ImplementationRepository::EnvironmentList_var::EnvironmentList_var (ImplementationRepository::EnvironmentList *p) +ImplementationRepository::EnvironmentList_var::EnvironmentList_var (EnvironmentList *p) : ptr_ (p) {} ACE_INLINE -ImplementationRepository::EnvironmentList_var::EnvironmentList_var (const ImplementationRepository::EnvironmentList_var &p) // copy constructor +ImplementationRepository::EnvironmentList_var::EnvironmentList_var (const ::ImplementationRepository::EnvironmentList_var &p) // copy constructor { if (p.ptr_) - ACE_NEW (this->ptr_, ImplementationRepository::EnvironmentList (*p.ptr_)); + ACE_NEW (this->ptr_, ::ImplementationRepository::EnvironmentList (*p.ptr_)); else this->ptr_ = 0; } @@ -572,7 +579,7 @@ ImplementationRepository::EnvironmentList_var::~EnvironmentList_var (void) // de } ACE_INLINE ImplementationRepository::EnvironmentList_var & -ImplementationRepository::EnvironmentList_var::operator= (ImplementationRepository::EnvironmentList *p) +ImplementationRepository::EnvironmentList_var::operator= (EnvironmentList *p) { delete this->ptr_; this->ptr_ = p; @@ -580,66 +587,73 @@ ImplementationRepository::EnvironmentList_var::operator= (ImplementationReposito } ACE_INLINE ImplementationRepository::EnvironmentList_var & -ImplementationRepository::EnvironmentList_var::operator= (const ImplementationRepository::EnvironmentList_var &p) // deep copy +ImplementationRepository::EnvironmentList_var::operator= (const ::ImplementationRepository::EnvironmentList_var &p) // deep copy { if (this != &p) { delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ImplementationRepository::EnvironmentList (*p.ptr_), *this); + ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::EnvironmentList (*p.ptr_), *this); } return *this; } -ACE_INLINE const ImplementationRepository::EnvironmentList * +ACE_INLINE const ::ImplementationRepository::EnvironmentList * ImplementationRepository::EnvironmentList_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentList * +ACE_INLINE ::ImplementationRepository::EnvironmentList * ImplementationRepository::EnvironmentList_var::operator-> (void) { return this->ptr_; } ACE_INLINE -ImplementationRepository::EnvironmentList_var::operator const ImplementationRepository::EnvironmentList &() const // cast +ImplementationRepository::EnvironmentList_var::operator const ::ImplementationRepository::EnvironmentList &() const // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::EnvironmentList_var::operator ImplementationRepository::EnvironmentList &() // cast +ImplementationRepository::EnvironmentList_var::operator ::ImplementationRepository::EnvironmentList &() // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::EnvironmentList_var::operator ImplementationRepository::EnvironmentList &() const// cast +ImplementationRepository::EnvironmentList_var::operator ::ImplementationRepository::EnvironmentList &() const // cast { return *this->ptr_; } +// variable-size types only +ACE_INLINE +ImplementationRepository::EnvironmentList_var::operator ::ImplementationRepository::EnvironmentList *&() // cast +{ + return this->ptr_; +} + ACE_INLINE ImplementationRepository::EnvironmentVariable & ImplementationRepository::EnvironmentList_var::operator[] (CORBA::ULong index) { return this->ptr_->operator[] (index); } -ACE_INLINE const ImplementationRepository::EnvironmentList & +ACE_INLINE const ::ImplementationRepository::EnvironmentList & ImplementationRepository::EnvironmentList_var::in (void) const { return *this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentList & +ACE_INLINE ::ImplementationRepository::EnvironmentList & ImplementationRepository::EnvironmentList_var::inout (void) { return *this->ptr_; } // mapping for variable size -ACE_INLINE ImplementationRepository::EnvironmentList *& +ACE_INLINE ::ImplementationRepository::EnvironmentList *& ImplementationRepository::EnvironmentList_var::out (void) { delete this->ptr_; @@ -647,15 +661,15 @@ ImplementationRepository::EnvironmentList_var::out (void) return this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentList * +ACE_INLINE ::ImplementationRepository::EnvironmentList * ImplementationRepository::EnvironmentList_var::_retn (void) { - ImplementationRepository::EnvironmentList *tmp = this->ptr_; + ::ImplementationRepository::EnvironmentList *tmp = this->ptr_; this->ptr_ = 0; return tmp; } -ACE_INLINE ImplementationRepository::EnvironmentList * +ACE_INLINE ::ImplementationRepository::EnvironmentList * ImplementationRepository::EnvironmentList_var::ptr (void) const { return this->ptr_; @@ -666,14 +680,14 @@ ImplementationRepository::EnvironmentList_var::ptr (void) const // ************************************************************* ACE_INLINE -ImplementationRepository::EnvironmentList_out::EnvironmentList_out (ImplementationRepository::EnvironmentList *&p) +ImplementationRepository::EnvironmentList_out::EnvironmentList_out (EnvironmentList *&p) : ptr_ (p) { this->ptr_ = 0; } ACE_INLINE -ImplementationRepository::EnvironmentList_out::EnvironmentList_out (ImplementationRepository::EnvironmentList_var &p) // constructor from _var +ImplementationRepository::EnvironmentList_out::EnvironmentList_out (EnvironmentList_var &p) // constructor from _var : ptr_ (p.out ()) { delete this->ptr_; @@ -681,37 +695,37 @@ ImplementationRepository::EnvironmentList_out::EnvironmentList_out (Implementati } ACE_INLINE -ImplementationRepository::EnvironmentList_out::EnvironmentList_out (const ImplementationRepository::EnvironmentList_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplementationRepository::EnvironmentList_out&,p).ptr_) +ImplementationRepository::EnvironmentList_out::EnvironmentList_out (const ::ImplementationRepository::EnvironmentList_out &p) // copy constructor + : ptr_ (ACE_const_cast (EnvironmentList_out&, p).ptr_) {} -ACE_INLINE ImplementationRepository::EnvironmentList_out & -ImplementationRepository::EnvironmentList_out::operator= (const ImplementationRepository::EnvironmentList_out &p) +ACE_INLINE ::ImplementationRepository::EnvironmentList_out & +ImplementationRepository::EnvironmentList_out::operator= (const ::ImplementationRepository::EnvironmentList_out &p) { - this->ptr_ = ACE_const_cast (ImplementationRepository::EnvironmentList_out&,p).ptr_; + this->ptr_ = ACE_const_cast (EnvironmentList_out&, p).ptr_; return *this; } -ACE_INLINE ImplementationRepository::EnvironmentList_out & -ImplementationRepository::EnvironmentList_out::operator= (ImplementationRepository::EnvironmentList *p) +ACE_INLINE ::ImplementationRepository::EnvironmentList_out & +ImplementationRepository::EnvironmentList_out::operator= (EnvironmentList *p) { this->ptr_ = p; return *this; } ACE_INLINE -ImplementationRepository::EnvironmentList_out::operator ImplementationRepository::EnvironmentList *&() // cast +ImplementationRepository::EnvironmentList_out::operator ::ImplementationRepository::EnvironmentList *&() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentList *& +ACE_INLINE ::ImplementationRepository::EnvironmentList *& ImplementationRepository::EnvironmentList_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE ImplementationRepository::EnvironmentList * +ACE_INLINE ::ImplementationRepository::EnvironmentList * ImplementationRepository::EnvironmentList_out::operator-> (void) { return this->ptr_; @@ -736,15 +750,15 @@ ImplementationRepository::StartupOptions_var::StartupOptions_var (void) // defau {} ACE_INLINE -ImplementationRepository::StartupOptions_var::StartupOptions_var (ImplementationRepository::StartupOptions *p) +ImplementationRepository::StartupOptions_var::StartupOptions_var (StartupOptions *p) : ptr_ (p) {} ACE_INLINE -ImplementationRepository::StartupOptions_var::StartupOptions_var (const ImplementationRepository::StartupOptions_var &p) // copy constructor +ImplementationRepository::StartupOptions_var::StartupOptions_var (const ::ImplementationRepository::StartupOptions_var &p) // copy constructor { if (p.ptr_) - ACE_NEW (this->ptr_, ImplementationRepository::StartupOptions (*p.ptr_)); + ACE_NEW (this->ptr_, ::ImplementationRepository::StartupOptions (*p.ptr_)); else this->ptr_ = 0; } @@ -756,68 +770,75 @@ ImplementationRepository::StartupOptions_var::~StartupOptions_var (void) // dest } ACE_INLINE ImplementationRepository::StartupOptions_var & -ImplementationRepository::StartupOptions_var::operator= (ImplementationRepository::StartupOptions *p) +ImplementationRepository::StartupOptions_var::operator= (StartupOptions *p) { delete this->ptr_; this->ptr_ = p; return *this; } -ACE_INLINE ImplementationRepository::StartupOptions_var & -ImplementationRepository::StartupOptions_var::operator= (const ImplementationRepository::StartupOptions_var &p) +ACE_INLINE ::ImplementationRepository::StartupOptions_var & +ImplementationRepository::StartupOptions_var::operator= (const ::ImplementationRepository::StartupOptions_var &p) { if (this != &p) { delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ImplementationRepository::StartupOptions (*p.ptr_), *this); + ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::StartupOptions (*p.ptr_), *this); } return *this; } -ACE_INLINE const ImplementationRepository::StartupOptions * +ACE_INLINE const ::ImplementationRepository::StartupOptions * ImplementationRepository::StartupOptions_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::StartupOptions * +ACE_INLINE ::ImplementationRepository::StartupOptions * ImplementationRepository::StartupOptions_var::operator-> (void) { return this->ptr_; } ACE_INLINE -ImplementationRepository::StartupOptions_var::operator const ImplementationRepository::StartupOptions &() const // cast +ImplementationRepository::StartupOptions_var::operator const ::ImplementationRepository::StartupOptions &() const // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::StartupOptions_var::operator ImplementationRepository::StartupOptions &() // cast +ImplementationRepository::StartupOptions_var::operator ::ImplementationRepository::StartupOptions &() // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::StartupOptions_var::operator ImplementationRepository::StartupOptions &() const// cast +ImplementationRepository::StartupOptions_var::operator ::ImplementationRepository::StartupOptions &() const // cast { return *this->ptr_; } -ACE_INLINE const ImplementationRepository::StartupOptions & +// variable-size types only +ACE_INLINE +ImplementationRepository::StartupOptions_var::operator ::ImplementationRepository::StartupOptions *&() // cast +{ + return this->ptr_; +} + +ACE_INLINE const ::ImplementationRepository::StartupOptions & ImplementationRepository::StartupOptions_var::in (void) const { return *this->ptr_; } -ACE_INLINE ImplementationRepository::StartupOptions & +ACE_INLINE ::ImplementationRepository::StartupOptions & ImplementationRepository::StartupOptions_var::inout (void) { return *this->ptr_; } // mapping for variable size -ACE_INLINE ImplementationRepository::StartupOptions *& +ACE_INLINE ::ImplementationRepository::StartupOptions *& ImplementationRepository::StartupOptions_var::out (void) { delete this->ptr_; @@ -825,15 +846,15 @@ ImplementationRepository::StartupOptions_var::out (void) return this->ptr_; } -ACE_INLINE ImplementationRepository::StartupOptions * +ACE_INLINE ::ImplementationRepository::StartupOptions * ImplementationRepository::StartupOptions_var::_retn (void) { - ImplementationRepository::StartupOptions *tmp = this->ptr_; + ::ImplementationRepository::StartupOptions *tmp = this->ptr_; this->ptr_ = 0; return tmp; } -ACE_INLINE ImplementationRepository::StartupOptions * +ACE_INLINE ::ImplementationRepository::StartupOptions * ImplementationRepository::StartupOptions_var::ptr (void) const { return this->ptr_; @@ -844,14 +865,14 @@ ImplementationRepository::StartupOptions_var::ptr (void) const // ************************************************************* ACE_INLINE -ImplementationRepository::StartupOptions_out::StartupOptions_out (ImplementationRepository::StartupOptions *&p) +ImplementationRepository::StartupOptions_out::StartupOptions_out (::ImplementationRepository::StartupOptions *&p) : ptr_ (p) { this->ptr_ = 0; } ACE_INLINE -ImplementationRepository::StartupOptions_out::StartupOptions_out (ImplementationRepository::StartupOptions_var &p) // constructor from _var +ImplementationRepository::StartupOptions_out::StartupOptions_out (StartupOptions_var &p) // constructor from _var : ptr_ (p.out ()) { delete this->ptr_; @@ -859,37 +880,37 @@ ImplementationRepository::StartupOptions_out::StartupOptions_out (Implementation } ACE_INLINE -ImplementationRepository::StartupOptions_out::StartupOptions_out (const ImplementationRepository::StartupOptions_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplementationRepository::StartupOptions_out&,p).ptr_) +ImplementationRepository::StartupOptions_out::StartupOptions_out (const ::ImplementationRepository::StartupOptions_out &p) // copy constructor + : ptr_ (ACE_const_cast (StartupOptions_out&, p).ptr_) {} ACE_INLINE ImplementationRepository::StartupOptions_out & -ImplementationRepository::StartupOptions_out::operator= (const ImplementationRepository::StartupOptions_out &p) +ImplementationRepository::StartupOptions_out::operator= (const ::ImplementationRepository::StartupOptions_out &p) { - this->ptr_ = ACE_const_cast (ImplementationRepository::StartupOptions_out&,p).ptr_; + this->ptr_ = ACE_const_cast (StartupOptions_out&, p).ptr_; return *this; } ACE_INLINE ImplementationRepository::StartupOptions_out & -ImplementationRepository::StartupOptions_out::operator= (ImplementationRepository::StartupOptions *p) +ImplementationRepository::StartupOptions_out::operator= (StartupOptions *p) { this->ptr_ = p; return *this; } ACE_INLINE -ImplementationRepository::StartupOptions_out::operator ImplementationRepository::StartupOptions *&() // cast +ImplementationRepository::StartupOptions_out::operator ::ImplementationRepository::StartupOptions *&() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::StartupOptions *& +ACE_INLINE ::ImplementationRepository::StartupOptions *& ImplementationRepository::StartupOptions_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE ImplementationRepository::StartupOptions * +ACE_INLINE ::ImplementationRepository::StartupOptions * ImplementationRepository::StartupOptions_out::operator-> (void) { return this->ptr_; @@ -905,15 +926,15 @@ ImplementationRepository::ServerInformation_var::ServerInformation_var (void) // {} ACE_INLINE -ImplementationRepository::ServerInformation_var::ServerInformation_var (ImplementationRepository::ServerInformation *p) +ImplementationRepository::ServerInformation_var::ServerInformation_var (ServerInformation *p) : ptr_ (p) {} ACE_INLINE -ImplementationRepository::ServerInformation_var::ServerInformation_var (const ImplementationRepository::ServerInformation_var &p) // copy constructor +ImplementationRepository::ServerInformation_var::ServerInformation_var (const ::ImplementationRepository::ServerInformation_var &p) // copy constructor { if (p.ptr_) - ACE_NEW (this->ptr_, ImplementationRepository::ServerInformation (*p.ptr_)); + ACE_NEW (this->ptr_, ::ImplementationRepository::ServerInformation (*p.ptr_)); else this->ptr_ = 0; } @@ -925,68 +946,75 @@ ImplementationRepository::ServerInformation_var::~ServerInformation_var (void) / } ACE_INLINE ImplementationRepository::ServerInformation_var & -ImplementationRepository::ServerInformation_var::operator= (ImplementationRepository::ServerInformation *p) +ImplementationRepository::ServerInformation_var::operator= (ServerInformation *p) { delete this->ptr_; this->ptr_ = p; return *this; } -ACE_INLINE ImplementationRepository::ServerInformation_var & -ImplementationRepository::ServerInformation_var::operator= (const ImplementationRepository::ServerInformation_var &p) +ACE_INLINE ::ImplementationRepository::ServerInformation_var & +ImplementationRepository::ServerInformation_var::operator= (const ::ImplementationRepository::ServerInformation_var &p) { if (this != &p) { delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ImplementationRepository::ServerInformation (*p.ptr_), *this); + ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::ServerInformation (*p.ptr_), *this); } return *this; } -ACE_INLINE const ImplementationRepository::ServerInformation * +ACE_INLINE const ::ImplementationRepository::ServerInformation * ImplementationRepository::ServerInformation_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformation * +ACE_INLINE ::ImplementationRepository::ServerInformation * ImplementationRepository::ServerInformation_var::operator-> (void) { return this->ptr_; } ACE_INLINE -ImplementationRepository::ServerInformation_var::operator const ImplementationRepository::ServerInformation &() const // cast +ImplementationRepository::ServerInformation_var::operator const ::ImplementationRepository::ServerInformation &() const // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::ServerInformation_var::operator ImplementationRepository::ServerInformation &() // cast +ImplementationRepository::ServerInformation_var::operator ::ImplementationRepository::ServerInformation &() // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::ServerInformation_var::operator ImplementationRepository::ServerInformation &() const// cast +ImplementationRepository::ServerInformation_var::operator ::ImplementationRepository::ServerInformation &() const // cast { return *this->ptr_; } -ACE_INLINE const ImplementationRepository::ServerInformation & +// variable-size types only +ACE_INLINE +ImplementationRepository::ServerInformation_var::operator ::ImplementationRepository::ServerInformation *&() // cast +{ + return this->ptr_; +} + +ACE_INLINE const ::ImplementationRepository::ServerInformation & ImplementationRepository::ServerInformation_var::in (void) const { return *this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformation & +ACE_INLINE ::ImplementationRepository::ServerInformation & ImplementationRepository::ServerInformation_var::inout (void) { return *this->ptr_; } // mapping for variable size -ACE_INLINE ImplementationRepository::ServerInformation *& +ACE_INLINE ::ImplementationRepository::ServerInformation *& ImplementationRepository::ServerInformation_var::out (void) { delete this->ptr_; @@ -994,15 +1022,15 @@ ImplementationRepository::ServerInformation_var::out (void) return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformation * +ACE_INLINE ::ImplementationRepository::ServerInformation * ImplementationRepository::ServerInformation_var::_retn (void) { - ImplementationRepository::ServerInformation *tmp = this->ptr_; + ::ImplementationRepository::ServerInformation *tmp = this->ptr_; this->ptr_ = 0; return tmp; } -ACE_INLINE ImplementationRepository::ServerInformation * +ACE_INLINE ::ImplementationRepository::ServerInformation * ImplementationRepository::ServerInformation_var::ptr (void) const { return this->ptr_; @@ -1013,14 +1041,14 @@ ImplementationRepository::ServerInformation_var::ptr (void) const // ************************************************************* ACE_INLINE -ImplementationRepository::ServerInformation_out::ServerInformation_out (ImplementationRepository::ServerInformation *&p) +ImplementationRepository::ServerInformation_out::ServerInformation_out (::ImplementationRepository::ServerInformation *&p) : ptr_ (p) { this->ptr_ = 0; } ACE_INLINE -ImplementationRepository::ServerInformation_out::ServerInformation_out (ImplementationRepository::ServerInformation_var &p) // constructor from _var +ImplementationRepository::ServerInformation_out::ServerInformation_out (ServerInformation_var &p) // constructor from _var : ptr_ (p.out ()) { delete this->ptr_; @@ -1028,37 +1056,37 @@ ImplementationRepository::ServerInformation_out::ServerInformation_out (Implemen } ACE_INLINE -ImplementationRepository::ServerInformation_out::ServerInformation_out (const ImplementationRepository::ServerInformation_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplementationRepository::ServerInformation_out&,p).ptr_) +ImplementationRepository::ServerInformation_out::ServerInformation_out (const ::ImplementationRepository::ServerInformation_out &p) // copy constructor + : ptr_ (ACE_const_cast (ServerInformation_out&, p).ptr_) {} ACE_INLINE ImplementationRepository::ServerInformation_out & -ImplementationRepository::ServerInformation_out::operator= (const ImplementationRepository::ServerInformation_out &p) +ImplementationRepository::ServerInformation_out::operator= (const ::ImplementationRepository::ServerInformation_out &p) { - this->ptr_ = ACE_const_cast (ImplementationRepository::ServerInformation_out&,p).ptr_; + this->ptr_ = ACE_const_cast (ServerInformation_out&, p).ptr_; return *this; } ACE_INLINE ImplementationRepository::ServerInformation_out & -ImplementationRepository::ServerInformation_out::operator= (ImplementationRepository::ServerInformation *p) +ImplementationRepository::ServerInformation_out::operator= (ServerInformation *p) { this->ptr_ = p; return *this; } ACE_INLINE -ImplementationRepository::ServerInformation_out::operator ImplementationRepository::ServerInformation *&() // cast +ImplementationRepository::ServerInformation_out::operator ::ImplementationRepository::ServerInformation *&() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformation *& +ACE_INLINE ::ImplementationRepository::ServerInformation *& ImplementationRepository::ServerInformation_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformation * +ACE_INLINE ::ImplementationRepository::ServerInformation * ImplementationRepository::ServerInformation_out::operator-> (void) { return this->ptr_; @@ -1093,7 +1121,7 @@ ImplementationRepository::ServerInformation_out::operator-> (void) ACE_INLINE ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (CORBA::ULong maximum) // Constructor using a maximum length value. - : TAO_Unbounded_Base_Sequence (maximum, ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (maximum)) + : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (maximum)) { } @@ -1107,13 +1135,13 @@ ImplementationRepository::ServerInformation_out::operator-> (void) } ACE_INLINE - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (const ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &rhs) + ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList (const _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &rhs) // Copy constructor. : TAO_Unbounded_Base_Sequence (rhs) { if (rhs.buffer_ != 0) { - ImplementationRepository::ServerInformation *tmp1 = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (this->maximum_); + ImplementationRepository::ServerInformation *tmp1 = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (this->maximum_); ImplementationRepository::ServerInformation * const tmp2 = ACE_reinterpret_cast (ImplementationRepository::ServerInformation * ACE_CAST_CONST, rhs.buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) @@ -1128,7 +1156,7 @@ ImplementationRepository::ServerInformation_out::operator-> (void) } ACE_INLINE ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList & - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::operator= (const ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &rhs) + ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::operator= (const _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList &rhs) // Assignment operator. { if (this == &rhs) @@ -1140,12 +1168,12 @@ ImplementationRepository::ServerInformation_out::operator-> (void) { // free the old buffer ImplementationRepository::ServerInformation *tmp = ACE_reinterpret_cast (ImplementationRepository::ServerInformation *, this->buffer_); - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); - this->buffer_ = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (rhs.maximum_); + _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); + this->buffer_ = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (rhs.maximum_); } } else - this->buffer_ = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (rhs.maximum_); + this->buffer_ = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (rhs.maximum_); TAO_Unbounded_Base_Sequence::operator= (rhs); @@ -1188,7 +1216,7 @@ ImplementationRepository::ServerInformation_out::operator-> (void) // We retain ownership. if (this->buffer_ == 0) { - result = ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (this->length_); + result = _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::allocbuf (this->length_); this->buffer_ = result; } else @@ -1229,7 +1257,7 @@ ImplementationRepository::ServerInformation_out::operator-> (void) if (this->buffer_ && this->release_ == 1) { ImplementationRepository::ServerInformation *tmp = ACE_reinterpret_cast(ImplementationRepository::ServerInformation*,this->buffer_); - ImplementationRepository::_TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); + _TAO_Unbounded_Sequence_ImplementationRepository_ServerInformationList::freebuf (tmp); } this->buffer_ = data; this->release_ = release; @@ -1253,15 +1281,15 @@ ImplementationRepository::ServerInformationList_var::ServerInformationList_var ( {} ACE_INLINE -ImplementationRepository::ServerInformationList_var::ServerInformationList_var (ImplementationRepository::ServerInformationList *p) +ImplementationRepository::ServerInformationList_var::ServerInformationList_var (ServerInformationList *p) : ptr_ (p) {} ACE_INLINE -ImplementationRepository::ServerInformationList_var::ServerInformationList_var (const ImplementationRepository::ServerInformationList_var &p) // copy constructor +ImplementationRepository::ServerInformationList_var::ServerInformationList_var (const ::ImplementationRepository::ServerInformationList_var &p) // copy constructor { if (p.ptr_) - ACE_NEW (this->ptr_, ImplementationRepository::ServerInformationList (*p.ptr_)); + ACE_NEW (this->ptr_, ::ImplementationRepository::ServerInformationList (*p.ptr_)); else this->ptr_ = 0; } @@ -1273,7 +1301,7 @@ ImplementationRepository::ServerInformationList_var::~ServerInformationList_var } ACE_INLINE ImplementationRepository::ServerInformationList_var & -ImplementationRepository::ServerInformationList_var::operator= (ImplementationRepository::ServerInformationList *p) +ImplementationRepository::ServerInformationList_var::operator= (ServerInformationList *p) { delete this->ptr_; this->ptr_ = p; @@ -1281,66 +1309,73 @@ ImplementationRepository::ServerInformationList_var::operator= (ImplementationRe } ACE_INLINE ImplementationRepository::ServerInformationList_var & -ImplementationRepository::ServerInformationList_var::operator= (const ImplementationRepository::ServerInformationList_var &p) // deep copy +ImplementationRepository::ServerInformationList_var::operator= (const ::ImplementationRepository::ServerInformationList_var &p) // deep copy { if (this != &p) { delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ImplementationRepository::ServerInformationList (*p.ptr_), *this); + ACE_NEW_RETURN (this->ptr_, ::ImplementationRepository::ServerInformationList (*p.ptr_), *this); } return *this; } -ACE_INLINE const ImplementationRepository::ServerInformationList * +ACE_INLINE const ::ImplementationRepository::ServerInformationList * ImplementationRepository::ServerInformationList_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationList * +ACE_INLINE ::ImplementationRepository::ServerInformationList * ImplementationRepository::ServerInformationList_var::operator-> (void) { return this->ptr_; } ACE_INLINE -ImplementationRepository::ServerInformationList_var::operator const ImplementationRepository::ServerInformationList &() const // cast +ImplementationRepository::ServerInformationList_var::operator const ::ImplementationRepository::ServerInformationList &() const // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::ServerInformationList_var::operator ImplementationRepository::ServerInformationList &() // cast +ImplementationRepository::ServerInformationList_var::operator ::ImplementationRepository::ServerInformationList &() // cast { return *this->ptr_; } ACE_INLINE -ImplementationRepository::ServerInformationList_var::operator ImplementationRepository::ServerInformationList &() const// cast +ImplementationRepository::ServerInformationList_var::operator ::ImplementationRepository::ServerInformationList &() const // cast { return *this->ptr_; } +// variable-size types only +ACE_INLINE +ImplementationRepository::ServerInformationList_var::operator ::ImplementationRepository::ServerInformationList *&() // cast +{ + return this->ptr_; +} + ACE_INLINE ImplementationRepository::ServerInformation & ImplementationRepository::ServerInformationList_var::operator[] (CORBA::ULong index) { return this->ptr_->operator[] (index); } -ACE_INLINE const ImplementationRepository::ServerInformationList & +ACE_INLINE const ::ImplementationRepository::ServerInformationList & ImplementationRepository::ServerInformationList_var::in (void) const { return *this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationList & +ACE_INLINE ::ImplementationRepository::ServerInformationList & ImplementationRepository::ServerInformationList_var::inout (void) { return *this->ptr_; } // mapping for variable size -ACE_INLINE ImplementationRepository::ServerInformationList *& +ACE_INLINE ::ImplementationRepository::ServerInformationList *& ImplementationRepository::ServerInformationList_var::out (void) { delete this->ptr_; @@ -1348,15 +1383,15 @@ ImplementationRepository::ServerInformationList_var::out (void) return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationList * +ACE_INLINE ::ImplementationRepository::ServerInformationList * ImplementationRepository::ServerInformationList_var::_retn (void) { - ImplementationRepository::ServerInformationList *tmp = this->ptr_; + ::ImplementationRepository::ServerInformationList *tmp = this->ptr_; this->ptr_ = 0; return tmp; } -ACE_INLINE ImplementationRepository::ServerInformationList * +ACE_INLINE ::ImplementationRepository::ServerInformationList * ImplementationRepository::ServerInformationList_var::ptr (void) const { return this->ptr_; @@ -1367,14 +1402,14 @@ ImplementationRepository::ServerInformationList_var::ptr (void) const // ************************************************************* ACE_INLINE -ImplementationRepository::ServerInformationList_out::ServerInformationList_out (ImplementationRepository::ServerInformationList *&p) +ImplementationRepository::ServerInformationList_out::ServerInformationList_out (ServerInformationList *&p) : ptr_ (p) { this->ptr_ = 0; } ACE_INLINE -ImplementationRepository::ServerInformationList_out::ServerInformationList_out (ImplementationRepository::ServerInformationList_var &p) // constructor from _var +ImplementationRepository::ServerInformationList_out::ServerInformationList_out (ServerInformationList_var &p) // constructor from _var : ptr_ (p.out ()) { delete this->ptr_; @@ -1382,37 +1417,37 @@ ImplementationRepository::ServerInformationList_out::ServerInformationList_out ( } ACE_INLINE -ImplementationRepository::ServerInformationList_out::ServerInformationList_out (const ImplementationRepository::ServerInformationList_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplementationRepository::ServerInformationList_out&,p).ptr_) +ImplementationRepository::ServerInformationList_out::ServerInformationList_out (const ::ImplementationRepository::ServerInformationList_out &p) // copy constructor + : ptr_ (ACE_const_cast (ServerInformationList_out&, p).ptr_) {} -ACE_INLINE ImplementationRepository::ServerInformationList_out & -ImplementationRepository::ServerInformationList_out::operator= (const ImplementationRepository::ServerInformationList_out &p) +ACE_INLINE ::ImplementationRepository::ServerInformationList_out & +ImplementationRepository::ServerInformationList_out::operator= (const ::ImplementationRepository::ServerInformationList_out &p) { - this->ptr_ = ACE_const_cast (ImplementationRepository::ServerInformationList_out&,p).ptr_; + this->ptr_ = ACE_const_cast (ServerInformationList_out&, p).ptr_; return *this; } -ACE_INLINE ImplementationRepository::ServerInformationList_out & -ImplementationRepository::ServerInformationList_out::operator= (ImplementationRepository::ServerInformationList *p) +ACE_INLINE ::ImplementationRepository::ServerInformationList_out & +ImplementationRepository::ServerInformationList_out::operator= (ServerInformationList *p) { this->ptr_ = p; return *this; } ACE_INLINE -ImplementationRepository::ServerInformationList_out::operator ImplementationRepository::ServerInformationList *&() // cast +ImplementationRepository::ServerInformationList_out::operator ::ImplementationRepository::ServerInformationList *&() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationList *& +ACE_INLINE ::ImplementationRepository::ServerInformationList *& ImplementationRepository::ServerInformationList_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationList * +ACE_INLINE ::ImplementationRepository::ServerInformationList * ImplementationRepository::ServerInformationList_out::operator-> (void) { return this->ptr_; @@ -1450,23 +1485,23 @@ ImplementationRepository::Administration::~Administration (void) // destructor ACE_INLINE ImplementationRepository::Administration_var::Administration_var (void) // default constructor - : ptr_ (ImplementationRepository::Administration::_nil ()) + : ptr_ (Administration::_nil ()) {} ACE_INLINE -ImplementationRepository::Administration_var::Administration_var (ImplementationRepository::Administration_ptr p) +ImplementationRepository::Administration_var::Administration_var (Administration_ptr p) : ptr_ (p) {} -ACE_INLINE ImplementationRepository::Administration_ptr +ACE_INLINE ::ImplementationRepository::Administration_ptr ImplementationRepository::Administration_var::ptr (void) const { return this->ptr_; } ACE_INLINE -ImplementationRepository::Administration_var::Administration_var (const ImplementationRepository::Administration_var &p) // copy constructor - : ptr_ (ImplementationRepository::Administration::_duplicate (p.ptr ())) +ImplementationRepository::Administration_var::Administration_var (const ::ImplementationRepository::Administration_var &p) // copy constructor + : ptr_ (Administration::_duplicate (p.ptr ())) {} ACE_INLINE @@ -1476,7 +1511,7 @@ ImplementationRepository::Administration_var::~Administration_var (void) // dest } ACE_INLINE ImplementationRepository::Administration_var & -ImplementationRepository::Administration_var::operator= (ImplementationRepository::Administration_ptr p) +ImplementationRepository::Administration_var::operator= (Administration_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; @@ -1484,60 +1519,60 @@ ImplementationRepository::Administration_var::operator= (ImplementationRepositor } ACE_INLINE ImplementationRepository::Administration_var & -ImplementationRepository::Administration_var::operator= (const ImplementationRepository::Administration_var &p) +ImplementationRepository::Administration_var::operator= (const ::ImplementationRepository::Administration_var &p) { if (this != &p) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::Administration::_duplicate (p.ptr ()); + this->ptr_ = ::ImplementationRepository::Administration::_duplicate (p.ptr ()); } return *this; } ACE_INLINE -ImplementationRepository::Administration_var::operator const ImplementationRepository::Administration_ptr &() const // cast +ImplementationRepository::Administration_var::operator const ::ImplementationRepository::Administration_ptr &() const // cast { return this->ptr_; } ACE_INLINE -ImplementationRepository::Administration_var::operator ImplementationRepository::Administration_ptr &() // cast +ImplementationRepository::Administration_var::operator ::ImplementationRepository::Administration_ptr &() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::Administration_ptr +ACE_INLINE ::ImplementationRepository::Administration_ptr ImplementationRepository::Administration_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::Administration_ptr +ACE_INLINE ::ImplementationRepository::Administration_ptr ImplementationRepository::Administration_var::in (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::Administration_ptr & +ACE_INLINE ::ImplementationRepository::Administration_ptr & ImplementationRepository::Administration_var::inout (void) { return this->ptr_; } -ACE_INLINE ImplementationRepository::Administration_ptr & +ACE_INLINE ::ImplementationRepository::Administration_ptr & ImplementationRepository::Administration_var::out (void) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::Administration::_nil (); + this->ptr_ = ::ImplementationRepository::Administration::_nil (); return this->ptr_; } -ACE_INLINE ImplementationRepository::Administration_ptr +ACE_INLINE ::ImplementationRepository::Administration_ptr ImplementationRepository::Administration_var::_retn (void) { // yield ownership of managed obj reference - ImplementationRepository::Administration_ptr val = this->ptr_; - this->ptr_ = ImplementationRepository::Administration::_nil (); + ::ImplementationRepository::Administration_ptr val = this->ptr_; + this->ptr_ = ::ImplementationRepository::Administration::_nil (); return val; } @@ -1553,59 +1588,59 @@ ImplementationRepository::Administration_var::_retn (void) // ************************************************************* ACE_INLINE -ImplementationRepository::Administration_out::Administration_out (ImplementationRepository::Administration_ptr &p) +ImplementationRepository::Administration_out::Administration_out (Administration_ptr &p) : ptr_ (p) { - this->ptr_ = ImplementationRepository::Administration::_nil (); + this->ptr_ = ::ImplementationRepository::Administration::_nil (); } ACE_INLINE -ImplementationRepository::Administration_out::Administration_out (ImplementationRepository::Administration_var &p) // constructor from _var +ImplementationRepository::Administration_out::Administration_out (Administration_var &p) // constructor from _var : ptr_ (p.out ()) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::Administration::_nil (); + this->ptr_ = ::ImplementationRepository::Administration::_nil (); } ACE_INLINE -ImplementationRepository::Administration_out::Administration_out (const ImplementationRepository::Administration_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplementationRepository::Administration_out&,p).ptr_) +ImplementationRepository::Administration_out::Administration_out (const ::ImplementationRepository::Administration_out &p) // copy constructor + : ptr_ (ACE_const_cast (Administration_out &, p).ptr_) {} -ACE_INLINE ImplementationRepository::Administration_out & -ImplementationRepository::Administration_out::operator= (const ImplementationRepository::Administration_out &p) +ACE_INLINE ::ImplementationRepository::Administration_out & +ImplementationRepository::Administration_out::operator= (const ::ImplementationRepository::Administration_out &p) { - this->ptr_ = ACE_const_cast (ImplementationRepository::Administration_out&,p).ptr_; + this->ptr_ = ACE_const_cast (Administration_out&, p).ptr_; return *this; } ACE_INLINE ImplementationRepository::Administration_out & -ImplementationRepository::Administration_out::operator= (const ImplementationRepository::Administration_var &p) +ImplementationRepository::Administration_out::operator= (const ::ImplementationRepository::Administration_var &p) { - this->ptr_ = ImplementationRepository::Administration::_duplicate (p.ptr ()); + this->ptr_ = ::ImplementationRepository::Administration::_duplicate (p.ptr ()); return *this; } ACE_INLINE ImplementationRepository::Administration_out & -ImplementationRepository::Administration_out::operator= (ImplementationRepository::Administration_ptr p) +ImplementationRepository::Administration_out::operator= (Administration_ptr p) { this->ptr_ = p; return *this; } ACE_INLINE -ImplementationRepository::Administration_out::operator ImplementationRepository::Administration_ptr &() // cast +ImplementationRepository::Administration_out::operator ::ImplementationRepository::Administration_ptr &() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::Administration_ptr & +ACE_INLINE ::ImplementationRepository::Administration_ptr & ImplementationRepository::Administration_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE ImplementationRepository::Administration_ptr +ACE_INLINE ::ImplementationRepository::Administration_ptr ImplementationRepository::Administration_out::operator-> (void) { return this->ptr_; @@ -1649,23 +1684,23 @@ ImplementationRepository::ServerInformationIterator::~ServerInformationIterator ACE_INLINE ImplementationRepository::ServerInformationIterator_var::ServerInformationIterator_var (void) // default constructor - : ptr_ (ImplementationRepository::ServerInformationIterator::_nil ()) + : ptr_ (ServerInformationIterator::_nil ()) {} ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::ServerInformationIterator_var (ImplementationRepository::ServerInformationIterator_ptr p) +ImplementationRepository::ServerInformationIterator_var::ServerInformationIterator_var (ServerInformationIterator_ptr p) : ptr_ (p) {} -ACE_INLINE ImplementationRepository::ServerInformationIterator_ptr +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator_var::ptr (void) const { return this->ptr_; } ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::ServerInformationIterator_var (const ImplementationRepository::ServerInformationIterator_var &p) // copy constructor - : ptr_ (ImplementationRepository::ServerInformationIterator::_duplicate (p.ptr ())) +ImplementationRepository::ServerInformationIterator_var::ServerInformationIterator_var (const ::ImplementationRepository::ServerInformationIterator_var &p) // copy constructor + : ptr_ (ServerInformationIterator::_duplicate (p.ptr ())) {} ACE_INLINE @@ -1675,7 +1710,7 @@ ImplementationRepository::ServerInformationIterator_var::~ServerInformationItera } ACE_INLINE ImplementationRepository::ServerInformationIterator_var & -ImplementationRepository::ServerInformationIterator_var::operator= (ImplementationRepository::ServerInformationIterator_ptr p) +ImplementationRepository::ServerInformationIterator_var::operator= (ServerInformationIterator_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; @@ -1683,60 +1718,60 @@ ImplementationRepository::ServerInformationIterator_var::operator= (Implementati } ACE_INLINE ImplementationRepository::ServerInformationIterator_var & -ImplementationRepository::ServerInformationIterator_var::operator= (const ImplementationRepository::ServerInformationIterator_var &p) +ImplementationRepository::ServerInformationIterator_var::operator= (const ::ImplementationRepository::ServerInformationIterator_var &p) { if (this != &p) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::ServerInformationIterator::_duplicate (p.ptr ()); + this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_duplicate (p.ptr ()); } return *this; } ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::operator const ImplementationRepository::ServerInformationIterator_ptr &() const // cast +ImplementationRepository::ServerInformationIterator_var::operator const ::ImplementationRepository::ServerInformationIterator_ptr &() const // cast { return this->ptr_; } ACE_INLINE -ImplementationRepository::ServerInformationIterator_var::operator ImplementationRepository::ServerInformationIterator_ptr &() // cast +ImplementationRepository::ServerInformationIterator_var::operator ::ImplementationRepository::ServerInformationIterator_ptr &() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationIterator_ptr +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator_var::operator-> (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationIterator_ptr +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator_var::in (void) const { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationIterator_ptr & +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr & ImplementationRepository::ServerInformationIterator_var::inout (void) { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationIterator_ptr & +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr & ImplementationRepository::ServerInformationIterator_var::out (void) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::ServerInformationIterator::_nil (); + this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_nil (); return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationIterator_ptr +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator_var::_retn (void) { // yield ownership of managed obj reference - ImplementationRepository::ServerInformationIterator_ptr val = this->ptr_; - this->ptr_ = ImplementationRepository::ServerInformationIterator::_nil (); + ::ImplementationRepository::ServerInformationIterator_ptr val = this->ptr_; + this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_nil (); return val; } @@ -1752,59 +1787,59 @@ ImplementationRepository::ServerInformationIterator_var::_retn (void) // ************************************************************* ACE_INLINE -ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (ImplementationRepository::ServerInformationIterator_ptr &p) +ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (ServerInformationIterator_ptr &p) : ptr_ (p) { - this->ptr_ = ImplementationRepository::ServerInformationIterator::_nil (); + this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_nil (); } ACE_INLINE -ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (ImplementationRepository::ServerInformationIterator_var &p) // constructor from _var +ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (ServerInformationIterator_var &p) // constructor from _var : ptr_ (p.out ()) { CORBA::release (this->ptr_); - this->ptr_ = ImplementationRepository::ServerInformationIterator::_nil (); + this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_nil (); } ACE_INLINE -ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (const ImplementationRepository::ServerInformationIterator_out &p) // copy constructor - : ptr_ (ACE_const_cast (ImplementationRepository::ServerInformationIterator_out&,p).ptr_) +ImplementationRepository::ServerInformationIterator_out::ServerInformationIterator_out (const ::ImplementationRepository::ServerInformationIterator_out &p) // copy constructor + : ptr_ (ACE_const_cast (ServerInformationIterator_out &, p).ptr_) {} -ACE_INLINE ImplementationRepository::ServerInformationIterator_out & -ImplementationRepository::ServerInformationIterator_out::operator= (const ImplementationRepository::ServerInformationIterator_out &p) +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_out & +ImplementationRepository::ServerInformationIterator_out::operator= (const ::ImplementationRepository::ServerInformationIterator_out &p) { - this->ptr_ = ACE_const_cast (ImplementationRepository::ServerInformationIterator_out&,p).ptr_; + this->ptr_ = ACE_const_cast (ServerInformationIterator_out&, p).ptr_; return *this; } ACE_INLINE ImplementationRepository::ServerInformationIterator_out & -ImplementationRepository::ServerInformationIterator_out::operator= (const ImplementationRepository::ServerInformationIterator_var &p) +ImplementationRepository::ServerInformationIterator_out::operator= (const ::ImplementationRepository::ServerInformationIterator_var &p) { - this->ptr_ = ImplementationRepository::ServerInformationIterator::_duplicate (p.ptr ()); + this->ptr_ = ::ImplementationRepository::ServerInformationIterator::_duplicate (p.ptr ()); return *this; } ACE_INLINE ImplementationRepository::ServerInformationIterator_out & -ImplementationRepository::ServerInformationIterator_out::operator= (ImplementationRepository::ServerInformationIterator_ptr p) +ImplementationRepository::ServerInformationIterator_out::operator= (ServerInformationIterator_ptr p) { this->ptr_ = p; return *this; } ACE_INLINE -ImplementationRepository::ServerInformationIterator_out::operator ImplementationRepository::ServerInformationIterator_ptr &() // cast +ImplementationRepository::ServerInformationIterator_out::operator ::ImplementationRepository::ServerInformationIterator_ptr &() // cast { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationIterator_ptr & +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr & ImplementationRepository::ServerInformationIterator_out::ptr (void) // ptr { return this->ptr_; } -ACE_INLINE ImplementationRepository::ServerInformationIterator_ptr +ACE_INLINE ::ImplementationRepository::ServerInformationIterator_ptr ImplementationRepository::ServerInformationIterator_out::operator-> (void) { return this->ptr_; @@ -2019,7 +2054,7 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationR return 0; } -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::Administration::AlreadyRegistered &) +ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &,ImplementationRepository::Administration::AlreadyRegistered&) { return 1; } @@ -2061,14 +2096,15 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationR return 0; } -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, ImplementationRepository::Administration::CannotActivate &_tao_aggregate) +ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm,ImplementationRepository::Administration::CannotActivate &_tao_aggregate) { // now marshal the members if ( - (strm >> _tao_aggregate.reason.out ()) - ) + (strm >> _tao_aggregate.reason.out ()) + ) return 1; - return 0; + else + return 0; } #if !defined (ACE_LACKS_IOSTREAM_TOTALLY) @@ -2100,7 +2136,7 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const ImplementationR return 0; } -ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &, ImplementationRepository::Administration::NotFound &) +ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &,ImplementationRepository::Administration::NotFound&) { return 1; } diff --git a/TAO/tao/ImplRepoS.cpp b/TAO/tao/ImplRepoS.cpp index 6aa24408240..3be0db122a5 100644 --- a/TAO/tao/ImplRepoS.cpp +++ b/TAO/tao/ImplRepoS.cpp @@ -20,7 +20,7 @@ private: public: const TAO_operation_db_entry * lookup (const char *str, unsigned int len); }; -/* starting time is 3:08:21 */ +/* starting time is 22:04:55 */ /* C++ code produced by gperf version 2.8 (ACE version) */ /* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable -N lookup */ unsigned int @@ -91,10 +91,10 @@ TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable::lookup (const ch static const class TAO_operation_db_entry wordlist[] = { {"",0},{"",0},{"",0},{"",0}, - {"ping", &POA_ImplementationRepository::ServerObject::ping_skel}, + {"ping", &POA_ImplementationRepository::ServerObject::ping_skel}, {"_is_a", &POA_ImplementationRepository::ServerObject::_is_a_skel}, {"",0},{"",0}, - {"shutdown", &POA_ImplementationRepository::ServerObject::shutdown_skel}, + {"shutdown", &POA_ImplementationRepository::ServerObject::shutdown_skel}, {"",0},{"",0},{"",0},{"",0}, {"_non_existent", &POA_ImplementationRepository::ServerObject::_non_existent_skel}, }; @@ -113,7 +113,7 @@ TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable::lookup (const ch } return 0; } -/* ending time is 3:08:21 */ +/* ending time is 22:04:55 */ static TAO_ImplementationRepository_ServerObject_Perfect_Hash_OpTable tao_ImplementationRepository_ServerObject_optable; ImplementationRepository::ServerObject_ptr _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory ( @@ -121,7 +121,7 @@ ImplementationRepository::ServerObject_ptr _TAO_collocation_POA_ImplementationRe ) { TAO_Stub *stub = obj->_stubobj (); - + switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) { case TAO_ORB_Core::THRU_POA: @@ -145,14 +145,14 @@ ImplementationRepository::ServerObject_ptr _TAO_collocation_POA_ImplementationRe int _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer (long dummy) { ACE_UNUSED_ARG (dummy); - - _TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer = + + _TAO_collocation_ImplementationRepository_ServerObject_Stub_Factory_function_pointer = _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory; - + return 0; } -static int _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer_Scarecrow = +static int _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer_Scarecrow = _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_ImplementationRepository_ServerObject_Stub_Factory_Initializer)); // skeleton constructor @@ -173,8 +173,8 @@ POA_ImplementationRepository::ServerObject::~ServerObject (void) void POA_ImplementationRepository::ServerObject::ping_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -248,12 +248,12 @@ void POA_ImplementationRepository::ServerObject::ping_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::ServerObject::shutdown_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -327,10 +327,10 @@ void POA_ImplementationRepository::ServerObject::shutdown_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::ServerObject::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, + CORBA::ServerRequest &_tao_server_request, void * _tao_object_reference, void * /* context */, CORBA::Environment &ACE_TRY_ENV @@ -342,10 +342,10 @@ void POA_ImplementationRepository::ServerObject::_is_a_skel ( CORBA::String_var value; if (!((_tao_in >> value.out ()))) ACE_THROW (CORBA::MARSHAL ()); - + _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); ACE_CHECK; - + _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); @@ -354,7 +354,7 @@ void POA_ImplementationRepository::ServerObject::_is_a_skel ( } void POA_ImplementationRepository::ServerObject::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, + CORBA::ServerRequest &_tao_server_request, void * _tao_object_reference, void * /* context */, CORBA::Environment &ACE_TRY_ENV @@ -363,7 +363,7 @@ void POA_ImplementationRepository::ServerObject::_non_existent_skel ( POA_ImplementationRepository::ServerObject *_tao_impl = (POA_ImplementationRepository::ServerObject *) _tao_object_reference; CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); ACE_CHECK; - + _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); @@ -424,7 +424,7 @@ POA_ImplementationRepository::ServerObject::_this (CORBA_Environment &ACE_TRY_EN { case TAO_ORB_Core::THRU_POA: { - ImplementationRepository::ServerObject_ptr retval = 0; + ::ImplementationRepository::ServerObject_ptr retval = 0; ACE_NEW_RETURN ( retval, POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject (stub), @@ -443,15 +443,14 @@ POA_ImplementationRepository::ServerObject::_this (CORBA_Environment &ACE_TRY_EN CORBA::Object_ptr tmp = CORBA::Object::_nil (); ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); CORBA::Object_var obj = tmp; - return ImplementationRepository::ServerObject::_unchecked_narrow (obj.in ()); + return ::ImplementationRepository::ServerObject::_unchecked_narrow (obj.in ()); } } POA_ImplementationRepository::_tao_thru_poa_collocated_ServerObject::_tao_thru_poa_collocated_ServerObject ( TAO_Stub *stub ) - : ACE_NESTED_CLASS (ImplementationRepository,ServerObject) (), - CORBA_Object (stub, 0, 1) + : CORBA_Object (stub, 0, 1) { } @@ -565,7 +564,7 @@ private: public: const TAO_operation_db_entry * lookup (const char *str, unsigned int len); }; -/* starting time is 3:08:22 */ +/* starting time is 22:04:56 */ /* C++ code produced by gperf version 2.8 (ACE version) */ /* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable -N lookup */ unsigned int @@ -636,27 +635,27 @@ TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable::lookup (const static const class TAO_operation_db_entry wordlist[] = { {"",0},{"",0},{"",0},{"",0}, - {"list", &POA_ImplementationRepository::Administration::list_skel}, + {"list", &POA_ImplementationRepository::Administration::list_skel}, {"",0},{"",0},{"",0},{"",0}, - {"find", &POA_ImplementationRepository::Administration::find_skel}, + {"find", &POA_ImplementationRepository::Administration::find_skel}, {"",0},{"",0},{"",0}, - {"remove_server", &POA_ImplementationRepository::Administration::remove_server_skel}, + {"remove_server", &POA_ImplementationRepository::Administration::remove_server_skel}, {"",0}, - {"register_server", &POA_ImplementationRepository::Administration::register_server_skel}, + {"register_server", &POA_ImplementationRepository::Administration::register_server_skel}, {"",0}, - {"reregister_server", &POA_ImplementationRepository::Administration::reregister_server_skel}, + {"reregister_server", &POA_ImplementationRepository::Administration::reregister_server_skel}, {"",0},{"",0}, - {"shutdown_server", &POA_ImplementationRepository::Administration::shutdown_server_skel}, + {"shutdown_server", &POA_ImplementationRepository::Administration::shutdown_server_skel}, {"",0}, - {"server_is_running", &POA_ImplementationRepository::Administration::server_is_running_skel}, + {"server_is_running", &POA_ImplementationRepository::Administration::server_is_running_skel}, {"",0},{"",0}, - {"activate_server", &POA_ImplementationRepository::Administration::activate_server_skel}, + {"activate_server", &POA_ImplementationRepository::Administration::activate_server_skel}, {"",0},{"",0}, {"_non_existent", &POA_ImplementationRepository::Administration::_non_existent_skel}, {"",0}, {"_is_a", &POA_ImplementationRepository::Administration::_is_a_skel}, {"",0},{"",0}, - {"server_is_shutting_down", &POA_ImplementationRepository::Administration::server_is_shutting_down_skel}, + {"server_is_shutting_down", &POA_ImplementationRepository::Administration::server_is_shutting_down_skel}, }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) @@ -673,7 +672,7 @@ TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable::lookup (const } return 0; } -/* ending time is 3:08:22 */ +/* ending time is 22:04:56 */ static TAO_ImplementationRepository_Administration_Perfect_Hash_OpTable tao_ImplementationRepository_Administration_optable; ImplementationRepository::Administration_ptr _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory ( @@ -681,7 +680,7 @@ ImplementationRepository::Administration_ptr _TAO_collocation_POA_Implementation ) { TAO_Stub *stub = obj->_stubobj (); - + switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) { case TAO_ORB_Core::THRU_POA: @@ -705,14 +704,14 @@ ImplementationRepository::Administration_ptr _TAO_collocation_POA_Implementation int _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer (long dummy) { ACE_UNUSED_ARG (dummy); - - _TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer = + + _TAO_collocation_ImplementationRepository_Administration_Stub_Factory_function_pointer = _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory; - + return 0; } -static int _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer_Scarecrow = +static int _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer_Scarecrow = _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_ImplementationRepository_Administration_Stub_Factory_Initializer)); // skeleton constructor @@ -733,8 +732,8 @@ POA_ImplementationRepository::Administration::~Administration (void) void POA_ImplementationRepository::Administration::activate_server_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -816,12 +815,12 @@ void POA_ImplementationRepository::Administration::activate_server_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::Administration::register_server_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -906,12 +905,12 @@ void POA_ImplementationRepository::Administration::register_server_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::Administration::reregister_server_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -996,12 +995,12 @@ void POA_ImplementationRepository::Administration::reregister_server_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::Administration::remove_server_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -1083,12 +1082,12 @@ void POA_ImplementationRepository::Administration::remove_server_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::Administration::shutdown_server_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -1170,12 +1169,12 @@ void POA_ImplementationRepository::Administration::shutdown_server_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::Administration::server_is_running_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -1264,7 +1263,6 @@ void POA_ImplementationRepository::Administration::server_is_running_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; - ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); if (!( (_tao_out << _tao_retval.in ()) @@ -1275,8 +1273,8 @@ void POA_ImplementationRepository::Administration::server_is_running_skel ( void POA_ImplementationRepository::Administration::server_is_shutting_down_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -1358,12 +1356,12 @@ void POA_ImplementationRepository::Administration::server_is_shutting_down_skel _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::Administration::find_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -1447,7 +1445,6 @@ void POA_ImplementationRepository::Administration::find_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; - ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); if (!( (_tao_out << info.in ()) @@ -1458,8 +1455,8 @@ void POA_ImplementationRepository::Administration::find_skel ( void POA_ImplementationRepository::Administration::list_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -1545,7 +1542,6 @@ void POA_ImplementationRepository::Administration::list_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; - ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); if (!( (_tao_out << server_list.in ()) && @@ -1556,7 +1552,7 @@ void POA_ImplementationRepository::Administration::list_skel ( } void POA_ImplementationRepository::Administration::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, + CORBA::ServerRequest &_tao_server_request, void * _tao_object_reference, void * /* context */, CORBA::Environment &ACE_TRY_ENV @@ -1568,10 +1564,10 @@ void POA_ImplementationRepository::Administration::_is_a_skel ( CORBA::String_var value; if (!((_tao_in >> value.out ()))) ACE_THROW (CORBA::MARSHAL ()); - + _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); ACE_CHECK; - + _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); @@ -1580,7 +1576,7 @@ void POA_ImplementationRepository::Administration::_is_a_skel ( } void POA_ImplementationRepository::Administration::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, + CORBA::ServerRequest &_tao_server_request, void * _tao_object_reference, void * /* context */, CORBA::Environment &ACE_TRY_ENV @@ -1589,7 +1585,7 @@ void POA_ImplementationRepository::Administration::_non_existent_skel ( POA_ImplementationRepository::Administration *_tao_impl = (POA_ImplementationRepository::Administration *) _tao_object_reference; CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); ACE_CHECK; - + _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); @@ -1650,7 +1646,7 @@ POA_ImplementationRepository::Administration::_this (CORBA_Environment &ACE_TRY_ { case TAO_ORB_Core::THRU_POA: { - ImplementationRepository::Administration_ptr retval = 0; + ::ImplementationRepository::Administration_ptr retval = 0; ACE_NEW_RETURN ( retval, POA_ImplementationRepository::_tao_thru_poa_collocated_Administration (stub), @@ -1669,15 +1665,14 @@ POA_ImplementationRepository::Administration::_this (CORBA_Environment &ACE_TRY_ CORBA::Object_ptr tmp = CORBA::Object::_nil (); ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); CORBA::Object_var obj = tmp; - return ImplementationRepository::Administration::_unchecked_narrow (obj.in ()); + return ::ImplementationRepository::Administration::_unchecked_narrow (obj.in ()); } } POA_ImplementationRepository::_tao_thru_poa_collocated_Administration::_tao_thru_poa_collocated_Administration ( TAO_Stub *stub ) - : ACE_NESTED_CLASS (ImplementationRepository,Administration) (), - CORBA_Object (stub, 0, 1) + : CORBA_Object (stub, 0, 1) { } @@ -2022,7 +2017,7 @@ private: public: const TAO_operation_db_entry * lookup (const char *str, unsigned int len); }; -/* starting time is 3:08:22 */ +/* starting time is 22:04:56 */ /* C++ code produced by gperf version 2.8 (ACE version) */ /* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable -N lookup */ unsigned int @@ -2094,8 +2089,8 @@ TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable::loo { {"",0},{"",0},{"",0},{"",0},{"",0}, {"_is_a", &POA_ImplementationRepository::ServerInformationIterator::_is_a_skel}, - {"next_n", &POA_ImplementationRepository::ServerInformationIterator::next_n_skel}, - {"destroy", &POA_ImplementationRepository::ServerInformationIterator::destroy_skel}, + {"next_n", &POA_ImplementationRepository::ServerInformationIterator::next_n_skel}, + {"destroy", &POA_ImplementationRepository::ServerInformationIterator::destroy_skel}, {"",0},{"",0},{"",0},{"",0},{"",0}, {"_non_existent", &POA_ImplementationRepository::ServerInformationIterator::_non_existent_skel}, }; @@ -2114,7 +2109,7 @@ TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable::loo } return 0; } -/* ending time is 3:08:22 */ +/* ending time is 22:04:56 */ static TAO_ImplementationRepository_ServerInformationIterator_Perfect_Hash_OpTable tao_ImplementationRepository_ServerInformationIterator_optable; ImplementationRepository::ServerInformationIterator_ptr _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory ( @@ -2122,7 +2117,7 @@ ImplementationRepository::ServerInformationIterator_ptr _TAO_collocation_POA_Imp ) { TAO_Stub *stub = obj->_stubobj (); - + switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ()) { case TAO_ORB_Core::THRU_POA: @@ -2146,14 +2141,14 @@ ImplementationRepository::ServerInformationIterator_ptr _TAO_collocation_POA_Imp int _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer (long dummy) { ACE_UNUSED_ARG (dummy); - - _TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer = + + _TAO_collocation_ImplementationRepository_ServerInformationIterator_Stub_Factory_function_pointer = _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory; - + return 0; } -static int _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer_Scarecrow = +static int _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer_Scarecrow = _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer (ACE_reinterpret_cast (long, _TAO_collocation_POA_ImplementationRepository_ServerInformationIterator_Stub_Factory_Initializer)); // skeleton constructor @@ -2174,8 +2169,8 @@ POA_ImplementationRepository::ServerInformationIterator::~ServerInformationItera void POA_ImplementationRepository::ServerInformationIterator::next_n_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -2260,7 +2255,6 @@ void POA_ImplementationRepository::ServerInformationIterator::next_n_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; - ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); if (!( (_tao_out << CORBA::Any::from_boolean (_tao_retval)) && @@ -2272,8 +2266,8 @@ void POA_ImplementationRepository::ServerInformationIterator::next_n_skel ( void POA_ImplementationRepository::ServerInformationIterator::destroy_skel ( CORBA::ServerRequest &_tao_server_request, - void *_tao_object_reference, - void * /* context */, + void *_tao_object_reference, + void * /* context */, CORBA::Environment &ACE_TRY_ENV ) { @@ -2347,10 +2341,10 @@ void POA_ImplementationRepository::ServerInformationIterator::destroy_skel ( _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; -} + } void POA_ImplementationRepository::ServerInformationIterator::_is_a_skel ( - CORBA::ServerRequest &_tao_server_request, + CORBA::ServerRequest &_tao_server_request, void * _tao_object_reference, void * /* context */, CORBA::Environment &ACE_TRY_ENV @@ -2362,10 +2356,10 @@ void POA_ImplementationRepository::ServerInformationIterator::_is_a_skel ( CORBA::String_var value; if (!((_tao_in >> value.out ()))) ACE_THROW (CORBA::MARSHAL ()); - + _tao_retval = _tao_impl->_is_a (value.in (), ACE_TRY_ENV); ACE_CHECK; - + _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); @@ -2374,7 +2368,7 @@ void POA_ImplementationRepository::ServerInformationIterator::_is_a_skel ( } void POA_ImplementationRepository::ServerInformationIterator::_non_existent_skel ( - CORBA::ServerRequest &_tao_server_request, + CORBA::ServerRequest &_tao_server_request, void * _tao_object_reference, void * /* context */, CORBA::Environment &ACE_TRY_ENV @@ -2383,7 +2377,7 @@ void POA_ImplementationRepository::ServerInformationIterator::_non_existent_skel POA_ImplementationRepository::ServerInformationIterator *_tao_impl = (POA_ImplementationRepository::ServerInformationIterator *) _tao_object_reference; CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); ACE_CHECK; - + _tao_server_request.init_reply (ACE_TRY_ENV); ACE_CHECK; TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); @@ -2444,7 +2438,7 @@ POA_ImplementationRepository::ServerInformationIterator::_this (CORBA_Environmen { case TAO_ORB_Core::THRU_POA: { - ImplementationRepository::ServerInformationIterator_ptr retval = 0; + ::ImplementationRepository::ServerInformationIterator_ptr retval = 0; ACE_NEW_RETURN ( retval, POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator (stub), @@ -2463,15 +2457,14 @@ POA_ImplementationRepository::ServerInformationIterator::_this (CORBA_Environmen CORBA::Object_ptr tmp = CORBA::Object::_nil (); ACE_NEW_RETURN (tmp, CORBA::Object (stub), 0); CORBA::Object_var obj = tmp; - return ImplementationRepository::ServerInformationIterator::_unchecked_narrow (obj.in ()); + return ::ImplementationRepository::ServerInformationIterator::_unchecked_narrow (obj.in ()); } } POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIterator::_tao_thru_poa_collocated_ServerInformationIterator ( TAO_Stub *stub ) - : ACE_NESTED_CLASS (ImplementationRepository,ServerInformationIterator) (), - CORBA_Object (stub, 0, 1) + : CORBA_Object (stub, 0, 1) { } @@ -2581,6 +2574,3 @@ void POA_ImplementationRepository::_tao_thru_poa_collocated_ServerInformationIte ); return; } - - - diff --git a/TAO/tao/ImplRepoS.h b/TAO/tao/ImplRepoS.h index eadb85ab2d7..d7ade677149 100644 --- a/TAO/tao/ImplRepoS.h +++ b/TAO/tao/ImplRepoS.h @@ -10,7 +10,7 @@ #ifndef _TAO_IDL_IMPLREPOS_H_ #define _TAO_IDL_IMPLREPOS_H_ -#include "tao/ImplRepoC.h" +#include "ImplRepoC.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) @@ -40,7 +40,7 @@ TAO_NAMESPACE POA_ImplementationRepository virtual CORBA::Boolean _is_a ( const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -52,7 +52,7 @@ TAO_NAMESPACE POA_ImplementationRepository CORBA::ServerRequest &req, void *obj, void *context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -60,26 +60,26 @@ TAO_NAMESPACE POA_ImplementationRepository CORBA::ServerRequest &req, void *obj, void *context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void _dispatch ( CORBA::ServerRequest &_tao_req, void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); - ImplementationRepository::ServerObject *_this ( - CORBA::Environment &ACE_TRY_ENV = + ::ImplementationRepository::ServerObject *_this ( + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual const char* _interface_repository_id (void) const; virtual void ping ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -87,15 +87,15 @@ TAO_NAMESPACE POA_ImplementationRepository )) = 0; static void ping_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void shutdown ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -103,10 +103,10 @@ TAO_NAMESPACE POA_ImplementationRepository )) = 0; static void shutdown_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -117,7 +117,7 @@ TAO_NAMESPACE POA_ImplementationRepository #if !defined (_IMPLEMENTATIONREPOSITORY_SERVEROBJECT___THRU_POA_COLLOCATED_SH_) #define _IMPLEMENTATIONREPOSITORY_SERVEROBJECT___THRU_POA_COLLOCATED_SH_ - class TAO_Export _tao_thru_poa_collocated_ServerObject : public virtual ImplementationRepository::ServerObject + class TAO_Export _tao_thru_poa_collocated_ServerObject : public virtual ::ImplementationRepository::ServerObject { public: _tao_thru_poa_collocated_ServerObject ( @@ -127,13 +127,13 @@ TAO_NAMESPACE POA_ImplementationRepository const CORBA::Char *logical_type_id, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () ); - + virtual CORBA::Boolean _non_existent( CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () ); - + virtual void ping ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -141,7 +141,7 @@ TAO_NAMESPACE POA_ImplementationRepository )); virtual void shutdown ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -153,7 +153,7 @@ TAO_NAMESPACE POA_ImplementationRepository #endif /* end #if !defined */ - + #if defined (ACE_HAS_USING_KEYWORD) // TIE class: Refer to CORBA v2.2, Section 20.34.4 template <class T> @@ -170,7 +170,7 @@ TAO_NAMESPACE POA_ImplementationRepository // ctor with T*, ownership flag and a POA ~ServerObject_tie (void); // dtor - + // TIE specific functions T *_tied_object (void); // return the underlying object @@ -182,14 +182,14 @@ TAO_NAMESPACE POA_ImplementationRepository // do we own it void _is_owner (CORBA::Boolean b); // set the ownership - + // overridden ServantBase operations PortableServer::POA_ptr _default_POA ( - CORBA::Environment &env = + CORBA::Environment &env = TAO_default_environment () ); void ping ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -197,7 +197,7 @@ TAO_NAMESPACE POA_ImplementationRepository )); void shutdown ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -208,7 +208,7 @@ private: T *ptr_; PortableServer::POA_var poa_; CORBA::Boolean rel_; - + // copy and assignment are not allowed ServerObject_tie (const ServerObject_tie &); void operator= (const ServerObject_tie &); @@ -230,7 +230,7 @@ private: virtual CORBA::Boolean _is_a ( const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -242,7 +242,7 @@ private: CORBA::ServerRequest &req, void *obj, void *context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -250,19 +250,19 @@ private: CORBA::ServerRequest &req, void *obj, void *context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void _dispatch ( CORBA::ServerRequest &_tao_req, void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); - ImplementationRepository::Administration *_this ( - CORBA::Environment &ACE_TRY_ENV = + ::ImplementationRepository::Administration *_this ( + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -270,7 +270,7 @@ private: virtual void activate_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -280,17 +280,17 @@ private: )) = 0; static void activate_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void register_server ( const char * server, const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -299,17 +299,17 @@ private: )) = 0; static void register_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void reregister_server ( const char * server, const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -317,16 +317,16 @@ private: )) = 0; static void reregister_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void remove_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -335,16 +335,16 @@ private: )) = 0; static void remove_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void shutdown_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -353,10 +353,10 @@ private: )) = 0; static void shutdown_server_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -364,7 +364,7 @@ private: const char * server, const char * addr, ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -373,16 +373,16 @@ private: )) = 0; static void server_is_running_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void server_is_shutting_down ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -391,17 +391,17 @@ private: )) = 0; static void server_is_shutting_down_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void find ( const char * server, ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -410,10 +410,10 @@ private: )) = 0; static void find_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -421,7 +421,7 @@ private: CORBA::ULong how_many, ImplementationRepository::ServerInformationList_out server_list, ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -429,10 +429,10 @@ private: )) = 0; static void list_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -443,7 +443,7 @@ private: #if !defined (_IMPLEMENTATIONREPOSITORY_ADMINISTRATION___THRU_POA_COLLOCATED_SH_) #define _IMPLEMENTATIONREPOSITORY_ADMINISTRATION___THRU_POA_COLLOCATED_SH_ - class TAO_Export _tao_thru_poa_collocated_Administration : public virtual ImplementationRepository::Administration + class TAO_Export _tao_thru_poa_collocated_Administration : public virtual ::ImplementationRepository::Administration { public: _tao_thru_poa_collocated_Administration ( @@ -453,14 +453,14 @@ private: const CORBA::Char *logical_type_id, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () ); - + virtual CORBA::Boolean _non_existent( CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () ); - + virtual void activate_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -472,7 +472,7 @@ private: virtual void register_server ( const char * server, const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -483,7 +483,7 @@ private: virtual void reregister_server ( const char * server, const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -492,7 +492,7 @@ private: virtual void remove_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -502,7 +502,7 @@ private: virtual void shutdown_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -514,7 +514,7 @@ private: const char * server, const char * addr, ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -524,7 +524,7 @@ private: virtual void server_is_shutting_down ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -535,7 +535,7 @@ private: virtual void find ( const char * server, ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -547,7 +547,7 @@ private: CORBA::ULong how_many, ImplementationRepository::ServerInformationList_out server_list, ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -559,7 +559,7 @@ private: #endif /* end #if !defined */ - + #if defined (ACE_HAS_USING_KEYWORD) // TIE class: Refer to CORBA v2.2, Section 20.34.4 template <class T> @@ -576,7 +576,7 @@ private: // ctor with T*, ownership flag and a POA ~Administration_tie (void); // dtor - + // TIE specific functions T *_tied_object (void); // return the underlying object @@ -588,15 +588,15 @@ private: // do we own it void _is_owner (CORBA::Boolean b); // set the ownership - + // overridden ServantBase operations PortableServer::POA_ptr _default_POA ( - CORBA::Environment &env = + CORBA::Environment &env = TAO_default_environment () ); void activate_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -608,7 +608,7 @@ private: void register_server ( const char * server, const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -619,7 +619,7 @@ private: void reregister_server ( const char * server, const ImplementationRepository::StartupOptions & options, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -628,7 +628,7 @@ private: void remove_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -638,7 +638,7 @@ private: void shutdown_server ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -650,7 +650,7 @@ private: const char * server, const char * addr, ImplementationRepository::ServerObject_ptr server_object, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -660,7 +660,7 @@ private: void server_is_shutting_down ( const char * server, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -671,7 +671,7 @@ private: void find ( const char * server, ImplementationRepository::ServerInformation_out info, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -683,7 +683,7 @@ private: CORBA::ULong how_many, ImplementationRepository::ServerInformationList_out server_list, ImplementationRepository::ServerInformationIterator_out server_iterator, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -694,7 +694,7 @@ private: T *ptr_; PortableServer::POA_var poa_; CORBA::Boolean rel_; - + // copy and assignment are not allowed Administration_tie (const Administration_tie &); void operator= (const Administration_tie &); @@ -716,7 +716,7 @@ private: virtual CORBA::Boolean _is_a ( const char* logical_type_id, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -728,7 +728,7 @@ private: CORBA::ServerRequest &req, void *obj, void *context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -736,19 +736,19 @@ private: CORBA::ServerRequest &req, void *obj, void *context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void _dispatch ( CORBA::ServerRequest &_tao_req, void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); - ImplementationRepository::ServerInformationIterator *_this ( - CORBA::Environment &ACE_TRY_ENV = + ::ImplementationRepository::ServerInformationIterator *_this ( + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -757,7 +757,7 @@ private: virtual CORBA::Boolean next_n ( CORBA::ULong how_many, ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -765,15 +765,15 @@ private: )) = 0; static void next_n_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -781,10 +781,10 @@ private: )) = 0; static void destroy_skel ( - CORBA::ServerRequest &_tao_req, - void *_tao_obj, - void *_tao_context, - CORBA::Environment &ACE_TRY_ENV = + CORBA::ServerRequest &_tao_req, + void *_tao_obj, + void *_tao_context, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); @@ -795,7 +795,7 @@ private: #if !defined (_IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___THRU_POA_COLLOCATED_SH_) #define _IMPLEMENTATIONREPOSITORY_SERVERINFORMATIONITERATOR___THRU_POA_COLLOCATED_SH_ - class TAO_Export _tao_thru_poa_collocated_ServerInformationIterator : public virtual ImplementationRepository::ServerInformationIterator + class TAO_Export _tao_thru_poa_collocated_ServerInformationIterator : public virtual ::ImplementationRepository::ServerInformationIterator { public: _tao_thru_poa_collocated_ServerInformationIterator ( @@ -805,15 +805,15 @@ private: const CORBA::Char *logical_type_id, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () ); - + virtual CORBA::Boolean _non_existent( CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () ); - + virtual CORBA::Boolean next_n ( CORBA::ULong how_many, ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -821,7 +821,7 @@ private: )); virtual void destroy ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -833,7 +833,7 @@ private: #endif /* end #if !defined */ - + #if defined (ACE_HAS_USING_KEYWORD) // TIE class: Refer to CORBA v2.2, Section 20.34.4 template <class T> @@ -850,7 +850,7 @@ private: // ctor with T*, ownership flag and a POA ~ServerInformationIterator_tie (void); // dtor - + // TIE specific functions T *_tied_object (void); // return the underlying object @@ -862,16 +862,16 @@ private: // do we own it void _is_owner (CORBA::Boolean b); // set the ownership - + // overridden ServantBase operations PortableServer::POA_ptr _default_POA ( - CORBA::Environment &env = + CORBA::Environment &env = TAO_default_environment () ); CORBA::Boolean next_n ( CORBA::ULong how_many, ImplementationRepository::ServerInformationList_out server_list, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -879,7 +879,7 @@ private: )); void destroy ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -890,7 +890,7 @@ private: T *ptr_; PortableServer::POA_var poa_; CORBA::Boolean rel_; - + // copy and assignment are not allowed ServerInformationIterator_tie (const ServerInformationIterator_tie &); void operator= (const ServerInformationIterator_tie &); diff --git a/TAO/tao/ImplRepoS.i b/TAO/tao/ImplRepoS.i index d41d475fa1a..9386d854853 100644 --- a/TAO/tao/ImplRepoS.i +++ b/TAO/tao/ImplRepoS.i @@ -6,4 +6,3 @@ // // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html - diff --git a/TAO/tao/ImplRepoS_T.i b/TAO/tao/ImplRepoS_T.i index c9f070e9a57..25f991dfc5d 100644 --- a/TAO/tao/ImplRepoS_T.i +++ b/TAO/tao/ImplRepoS_T.i @@ -11,30 +11,30 @@ #if defined (ACE_HAS_USING_KEYWORD) template <class T> ACE_INLINE POA_ImplementationRepository::ServerObject_tie<T>::ServerObject_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) {} template <class T> ACE_INLINE POA_ImplementationRepository::ServerObject_tie<T>::ServerObject_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) {} template <class T> ACE_INLINE POA_ImplementationRepository::ServerObject_tie<T>::ServerObject_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) {} template <class T> ACE_INLINE POA_ImplementationRepository::ServerObject_tie<T>::ServerObject_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) {} template <class T> ACE_INLINE @@ -117,30 +117,30 @@ void POA_ImplementationRepository::ServerObject_tie<T>::shutdown ( #if defined (ACE_HAS_USING_KEYWORD) template <class T> ACE_INLINE POA_ImplementationRepository::Administration_tie<T>::Administration_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) {} template <class T> ACE_INLINE POA_ImplementationRepository::Administration_tie<T>::Administration_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) {} template <class T> ACE_INLINE POA_ImplementationRepository::Administration_tie<T>::Administration_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) {} template <class T> ACE_INLINE POA_ImplementationRepository::Administration_tie<T>::Administration_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) {} template <class T> ACE_INLINE @@ -354,30 +354,30 @@ void POA_ImplementationRepository::Administration_tie<T>::list ( #if defined (ACE_HAS_USING_KEYWORD) template <class T> ACE_INLINE POA_ImplementationRepository::ServerInformationIterator_tie<T>::ServerInformationIterator_tie (T &t) - : ptr_ (&t), - poa_ (PortableServer::POA::_nil ()), - rel_ (0) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) {} template <class T> ACE_INLINE POA_ImplementationRepository::ServerInformationIterator_tie<T>::ServerInformationIterator_tie (T &t, PortableServer::POA_ptr poa) - : ptr_ (&t), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (0) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) {} template <class T> ACE_INLINE POA_ImplementationRepository::ServerInformationIterator_tie<T>::ServerInformationIterator_tie (T *tp, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_nil ()), - rel_ (release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) {} template <class T> ACE_INLINE POA_ImplementationRepository::ServerInformationIterator_tie<T>::ServerInformationIterator_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) - : ptr_ (tp), - poa_ (PortableServer::POA::_duplicate (poa)), - rel_ (release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) {} template <class T> ACE_INLINE diff --git a/TAO/tao/InterceptorC.cpp b/TAO/tao/InterceptorC.cpp index 41fdfe74349..4119d134bfa 100644 --- a/TAO/tao/InterceptorC.cpp +++ b/TAO/tao/InterceptorC.cpp @@ -15,6 +15,7 @@ #endif /* !defined INLINE */ #if defined (TAO_HAS_INTERCEPTORS) + PortableInterceptor::Cookie_ptr PortableInterceptor::Cookie::_narrow ( CORBA::Object_ptr obj, CORBA::Environment &ACE_TRY_ENV @@ -57,6 +58,12 @@ PortableInterceptor::Cookie::_duplicate (PortableInterceptor::Cookie_ptr obj) return obj; } +void PortableInterceptor::Cookie::_tao_any_destructor (void *x) +{ + PortableInterceptor::Cookie* tmp = ACE_const_cast (PortableInterceptor::Cookie*,x); + CORBA::release (tmp); +} + CORBA::Boolean PortableInterceptor::Cookie::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( @@ -205,6 +212,11 @@ PortableInterceptor::Cookies::Cookies (const Cookies &seq) // copy ctor PortableInterceptor::Cookies::~Cookies (void) // dtor {} +void PortableInterceptor::Cookies::_tao_any_destructor (void *x) +{ + PortableInterceptor::Cookies *tmp = ACE_static_cast(PortableInterceptor::Cookies*,x); + delete tmp; +} #endif /* end #if !defined */ @@ -272,6 +284,12 @@ PortableInterceptor::Interceptor::_duplicate (PortableInterceptor::Interceptor_p return obj; } +void PortableInterceptor::Interceptor::_tao_any_destructor (void* x) +{ + PortableInterceptor::Interceptor *tmp = ACE_static_cast(PortableInterceptor::Interceptor*,x); + CORBA::release (tmp); +} + CORBA::Boolean PortableInterceptor::Interceptor::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( @@ -340,6 +358,12 @@ PortableInterceptor::ServerRequestInterceptor::_duplicate (PortableInterceptor:: return obj; } +void PortableInterceptor::ServerRequestInterceptor::_tao_any_destructor (void *x) +{ + PortableInterceptor::ServerRequestInterceptor* tmp = ACE_const_cast (PortableInterceptor::ServerRequestInterceptor*,x); + CORBA::release (tmp); +} + CORBA::Boolean PortableInterceptor::ServerRequestInterceptor::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( @@ -409,6 +433,12 @@ PortableInterceptor::ClientRequestInterceptor::_duplicate (PortableInterceptor:: return obj; } +void PortableInterceptor::ClientRequestInterceptor::_tao_any_destructor (void *x) +{ + PortableInterceptor::ClientRequestInterceptor* tmp = ACE_const_cast (PortableInterceptor::ClientRequestInterceptor*,x); + CORBA::release (tmp); +} + CORBA::Boolean PortableInterceptor::ClientRequestInterceptor::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV) { if ( @@ -436,49 +466,28 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (PortableInterceptor) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ClientRequestInterceptor, &_tc_TAO_tc_PortableInterceptor_ClientRequestInterceptor) TAO_NAMESPACE_END + void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Cookie_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 = PortableInterceptor::Cookie::_duplicate (_tao_elem); - TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + TAO_OutputCDR stream; + if (stream << _tao_elem) { _tao_any._tao_replace ( - PortableInterceptor::_tc_Cookie, + PortableInterceptor::_tc_Cookie, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; } 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->equivalent (PortableInterceptor::_tc_Cookie, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -491,24 +500,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Coo { _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)->_tao_replace ( PortableInterceptor::_tc_Cookie, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableInterceptor::Cookie::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableInterceptor::Cookie::_nil (); return 0; } @@ -530,40 +532,19 @@ void operator<<= ( const PortableInterceptor::Cookies &_tao_elem ) // copying { - PortableInterceptor::Cookies *_tao_any_val; - ACE_NEW (_tao_any_val, PortableInterceptor::Cookies (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableInterceptor::_tc_Cookies, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; } void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Cookies *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -572,16 +553,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Cookies *_tao_elem) stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableInterceptor::Cookies::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Cookies *&_tao_elem) @@ -613,9 +586,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Coo PortableInterceptor::_tc_Cookies, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableInterceptor::Cookies::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -629,7 +601,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Coo { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -637,98 +609,30 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Coo 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; + return _tao_any >>= ACE_const_cast(PortableInterceptor::Cookies*&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::Interceptor_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 = PortableInterceptor::Interceptor::_duplicate (_tao_elem); - 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 + TAO_OutputCDR stream; + if (stream << _tao_elem) { - delete _tao_obj_ptr; + _tao_any._tao_replace ( + PortableInterceptor::_tc_Interceptor, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); } - ACE_ENDTRY; } 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->equivalent (PortableInterceptor::_tc_Interceptor, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -741,24 +645,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Int { _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)->_tao_replace ( PortableInterceptor::_tc_Interceptor, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableInterceptor::Interceptor::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableInterceptor::Interceptor::_nil (); return 0; } @@ -777,47 +674,25 @@ template class TAO_Object_Manager<PortableInterceptor::Interceptor,PortableInter void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::ServerRequestInterceptor_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 = PortableInterceptor::ServerRequestInterceptor::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - PortableInterceptor::_tc_ServerRequestInterceptor, + PortableInterceptor::_tc_ServerRequestInterceptor, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; } 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->equivalent (PortableInterceptor::_tc_ServerRequestInterceptor, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -830,24 +705,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Ser { _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)->_tao_replace ( PortableInterceptor::_tc_ServerRequestInterceptor, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableInterceptor::ServerRequestInterceptor::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableInterceptor::ServerRequestInterceptor::_nil (); return 0; } @@ -866,47 +734,25 @@ template class TAO_Object_Manager<PortableInterceptor::ServerRequestInterceptor, void operator<<= (CORBA::Any &_tao_any, PortableInterceptor::ClientRequestInterceptor_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 = PortableInterceptor::ClientRequestInterceptor::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - PortableInterceptor::_tc_ClientRequestInterceptor, + PortableInterceptor::_tc_ClientRequestInterceptor, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; } 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->equivalent (PortableInterceptor::_tc_ClientRequestInterceptor, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -919,24 +765,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableInterceptor::Cli { _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)->_tao_replace ( PortableInterceptor::_tc_ClientRequestInterceptor, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableInterceptor::ClientRequestInterceptor::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableInterceptor::ClientRequestInterceptor::_nil (); return 0; } @@ -982,7 +821,7 @@ CORBA::Boolean operator>> ( // set the length of the sequence _tao_sequence.length (_tao_seq_len); // If length is 0 we return true. - if (0 >= _tao_seq_len) + if (0 >= _tao_seq_len) return 1; // retrieve all the elements CORBA::Boolean _tao_marshal_flag = 1; diff --git a/TAO/tao/InterceptorC.h b/TAO/tao/InterceptorC.h index d4e8900a4b4..d793744e146 100644 --- a/TAO/tao/InterceptorC.h +++ b/TAO/tao/InterceptorC.h @@ -126,6 +126,7 @@ class TAO_Export Cookie : public virtual ACE_CORBA_1 (Object) { return (PortableInterceptor::Cookie_ptr)0; } + static void _tao_any_destructor (void*); virtual char * myname ( CORBA::Environment &ACE_TRY_ENV = @@ -225,6 +226,8 @@ class TAO_Export Cookie : public virtual ACE_CORBA_1 (Object) ); Cookies (const Cookies &); // copy ctor ~Cookies (void); // dtor + + static void _tao_any_destructor (void*); }; typedef Cookies *Cookies_ptr; @@ -385,6 +388,7 @@ class TAO_Export Interceptor : public virtual ACE_CORBA_1 (Object) { return (PortableInterceptor::Interceptor_ptr)0; } + static void _tao_any_destructor (void*); virtual char * name ( CORBA::Environment &ACE_TRY_ENV = @@ -503,6 +507,7 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor { return (PortableInterceptor::ServerRequestInterceptor_ptr)0; } + static void _tao_any_destructor (void*); virtual void preinvoke ( CORBA::ULong request_id, @@ -650,6 +655,7 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor { return (PortableInterceptor::ClientRequestInterceptor_ptr)0; } + static void _tao_any_destructor (void*); virtual void preinvoke ( CORBA::ULong request_id, @@ -714,32 +720,32 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor TAO_NAMESPACE_CLOSE // module PortableInterceptor // Any operators for interface PortableInterceptor::Cookie -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Cookie_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::Cookie *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const PortableInterceptor::Cookies &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Cookies*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::Cookies *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const PortableInterceptor::Cookies *&); // Any operators for interface PortableInterceptor::Interceptor -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::Interceptor_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::Interceptor *&); // Any operators for interface PortableInterceptor::ServerRequestInterceptor -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ServerRequestInterceptor_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ServerRequestInterceptor *&); // Any operators for interface PortableInterceptor::ClientRequestInterceptor -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ClientRequestInterceptor_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ClientRequestInterceptor *&); #ifndef __ACE_INLINE__ diff --git a/TAO/tao/InterfaceC.cpp b/TAO/tao/InterfaceC.cpp index f2ca479ac4d..378b92620d6 100644 --- a/TAO/tao/InterfaceC.cpp +++ b/TAO/tao/InterfaceC.cpp @@ -13789,31 +13789,16 @@ 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) { - CORBA::DefinitionKind *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::DefinitionKind (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_DefinitionKind, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DefinitionKind &_tao_elem) @@ -13848,47 +13833,31 @@ CORBA::IRObject_ptr (*_TAO_collocation_CORBA_IRObject_Stub_Factory_function_poin ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::IRObject_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::IRObject::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_IRObject, + CORBA::_tc_IRObject, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::IRObject::_tao_any_destructor (void *x) +{ + CORBA::IRObject *tmp = ACE_static_cast(CORBA::IRObject*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::IRObject_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::IRObject::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_IRObject, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -13901,24 +13870,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::IRObject_ptr &_ta { _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)->_tao_replace ( CORBA::_tc_IRObject, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::IRObject::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::IRObject::_nil (); return 0; } @@ -13941,47 +13903,31 @@ CORBA::Contained_ptr (*_TAO_collocation_CORBA_Contained_Stub_Factory_function_po ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::Contained_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::Contained::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_Contained, + CORBA::_tc_Contained, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::Contained::_tao_any_destructor (void *x) +{ + CORBA::Contained *tmp = ACE_static_cast(CORBA::Contained*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::Contained::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_Contained, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -13994,24 +13940,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained_ptr &_t { _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)->_tao_replace ( CORBA::_tc_Contained, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::Contained::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::Contained::_nil (); return 0; } @@ -14031,34 +13970,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained_ptr &_t void operator<<= (CORBA::Any &_tao_any, const CORBA::Contained::Description &_tao_elem) // copying { - CORBA::Contained::Description *_any_val = 0; - ACE_NEW (_any_val, CORBA::Contained::Description (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::Contained::_tc_Description, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::Contained::Description::_tao_any_destructor (void *x) +{ + CORBA::Contained::Description *tmp = ACE_const_cast(CORBA::Contained::Description*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::Contained::Description *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -14067,16 +13995,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::Contained::Description *_tao_elem stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::Contained::Description::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained::Description *&_tao_elem) @@ -14108,9 +14028,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained::Descri CORBA::Contained::_tc_Description, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::Contained::Description::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -14124,7 +14043,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained::Descri { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -14132,53 +14051,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Contained::Descri 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; + return _tao_any >>= ACE_const_cast(CORBA::Contained::Description*&,_tao_elem); } void operator<<= ( @@ -14186,40 +14059,25 @@ void operator<<= ( const CORBA::InterfaceDefSeq &_tao_elem ) // copying { - CORBA::InterfaceDefSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::InterfaceDefSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_InterfaceDefSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::InterfaceDefSeq::_tao_any_destructor (void *x) +{ + CORBA::InterfaceDefSeq *tmp = ACE_const_cast(CORBA::InterfaceDefSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDefSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -14228,16 +14086,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDefSeq *_tao_elem) // no stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::InterfaceDefSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDefSeq *&_tao_elem) @@ -14269,9 +14119,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDefSeq * CORBA::_tc_InterfaceDefSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::InterfaceDefSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -14285,7 +14134,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDefSeq * { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -14293,53 +14142,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDefSeq * 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; + return _tao_any >>= ACE_const_cast(CORBA::InterfaceDefSeq*&,_tao_elem); } void operator<<= ( @@ -14347,40 +14150,25 @@ void operator<<= ( const CORBA::ValueDefSeq &_tao_elem ) // copying { - CORBA::ValueDefSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::ValueDefSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_ValueDefSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::ValueDefSeq::_tao_any_destructor (void *x) +{ + CORBA::ValueDefSeq *tmp = ACE_static_cast(CORBA::ValueDefSeq*,x); + delete x; } void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDefSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -14389,16 +14177,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDefSeq *_tao_elem) // non co stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ValueDefSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDefSeq *&_tao_elem) @@ -14430,9 +14210,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDefSeq *&_ta CORBA::_tc_ValueDefSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ValueDefSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -14446,7 +14225,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDefSeq *&_ta { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -14454,53 +14233,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDefSeq *&_ta 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; + return _tao_any >>= ACE_const_cast(CORBA::ValueDefSeq*&,_tao_elem); } void operator<<= ( @@ -14508,40 +14241,25 @@ void operator<<= ( const CORBA::ContainedSeq &_tao_elem ) // copying { - CORBA::ContainedSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::ContainedSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_ContainedSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::ContainedSeq::_tao_any_destructor (void *x) +{ + CORBA::ContainedSeq *tmp = ACE_static_cast(CORBA::ContainedSeq*,x); + delete x; } void operator<<= (CORBA::Any &_tao_any, CORBA::ContainedSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -14550,16 +14268,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ContainedSeq *_tao_elem) // non c stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ContainedSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContainedSeq *&_tao_elem) @@ -14591,9 +14301,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContainedSeq *&_t CORBA::_tc_ContainedSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ContainedSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -14607,7 +14316,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContainedSeq *&_t { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -14615,85 +14324,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContainedSeq *&_t 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; + return _tao_any >>= ACE_const_cast(CORBA::ContainedSeq*&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const CORBA::StructMember &_tao_elem) // copying { - CORBA::StructMember *_any_val = 0; - ACE_NEW (_any_val, CORBA::StructMember (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_StructMember, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::StructMember::_tao_any_destructor (void *x) +{ + CORBA::StructMember *tmp = ACE_static_cast(CORBA::StructMember*,x); + delete x; } void operator<<= (CORBA::Any &_tao_any, CORBA::StructMember *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -14702,16 +14354,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::StructMember *_tao_elem) // non c stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::StructMember::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMember *&_tao_elem) @@ -14743,9 +14387,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMember *&_t CORBA::_tc_StructMember, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::StructMember::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -14759,7 +14402,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMember *&_t { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -14767,53 +14410,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMember *&_t 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; + return _tao_any >>= ACE_const_cast(CORBA::StructMember *&,_tao_elem); } void operator<<= ( @@ -14821,40 +14418,25 @@ void operator<<= ( const CORBA::StructMemberSeq &_tao_elem ) // copying { - CORBA::StructMemberSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::StructMemberSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_StructMemberSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::StructMemberSeq::_tao_any_destructor (void *x) +{ + CORBA::StructMemberSeq *tmp = ACE_static_cast(CORBA::StructMemberSeq*,x); + delete x; } void operator<<= (CORBA::Any &_tao_any, CORBA::StructMemberSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -14863,16 +14445,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::StructMemberSeq *_tao_elem) // no stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::StructMemberSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMemberSeq *&_tao_elem) @@ -14904,9 +14478,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMemberSeq * CORBA::_tc_StructMemberSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::StructMemberSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -14920,7 +14493,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMemberSeq * { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -14928,85 +14501,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructMemberSeq * 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; + return _tao_any >>= ACE_const_cast(CORBA::StructMemberSeq*&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const CORBA::Initializer &_tao_elem) // copying { - CORBA::Initializer *_any_val = 0; - ACE_NEW (_any_val, CORBA::Initializer (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_Initializer, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::Initializer::_tao_any_destructor (void *x) +{ + CORBA::Initializer *tmp = ACE_static_cast(CORBA::Initializer*,x); + delete x; } void operator<<= (CORBA::Any &_tao_any, CORBA::Initializer *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -15015,16 +14531,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::Initializer *_tao_elem) // non co stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::Initializer::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Initializer *&_tao_elem) @@ -15056,9 +14564,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Initializer *&_ta CORBA::_tc_Initializer, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::Initializer::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -15072,7 +14579,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Initializer *&_ta { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -15080,53 +14587,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Initializer *&_ta 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; + return _tao_any >>= ACE_const_cast(CORBA::Initializer*&,_tao_elem); } void operator<<= ( @@ -15134,40 +14595,26 @@ void operator<<= ( const CORBA::InitializerSeq &_tao_elem ) // copying { - CORBA::InitializerSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::InitializerSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_InitializerSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::InitializerSeq::_tao_any_destructor (void *x) +{ + CORBA::InitializerSeq *tmp = + ACE_static_cast(CORBA::InitializerSeq*,x); + delete x; } void operator<<= (CORBA::Any &_tao_any, CORBA::InitializerSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -15176,16 +14623,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::InitializerSeq *_tao_elem) // non stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::InitializerSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InitializerSeq *&_tao_elem) @@ -15217,9 +14656,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InitializerSeq *& CORBA::_tc_InitializerSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::InitializerSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -15233,7 +14671,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InitializerSeq *& { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -15241,85 +14679,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InitializerSeq *& 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; + return _tao_any >>= ACE_const_cast(CORBA::InitializerSeq*&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const CORBA::UnionMember &_tao_elem) // copying { - CORBA::UnionMember *_any_val = 0; - ACE_NEW (_any_val, CORBA::UnionMember (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_UnionMember, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::UnionMember::_tao_any_destructor (void *x) +{ + CORBA::UnionMember *tmp = ACE_static_cast(CORBA::UnionMember*,x); + delete x; } void operator<<= (CORBA::Any &_tao_any, CORBA::UnionMember *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -15328,16 +14709,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::UnionMember *_tao_elem) // non co stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::UnionMember::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMember *&_tao_elem) @@ -15369,9 +14742,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMember *&_ta CORBA::_tc_UnionMember, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::UnionMember::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -15385,7 +14757,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMember *&_ta { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -15393,53 +14765,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMember *&_ta 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; + return _tao_any >>= ACE_const_cast(CORBA::UnionMember*&,_tao_elem); } void operator<<= ( @@ -15447,40 +14773,25 @@ void operator<<= ( const CORBA::UnionMemberSeq &_tao_elem ) // copying { - CORBA::UnionMemberSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::UnionMemberSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_UnionMemberSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::UnionMemberSeq::_tao_any_destructor (void *x) +{ + CORBA::UnionMemberSeq *tmp = ACE_static_cast(CORBA::UnionMemberSeq*,x); + delete x; } void operator<<= (CORBA::Any &_tao_any, CORBA::UnionMemberSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -15489,16 +14800,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::UnionMemberSeq *_tao_elem) // non stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::UnionMemberSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMemberSeq *&_tao_elem) @@ -15530,9 +14833,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMemberSeq *& CORBA::_tc_UnionMemberSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::UnionMemberSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -15546,7 +14848,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMemberSeq *& { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -15554,53 +14856,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionMemberSeq *& 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; + return _tao_any >>= ACE_const_cast(CORBA::UnionMemberSeq*&,_tao_elem); +} + +void CORBA::EnumMemberSeq::_tao_any_destructor (void *x) +{ + CORBA::EnumMemberSeq *tmp = ACE_static_cast(CORBA::EnumMemberSeq*,x); + delete x; } void operator<<= ( @@ -15608,40 +14870,19 @@ void operator<<= ( const CORBA::EnumMemberSeq &_tao_elem ) // copying { - CORBA::EnumMemberSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::EnumMemberSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_EnumMemberSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; } void operator<<= (CORBA::Any &_tao_any, CORBA::EnumMemberSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -15650,16 +14891,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::EnumMemberSeq *_tao_elem) // non stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::EnumMemberSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::EnumMemberSeq *&_tao_elem) @@ -15691,9 +14924,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::EnumMemberSeq *&_ CORBA::_tc_EnumMemberSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::EnumMemberSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -15707,7 +14939,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::EnumMemberSeq *&_ { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -15715,53 +14947,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::EnumMemberSeq *&_ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::EnumMemberSeq *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::EnumMemberSeq*&,_tao_elem); } CORBA::Container_ptr (*_TAO_collocation_CORBA_Container_Stub_Factory_function_pointer) ( @@ -15769,47 +14955,31 @@ CORBA::Container_ptr (*_TAO_collocation_CORBA_Container_Stub_Factory_function_po ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_Container, + CORBA::_tc_Container, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::Container::_tao_any_destructor (void *x) +{ + CORBA::Container *tmp = ACE_static_cast(CORBA::Container*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::Container::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_Container, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -15822,24 +14992,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container_ptr &_t { _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)->_tao_replace ( CORBA::_tc_Container, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::Container::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::Container::_nil (); return 0; } @@ -15859,34 +15022,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container_ptr &_t void operator<<= (CORBA::Any &_tao_any, const CORBA::Container::Description &_tao_elem) // copying { - CORBA::Container::Description *_any_val = 0; - ACE_NEW (_any_val, CORBA::Container::Description (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::Container::_tc_Description, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::Container::Description::_tao_any_destructor (void *x) +{ + CORBA::Container::Description *tmp = ACE_static_cast(CORBA::Container::Description*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::Container::Description *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -15895,16 +15047,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::Container::Description *_tao_elem stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::Container::Description::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::Description *&_tao_elem) @@ -15936,9 +15080,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::Descri CORBA::Container::_tc_Description, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::Container::Description::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -15952,7 +15095,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::Descri { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -15960,53 +15103,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::Descri 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; + return _tao_any >>= ACE_const_cast(CORBA::Container::Description*&,_tao_elem); } void operator<<= ( @@ -16014,40 +15111,25 @@ void operator<<= ( const CORBA::Container::DescriptionSeq &_tao_elem ) // copying { - 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_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::Container::_tc_DescriptionSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::Container::DescriptionSeq::_tao_any_destructor (void *x) +{ + CORBA::Container::DescriptionSeq *tmp = ACE_static_cast(CORBA::Container::DescriptionSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::Container::DescriptionSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -16056,16 +15138,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::Container::DescriptionSeq *_tao_e stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::Container::DescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::DescriptionSeq *&_tao_elem) @@ -16097,9 +15171,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::Descri CORBA::Container::_tc_DescriptionSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::Container::DescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -16113,7 +15186,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::Descri { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -16121,53 +15194,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Container::Descri CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::Container::DescriptionSeq *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::Container::DescriptionSeq*&,_tao_elem); } CORBA::IDLType_ptr (*_TAO_collocation_CORBA_IDLType_Stub_Factory_function_pointer) ( @@ -16175,47 +15202,31 @@ CORBA::IDLType_ptr (*_TAO_collocation_CORBA_IDLType_Stub_Factory_function_pointe ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_IDLType, + CORBA::_tc_IDLType, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::IDLType::_tao_any_destructor (void *x) +{ + CORBA::IDLType *tmp = ACE_static_cast(CORBA::IDLType*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::IDLType_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::IDLType::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_IDLType, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -16228,24 +15239,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::IDLType_ptr &_tao { _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)->_tao_replace ( CORBA::_tc_IDLType, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::IDLType::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::IDLType::_nil (); return 0; } @@ -16265,29 +15269,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::IDLType_ptr &_tao void operator<<= (CORBA::Any &_tao_any, CORBA::PrimitiveKind _tao_elem) { - CORBA::PrimitiveKind *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::PrimitiveKind (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_PrimitiveKind, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PrimitiveKind &_tao_elem) @@ -16322,47 +15310,31 @@ CORBA::Repository_ptr (*_TAO_collocation_CORBA_Repository_Stub_Factory_function_ ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::Repository_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::Repository::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_Repository, + CORBA::_tc_Repository, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::Repository::_tao_any_destructor (void *x) +{ + CORBA::Repository *tmp = ACE_static_cast(CORBA::Repository*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Repository_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::Repository::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_Repository, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -16375,24 +15347,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Repository_ptr &_ { _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)->_tao_replace ( CORBA::_tc_Repository, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::Repository::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::Repository::_nil (); return 0; } @@ -16415,47 +15380,31 @@ CORBA::ModuleDef_ptr (*_TAO_collocation_CORBA_ModuleDef_Stub_Factory_function_po ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::ModuleDef_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::ModuleDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_ModuleDef, + CORBA::_tc_ModuleDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::ModuleDef::_tao_any_destructor (void *x) +{ + CORBA::ModuleDef *tmp = ACE_static_cast(CORBA::ModuleDef*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::ModuleDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_ModuleDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -16468,24 +15417,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDef_ptr &_t { _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)->_tao_replace ( CORBA::_tc_ModuleDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::ModuleDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::ModuleDef::_nil (); return 0; } @@ -16505,34 +15447,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDef_ptr &_t void operator<<= (CORBA::Any &_tao_any, const CORBA::ModuleDescription &_tao_elem) // copying { - CORBA::ModuleDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::ModuleDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_ModuleDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::ModuleDescription::_tao_any_destructor (void *x) +{ + CORBA::ModuleDescription *tmp = ACE_static_cast(CORBA::ModuleDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ModuleDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -16541,16 +15472,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ModuleDescription *_tao_elem) // stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ModuleDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDescription *&_tao_elem) @@ -16582,9 +15505,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDescription CORBA::_tc_ModuleDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ModuleDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -16598,7 +15520,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDescription { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -16606,53 +15528,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ModuleDescription CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ModuleDescription *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::ModuleDescription *&,_tao_elem); } CORBA::ConstantDef_ptr (*_TAO_collocation_CORBA_ConstantDef_Stub_Factory_function_pointer) ( @@ -16660,47 +15536,31 @@ CORBA::ConstantDef_ptr (*_TAO_collocation_CORBA_ConstantDef_Stub_Factory_functio ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_ConstantDef, + CORBA::_tc_ConstantDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::ConstantDef::_tao_any_destructor (void *x) +{ + CORBA::ConstantDef *tmp = ACE_static_cast(CORBA::ConstantDef*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::ConstantDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_ConstantDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -16713,24 +15573,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDef_ptr & { _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)->_tao_replace ( CORBA::_tc_ConstantDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::ConstantDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::ConstantDef::_nil (); return 0; } @@ -16750,34 +15603,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDef_ptr & void operator<<= (CORBA::Any &_tao_any, const CORBA::ConstantDescription &_tao_elem) // copying { - CORBA::ConstantDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::ConstantDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_ConstantDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::ConstantDescription::_tao_any_destructor (void *x) +{ + CORBA::ConstantDescription *tmp = ACE_static_cast(CORBA::ConstantDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ConstantDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -16786,16 +15628,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ConstantDescription *_tao_elem) / stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ConstantDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDescription *&_tao_elem) @@ -16827,9 +15661,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDescripti CORBA::_tc_ConstantDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ConstantDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -16843,7 +15676,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDescripti { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -16851,53 +15684,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ConstantDescripti CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ConstantDescription *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::ConstantDescription *&,_tao_elem); } CORBA::TypedefDef_ptr (*_TAO_collocation_CORBA_TypedefDef_Stub_Factory_function_pointer) ( @@ -16905,47 +15692,31 @@ CORBA::TypedefDef_ptr (*_TAO_collocation_CORBA_TypedefDef_Stub_Factory_function_ ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_TypedefDef, + CORBA::_tc_TypedefDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::TypedefDef::_tao_any_destructor (void *x) +{ + CORBA::TypedefDef *tmp = ACE_static_cast(CORBA::TypedefDef*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypedefDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::TypedefDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_TypedefDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -16958,24 +15729,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypedefDef_ptr &_ { _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)->_tao_replace ( CORBA::_tc_TypedefDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::TypedefDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::TypedefDef::_nil (); return 0; } @@ -16995,34 +15759,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypedefDef_ptr &_ void operator<<= (CORBA::Any &_tao_any, const CORBA::TypeDescription &_tao_elem) // copying { - CORBA::TypeDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::TypeDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_TypeDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::TypeDescription::_tao_any_destructor (void *x) +{ + CORBA::TypeDescription *tmp = ACE_static_cast(CORBA::TypeDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::TypeDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -17031,16 +15784,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::TypeDescription *_tao_elem) // no stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::TypeDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypeDescription *&_tao_elem) @@ -17072,9 +15817,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypeDescription * CORBA::_tc_TypeDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::TypeDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -17088,7 +15832,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypeDescription * { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -17096,53 +15840,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::TypeDescription * CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::TypeDescription *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::TypeDescription *&,_tao_elem); } CORBA::StructDef_ptr (*_TAO_collocation_CORBA_StructDef_Stub_Factory_function_pointer) ( @@ -17150,47 +15848,31 @@ CORBA::StructDef_ptr (*_TAO_collocation_CORBA_StructDef_Stub_Factory_function_po ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_StructDef, + CORBA::_tc_StructDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::StructDef::_tao_any_destructor (void *x) +{ + CORBA::StructDef *tmp = ACE_static_cast(CORBA::StructDef*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::StructDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_StructDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17203,24 +15885,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StructDef_ptr &_t { _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)->_tao_replace ( CORBA::_tc_StructDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::StructDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::StructDef::_nil (); return 0; } @@ -17243,47 +15918,31 @@ CORBA::UnionDef_ptr (*_TAO_collocation_CORBA_UnionDef_Stub_Factory_function_poin ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::UnionDef_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::UnionDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_UnionDef, + CORBA::_tc_UnionDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::UnionDef::_tao_any_destructor (void *x) +{ + CORBA::UnionDef *tmp = ACE_static_cast(CORBA::UnionDef*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::UnionDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_UnionDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17296,24 +15955,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::UnionDef_ptr &_ta { _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)->_tao_replace ( CORBA::_tc_UnionDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::UnionDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::UnionDef::_nil (); return 0; } @@ -17336,47 +15988,31 @@ CORBA::EnumDef_ptr (*_TAO_collocation_CORBA_EnumDef_Stub_Factory_function_pointe ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::EnumDef_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::EnumDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_EnumDef, + CORBA::_tc_EnumDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::EnumDef::_tao_any_destructor (void *x) +{ + CORBA::EnumDef *tmp = ACE_static_cast(CORBA::EnumDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::EnumDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::EnumDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_EnumDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17389,24 +16025,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::EnumDef_ptr &_tao { _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)->_tao_replace ( CORBA::_tc_EnumDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::EnumDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::EnumDef::_nil (); return 0; } @@ -17429,47 +16058,31 @@ CORBA::AliasDef_ptr (*_TAO_collocation_CORBA_AliasDef_Stub_Factory_function_poin ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::AliasDef_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::AliasDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_AliasDef, + CORBA::_tc_AliasDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::AliasDef::_tao_any_destructor (void *x) +{ + CORBA::AliasDef *tmp = ACE_static_cast(CORBA::AliasDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AliasDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::AliasDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_AliasDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17482,24 +16095,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AliasDef_ptr &_ta { _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)->_tao_replace ( CORBA::_tc_AliasDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::AliasDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::AliasDef::_nil (); return 0; } @@ -17522,47 +16128,31 @@ CORBA::PrimitiveDef_ptr (*_TAO_collocation_CORBA_PrimitiveDef_Stub_Factory_funct ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::PrimitiveDef_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::PrimitiveDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_PrimitiveDef, + CORBA::_tc_PrimitiveDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::PrimitiveDef::_tao_any_destructor (void *x) +{ + CORBA::PrimitiveDef *tmp = ACE_static_cast(CORBA::PrimitiveDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PrimitiveDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::PrimitiveDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_PrimitiveDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17575,24 +16165,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PrimitiveDef_ptr { _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)->_tao_replace ( CORBA::_tc_PrimitiveDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::PrimitiveDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::PrimitiveDef::_nil (); return 0; } @@ -17615,47 +16198,31 @@ CORBA::StringDef_ptr (*_TAO_collocation_CORBA_StringDef_Stub_Factory_function_po ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::StringDef_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::StringDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_StringDef, + CORBA::_tc_StringDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::StringDef::_tao_any_destructor (void *x) +{ + CORBA::StringDef *tmp = ACE_static_cast(CORBA::StringDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StringDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::StringDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_StringDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17668,24 +16235,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::StringDef_ptr &_t { _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)->_tao_replace ( CORBA::_tc_StringDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::StringDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::StringDef::_nil (); return 0; } @@ -17708,47 +16268,31 @@ CORBA::WstringDef_ptr (*_TAO_collocation_CORBA_WstringDef_Stub_Factory_function_ ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::WstringDef_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::WstringDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_WstringDef, + CORBA::_tc_WstringDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::WstringDef::_tao_any_destructor (void *x) +{ + CORBA::WstringDef *tmp = ACE_static_cast(CORBA::WstringDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::WstringDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::WstringDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_WstringDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17761,24 +16305,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::WstringDef_ptr &_ { _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)->_tao_replace ( CORBA::_tc_WstringDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::WstringDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::WstringDef::_nil (); return 0; } @@ -17801,47 +16338,31 @@ CORBA::FixedDef_ptr (*_TAO_collocation_CORBA_FixedDef_Stub_Factory_function_poin ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::FixedDef_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::FixedDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_FixedDef, + CORBA::_tc_FixedDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::FixedDef::_tao_any_destructor (void *x) +{ + CORBA::FixedDef *tmp = ACE_static_cast(CORBA::FixedDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::FixedDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::FixedDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_FixedDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17854,24 +16375,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::FixedDef_ptr &_ta { _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)->_tao_replace ( CORBA::_tc_FixedDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::FixedDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::FixedDef::_nil (); return 0; } @@ -17894,47 +16408,31 @@ CORBA::SequenceDef_ptr (*_TAO_collocation_CORBA_SequenceDef_Stub_Factory_functio ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::SequenceDef_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::SequenceDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_SequenceDef, + CORBA::_tc_SequenceDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::SequenceDef::_tao_any_destructor (void *x) +{ + CORBA::SequenceDef *tmp = ACE_static_cast(CORBA::SequenceDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::SequenceDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::SequenceDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_SequenceDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -17947,24 +16445,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::SequenceDef_ptr & { _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)->_tao_replace ( CORBA::_tc_SequenceDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::SequenceDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::SequenceDef::_nil (); return 0; } @@ -17987,47 +16478,31 @@ CORBA::ArrayDef_ptr (*_TAO_collocation_CORBA_ArrayDef_Stub_Factory_function_poin ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::ArrayDef_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::ArrayDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_ArrayDef, + CORBA::_tc_ArrayDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::ArrayDef::_tao_any_destructor (void *x) +{ + CORBA::ArrayDef *tmp = ACE_static_cast(CORBA::ArrayDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ArrayDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::ArrayDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_ArrayDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -18040,24 +16515,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ArrayDef_ptr &_ta { _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)->_tao_replace ( CORBA::_tc_ArrayDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::ArrayDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::ArrayDef::_nil (); return 0; } @@ -18080,47 +16548,31 @@ CORBA::ExceptionDef_ptr (*_TAO_collocation_CORBA_ExceptionDef_Stub_Factory_funct ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::ExceptionDef_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::ExceptionDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_ExceptionDef, + CORBA::_tc_ExceptionDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::ExceptionDef::_tao_any_destructor (void *x) +{ + CORBA::ExceptionDef *tmp = ACE_static_cast(CORBA::ExceptionDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::ExceptionDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_ExceptionDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -18133,24 +16585,18 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDef_ptr { _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)->_tao_replace ( CORBA::_tc_ExceptionDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::ExceptionDef::_tao_any_destructor ); ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::ExceptionDef::_nil (); return 0; } @@ -18170,34 +16616,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDef_ptr void operator<<= (CORBA::Any &_tao_any, const CORBA::ExceptionDescription &_tao_elem) // copying { - CORBA::ExceptionDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::ExceptionDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_ExceptionDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::ExceptionDescription::_tao_any_destructor (void *x) +{ + CORBA::ExceptionDescription *tmp = ACE_static_cast(CORBA::ExceptionDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ExceptionDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -18206,16 +16641,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ExceptionDescription *_tao_elem) stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ExceptionDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDescription *&_tao_elem) @@ -18247,9 +16674,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDescript CORBA::_tc_ExceptionDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ExceptionDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -18263,7 +16689,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDescript { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -18271,80 +16697,18 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDescript CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ExceptionDescription *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::ExceptionDescription *&,_tao_elem); } 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; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_AttributeMode, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeMode &_tao_elem) @@ -18379,47 +16743,31 @@ CORBA::AttributeDef_ptr (*_TAO_collocation_CORBA_AttributeDef_Stub_Factory_funct ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::AttributeDef_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::AttributeDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_AttributeDef, + CORBA::_tc_AttributeDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::AttributeDef::_tao_any_destructor (void *x) +{ + CORBA::AttributeDef *tmp = ACE_static_cast(CORBA::AttributeDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::AttributeDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_AttributeDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -18432,24 +16780,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDef_ptr { _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)->_tao_replace ( CORBA::_tc_AttributeDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::AttributeDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::AttributeDef::_nil (); return 0; } @@ -18469,34 +16810,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDef_ptr void operator<<= (CORBA::Any &_tao_any, const CORBA::AttributeDescription &_tao_elem) // copying { - CORBA::AttributeDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::AttributeDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_AttributeDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::AttributeDescription::_tao_any_destructor (void *x) +{ + CORBA::AttributeDescription *tmp = ACE_static_cast(CORBA::AttributeDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::AttributeDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -18505,16 +16835,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::AttributeDescription *_tao_elem) stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::AttributeDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDescription *&_tao_elem) @@ -18546,9 +16868,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDescript CORBA::_tc_AttributeDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::AttributeDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -18562,7 +16883,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDescript { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -18570,80 +16891,18 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttributeDescript CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::AttributeDescription *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::AttributeDescription *&,_tao_elem); } 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; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_OperationMode, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationMode &_tao_elem) @@ -18675,29 +16934,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationMode &_t void operator<<= (CORBA::Any &_tao_any, CORBA::ParameterMode _tao_elem) { - CORBA::ParameterMode *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::ParameterMode (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_ParameterMode, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParameterMode &_tao_elem) @@ -18729,34 +16972,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParameterMode &_t void operator<<= (CORBA::Any &_tao_any, const CORBA::ParameterDescription &_tao_elem) // copying { - CORBA::ParameterDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::ParameterDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_ParameterDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::ParameterDescription::_tao_any_destructor (void *x) +{ + CORBA::ParameterDescription *tmp = ACE_static_cast(CORBA::ParameterDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ParameterDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -18765,16 +16997,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ParameterDescription *_tao_elem) stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ParameterDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParameterDescription *&_tao_elem) @@ -18806,7 +17030,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParameterDescript CORBA::_tc_ParameterDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ParameterDescription::_tao_any_destructor ); ACE_TRY_CHECK; return 1; @@ -18822,7 +17046,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParameterDescript { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -18830,53 +17054,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParameterDescript 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; + return _tao_any >>= ACE_const_cast(CORBA::ParameterDescription *&,_tao_elem); } void operator<<= ( @@ -18884,40 +17062,25 @@ void operator<<= ( const CORBA::ParDescriptionSeq &_tao_elem ) // copying { - CORBA::ParDescriptionSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::ParDescriptionSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_ParDescriptionSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::ParDescriptionSeq::_tao_any_destructor (void *x) +{ + CORBA::ParDescriptionSeq *tmp = ACE_static_cast(CORBA::ParDescriptionSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ParDescriptionSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -18926,16 +17089,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ParDescriptionSeq *_tao_elem) // stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ParDescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParDescriptionSeq *&_tao_elem) @@ -18967,9 +17122,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParDescriptionSeq CORBA::_tc_ParDescriptionSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ParDescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -18983,7 +17137,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParDescriptionSeq { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -18991,53 +17145,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ParDescriptionSeq 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; + return _tao_any >>= ACE_const_cast(CORBA::ParDescriptionSeq *&,_tao_elem); } void operator<<= ( @@ -19045,40 +17153,25 @@ void operator<<= ( const CORBA::ContextIdSeq &_tao_elem ) // copying { - CORBA::ContextIdSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::ContextIdSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_ContextIdSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::ContextIdSeq::_tao_any_destructor (void *x) +{ + CORBA::ContextIdSeq *tmp = ACE_static_cast(CORBA::ContextIdSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ContextIdSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -19087,16 +17180,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ContextIdSeq *_tao_elem) // non c stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ContextIdSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContextIdSeq *&_tao_elem) @@ -19128,9 +17213,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContextIdSeq *&_t CORBA::_tc_ContextIdSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ContextIdSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -19144,7 +17228,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContextIdSeq *&_t { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -19152,53 +17236,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ContextIdSeq *&_t 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; + return _tao_any >>= ACE_const_cast(CORBA::ContextIdSeq *&,_tao_elem); } void operator<<= ( @@ -19206,40 +17244,25 @@ void operator<<= ( const CORBA::ExceptionDefSeq &_tao_elem ) // copying { - CORBA::ExceptionDefSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::ExceptionDefSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_ExceptionDefSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::ExceptionDefSeq::_tao_any_destructor (void *x) +{ + CORBA::ExceptionDefSeq *tmp = ACE_static_cast(CORBA::ExceptionDefSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ExceptionDefSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -19248,16 +17271,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ExceptionDefSeq *_tao_elem) // no stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ExceptionDefSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDefSeq *&_tao_elem) @@ -19289,9 +17304,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDefSeq * CORBA::_tc_ExceptionDefSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ExceptionDefSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -19305,7 +17319,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDefSeq * { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -19313,53 +17327,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExceptionDefSeq * 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; + return _tao_any >>= ACE_const_cast(CORBA::ExceptionDefSeq *&,_tao_elem); } void operator<<= ( @@ -19367,40 +17335,25 @@ void operator<<= ( const CORBA::ExcDescriptionSeq &_tao_elem ) // copying { - CORBA::ExcDescriptionSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::ExcDescriptionSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_ExcDescriptionSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::ExcDescriptionSeq::_tao_any_destructor (void *x) +{ + CORBA::ExcDescriptionSeq *tmp = ACE_static_cast(CORBA::ExcDescriptionSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ExcDescriptionSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -19409,16 +17362,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ExcDescriptionSeq *_tao_elem) // stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ExcDescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExcDescriptionSeq *&_tao_elem) @@ -19450,9 +17395,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExcDescriptionSeq CORBA::_tc_ExcDescriptionSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ExcDescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -19466,7 +17410,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExcDescriptionSeq { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -19474,53 +17418,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ExcDescriptionSeq CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ExcDescriptionSeq *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::ExcDescriptionSeq *&,_tao_elem); } CORBA::OperationDef_ptr (*_TAO_collocation_CORBA_OperationDef_Stub_Factory_function_pointer) ( @@ -19528,47 +17426,31 @@ CORBA::OperationDef_ptr (*_TAO_collocation_CORBA_OperationDef_Stub_Factory_funct ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_OperationDef, + CORBA::_tc_OperationDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::OperationDef::_tao_any_destructor (void *x) +{ + CORBA::OperationDef *tmp = ACE_static_cast(CORBA::OperationDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::OperationDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_OperationDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -19581,24 +17463,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDef_ptr { _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)->_tao_replace ( CORBA::_tc_OperationDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::OperationDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::OperationDef::_nil (); return 0; } @@ -19618,34 +17493,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDef_ptr void operator<<= (CORBA::Any &_tao_any, const CORBA::OperationDescription &_tao_elem) // copying { - CORBA::OperationDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::OperationDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_OperationDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::OperationDescription::_tao_any_destructor (void *x) +{ + CORBA::OperationDescription *tmp = ACE_static_cast(CORBA::OperationDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::OperationDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -19654,16 +17518,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::OperationDescription *_tao_elem) stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::OperationDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDescription *&_tao_elem) @@ -19695,9 +17551,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDescript CORBA::_tc_OperationDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::OperationDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -19711,7 +17566,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDescript { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -19719,53 +17574,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OperationDescript 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; + return _tao_any >>= ACE_const_cast(CORBA::OperationDescription *&,_tao_elem); } void operator<<= ( @@ -19773,40 +17582,25 @@ void operator<<= ( const CORBA::RepositoryIdSeq &_tao_elem ) // copying { - CORBA::RepositoryIdSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::RepositoryIdSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_RepositoryIdSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::RepositoryIdSeq::_tao_any_destructor (void *x) +{ + CORBA::RepositoryIdSeq *tmp = ACE_static_cast(CORBA::RepositoryIdSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::RepositoryIdSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -19815,16 +17609,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::RepositoryIdSeq *_tao_elem) // no stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::RepositoryIdSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::RepositoryIdSeq *&_tao_elem) @@ -19856,9 +17642,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::RepositoryIdSeq * CORBA::_tc_RepositoryIdSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::RepositoryIdSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -19872,7 +17657,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::RepositoryIdSeq * { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -19880,53 +17665,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::RepositoryIdSeq * 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; + return _tao_any >>= ACE_const_cast(CORBA::RepositoryIdSeq *&,_tao_elem); } void operator<<= ( @@ -19934,40 +17673,25 @@ void operator<<= ( const CORBA::OpDescriptionSeq &_tao_elem ) // copying { - CORBA::OpDescriptionSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::OpDescriptionSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_OpDescriptionSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::OpDescriptionSeq::_tao_any_destructor (void *x) +{ + CORBA::OpDescriptionSeq *tmp = ACE_static_cast(CORBA::OpDescriptionSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::OpDescriptionSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -19976,16 +17700,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::OpDescriptionSeq *_tao_elem) // n stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::OpDescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OpDescriptionSeq *&_tao_elem) @@ -20017,9 +17733,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OpDescriptionSeq CORBA::_tc_OpDescriptionSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::OpDescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -20033,7 +17748,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OpDescriptionSeq { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -20041,53 +17756,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OpDescriptionSeq 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; + return _tao_any >>= ACE_const_cast(CORBA::OpDescriptionSeq *&,_tao_elem); } void operator<<= ( @@ -20095,40 +17764,25 @@ void operator<<= ( const CORBA::AttrDescriptionSeq &_tao_elem ) // copying { - CORBA::AttrDescriptionSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::AttrDescriptionSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_AttrDescriptionSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::AttrDescriptionSeq::_tao_any_destructor (void *x) +{ + CORBA::AttrDescriptionSeq *tmp = ACE_static_cast(CORBA::AttrDescriptionSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::AttrDescriptionSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -20137,16 +17791,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::AttrDescriptionSeq *_tao_elem) // stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::AttrDescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttrDescriptionSeq *&_tao_elem) @@ -20178,9 +17824,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttrDescriptionSe CORBA::_tc_AttrDescriptionSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::AttrDescriptionSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -20194,7 +17839,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttrDescriptionSe { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -20202,53 +17847,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::AttrDescriptionSe CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::AttrDescriptionSeq *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::AttrDescriptionSeq *&,_tao_elem); } CORBA::InterfaceDef_ptr (*_TAO_collocation_CORBA_InterfaceDef_Stub_Factory_function_pointer) ( @@ -20256,47 +17855,31 @@ CORBA::InterfaceDef_ptr (*_TAO_collocation_CORBA_InterfaceDef_Stub_Factory_funct ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_InterfaceDef, + CORBA::_tc_InterfaceDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::InterfaceDef::_tao_any_destructor (void *x) +{ + CORBA::InterfaceDef *tmp = ACE_static_cast(CORBA::InterfaceDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::InterfaceDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_InterfaceDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -20309,24 +17892,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef_ptr { _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)->_tao_replace ( CORBA::_tc_InterfaceDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::InterfaceDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::InterfaceDef::_nil (); return 0; } @@ -20346,34 +17922,24 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef_ptr void operator<<= (CORBA::Any &_tao_any, const CORBA::InterfaceDef::FullInterfaceDescription &_tao_elem) // copying { - CORBA::InterfaceDef::FullInterfaceDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::InterfaceDef::FullInterfaceDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::InterfaceDef::_tc_FullInterfaceDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void +CORBA::InterfaceDef::FullInterfaceDescription::_tao_any_destructor (void *x) +{ + CORBA::InterfaceDef::FullInterfaceDescription *tmp = ACE_static_cast(CORBA::InterfaceDef::FullInterfaceDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDef::FullInterfaceDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -20382,16 +17948,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDef::FullInterfaceDescri stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::InterfaceDef::FullInterfaceDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef::FullInterfaceDescription *&_tao_elem) @@ -20423,9 +17981,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef::Ful CORBA::InterfaceDef::_tc_FullInterfaceDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::InterfaceDef::FullInterfaceDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -20439,7 +17996,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef::Ful { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -20447,85 +18004,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDef::Ful 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; + return _tao_any >>= ACE_const_cast(CORBA::InterfaceDef::FullInterfaceDescription *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const CORBA::InterfaceDescription &_tao_elem) // copying { - CORBA::InterfaceDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::InterfaceDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_InterfaceDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::InterfaceDescription::_tao_any_destructor (void *x) +{ + CORBA::InterfaceDescription *tmp = ACE_static_cast(CORBA::InterfaceDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -20534,16 +18034,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::InterfaceDescription *_tao_elem) stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::InterfaceDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDescription *&_tao_elem) @@ -20575,9 +18067,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDescript CORBA::_tc_InterfaceDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::InterfaceDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -20591,7 +18082,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDescript { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -20599,85 +18090,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InterfaceDescript CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::InterfaceDescription *&_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; + return _tao_any >>= ACE_const_cast(CORBA::InterfaceDescription *&,_tao_elem); } 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_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_ValueMember, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::ValueMember::_tao_any_destructor (void *x) +{ + CORBA::ValueMember *tmp = ACE_static_cast(CORBA::ValueMember*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ValueMember *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -20686,16 +18120,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ValueMember *_tao_elem) // non co stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ValueMember::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMember *&_tao_elem) @@ -20727,9 +18153,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMember *&_ta CORBA::_tc_ValueMember, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ValueMember::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -20743,7 +18168,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMember *&_ta { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -20751,53 +18176,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMember *&_ta 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; + return _tao_any >>= ACE_const_cast(CORBA::ValueMember *&,_tao_elem); } void operator<<= ( @@ -20805,40 +18184,25 @@ void operator<<= ( const CORBA::ValueMemberSeq &_tao_elem ) // copying { - CORBA::ValueMemberSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::ValueMemberSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_ValueMemberSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::ValueMemberSeq::_tao_any_destructor (void *x) +{ + CORBA::ValueMemberSeq *tmp = ACE_static_cast(CORBA::ValueMemberSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ValueMemberSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -20847,16 +18211,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ValueMemberSeq *_tao_elem) // non stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ValueMemberSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMemberSeq *&_tao_elem) @@ -20888,9 +18244,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMemberSeq *& CORBA::_tc_ValueMemberSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ValueMemberSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -20904,7 +18259,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMemberSeq *& { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -20912,53 +18267,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMemberSeq *& CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ValueMemberSeq *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::ValueMemberSeq *&,_tao_elem); } CORBA::ValueMemberDef_ptr (*_TAO_collocation_CORBA_ValueMemberDef_Stub_Factory_function_pointer) ( @@ -20966,47 +18275,31 @@ CORBA::ValueMemberDef_ptr (*_TAO_collocation_CORBA_ValueMemberDef_Stub_Factory_f ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_ValueMemberDef, + CORBA::_tc_ValueMemberDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::ValueMemberDef::_tao_any_destructor (void *x) +{ + CORBA::ValueMemberDef *tmp = ACE_static_cast(CORBA::ValueMemberDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMemberDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::ValueMemberDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_ValueMemberDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -21019,24 +18312,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueMemberDef_pt { _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)->_tao_replace ( CORBA::_tc_ValueMemberDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::ValueMemberDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::ValueMemberDef::_nil (); return 0; } @@ -21059,47 +18345,31 @@ CORBA::ValueDef_ptr (*_TAO_collocation_CORBA_ValueDef_Stub_Factory_function_poin ) = 0; void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDef_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::ValueDef::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_ValueDef, + CORBA::_tc_ValueDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::ValueDef::_tao_any_destructor (void *x) +{ + CORBA::ValueDef *tmp = ACE_static_cast(CORBA::ValueDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::ValueDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_ValueDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -21112,24 +18382,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef_ptr &_ta { _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)->_tao_replace ( CORBA::_tc_ValueDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::ValueDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::ValueDef::_nil (); return 0; } @@ -21149,34 +18412,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef_ptr &_ta void operator<<= (CORBA::Any &_tao_any, const CORBA::ValueDef::FullValueDescription &_tao_elem) // copying { - CORBA::ValueDef::FullValueDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::ValueDef::FullValueDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::ValueDef::_tc_FullValueDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::ValueDef::FullValueDescription::_tao_any_destructor (void *x) +{ + CORBA::ValueDef::FullValueDescription *tmp = ACE_static_cast(CORBA::ValueDef::FullValueDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDef::FullValueDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -21185,16 +18437,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDef::FullValueDescription *_ stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ValueDef::FullValueDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef::FullValueDescription *&_tao_elem) @@ -21226,9 +18470,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef::FullVal CORBA::ValueDef::_tc_FullValueDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ValueDef::FullValueDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -21242,7 +18485,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef::FullVal { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -21250,85 +18493,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDef::FullVal 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; + return _tao_any >>= ACE_const_cast(CORBA::ValueDef::FullValueDescription *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const CORBA::ValueDescription &_tao_elem) // copying { - CORBA::ValueDescription *_any_val = 0; - ACE_NEW (_any_val, CORBA::ValueDescription (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_ValueDescription, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void CORBA::ValueDescription::_tao_any_destructor (void *x) +{ + CORBA::ValueDescription *tmp = ACE_static_cast(CORBA::ValueDescription*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDescription *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -21337,16 +18523,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::ValueDescription *_tao_elem) // n stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::ValueDescription::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDescription *&_tao_elem) @@ -21378,9 +18556,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDescription CORBA::_tc_ValueDescription, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::ValueDescription::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -21394,7 +18571,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDescription { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -21402,53 +18579,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueDescription CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::ValueDescription *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::ValueDescription *&,_tao_elem); } CORBA::ValueBoxDef_ptr (*_TAO_collocation_CORBA_ValueBoxDef_Stub_Factory_function_pointer) ( @@ -21456,47 +18587,31 @@ CORBA::ValueBoxDef_ptr (*_TAO_collocation_CORBA_ValueBoxDef_Stub_Factory_functio ) = 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) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_ValueBoxDef, + CORBA::_tc_ValueBoxDef, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void CORBA::ValueBoxDef::_tao_any_destructor (void *x) +{ + CORBA::ValueBoxDef *tmp = ACE_static_cast(CORBA::ValueBoxDef*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueBoxDef_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::ValueBoxDef::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_ValueBoxDef, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -21509,24 +18624,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ValueBoxDef_ptr & { _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)->_tao_replace ( CORBA::_tc_ValueBoxDef, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::ValueBoxDef::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::ValueBoxDef::_nil (); return 0; } diff --git a/TAO/tao/InterfaceC.h b/TAO/tao/InterfaceC.h index 55a6523eb8b..a7fd00d3de9 100644 --- a/TAO/tao/InterfaceC.h +++ b/TAO/tao/InterfaceC.h @@ -121,6 +121,7 @@ class TAO_Export CORBA_IRObject : public virtual ACE_CORBA_1 (Object) { return (CORBA::IRObject_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::DefinitionKind def_kind ( CORBA::Environment &ACE_TRY_ENV = @@ -410,6 +411,7 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject { return (CORBA::Contained_ptr)0; } + static void _tao_any_destructor (void*); virtual char * id ( CORBA::Environment &ACE_TRY_ENV = @@ -488,6 +490,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject struct Description { + static void _tao_any_destructor (void*); + CORBA::DefinitionKind kind; CORBA::Any value; }; @@ -1203,6 +1207,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject ); CORBA_InterfaceDefSeq (const CORBA_InterfaceDefSeq &); // copy ctor ~CORBA_InterfaceDefSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -1396,6 +1402,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject ); CORBA_ValueDefSeq (const CORBA_ValueDefSeq &); // copy ctor ~CORBA_ValueDefSeq (void); // dtor + + static void _tao_any_destructor (void *x); }; #endif /* end #if !defined */ @@ -1589,6 +1597,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject ); CORBA_ContainedSeq (const CORBA_ContainedSeq &); // copy ctor ~CORBA_ContainedSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -1660,6 +1670,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject struct CORBA_StructMember { + static void _tao_any_destructor (void*); + TAO_String_Manager name; CORBA::TypeCode_var type; TAO_Object_Field_T<CORBA_IDLType,CORBA_IDLType_var> type_def; @@ -1777,6 +1789,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject ); CORBA_StructMemberSeq (const CORBA_StructMemberSeq &); // copy ctor ~CORBA_StructMemberSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -1848,6 +1862,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject struct CORBA_Initializer { + static void _tao_any_destructor (void*); + CORBA_StructMemberSeq members; }; @@ -1964,6 +1980,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject ); CORBA_InitializerSeq (const CORBA_InitializerSeq &); // copy ctor ~CORBA_InitializerSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -2035,6 +2053,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject struct CORBA_UnionMember { + static void _tao_any_destructor (void*); + TAO_String_Manager name; CORBA::Any label; CORBA::TypeCode_var type; @@ -2154,6 +2174,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject ); CORBA_UnionMemberSeq (const CORBA_UnionMemberSeq &); // copy ctor ~CORBA_UnionMemberSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -2249,6 +2271,8 @@ class TAO_Export CORBA_Contained: public virtual CORBA_IRObject ); CORBA_EnumMemberSeq (const CORBA_EnumMemberSeq &); // copy ctor ~CORBA_EnumMemberSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -2401,6 +2425,7 @@ class TAO_Export CORBA_Container: public virtual CORBA_IRObject { return (CORBA::Container_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA_Contained_ptr lookup ( const char * search_name, @@ -2435,6 +2460,8 @@ class TAO_Export CORBA_Container: public virtual CORBA_IRObject struct Description { + static void _tao_any_destructor (void*); + TAO_Object_Field_T<CORBA_Contained,CORBA_Contained_var> contained_object; CORBA::DefinitionKind kind; CORBA::Any value; @@ -2555,6 +2582,8 @@ class TAO_Export CORBA_Container: public virtual CORBA_IRObject ); DescriptionSeq (const DescriptionSeq &); // copy ctor ~DescriptionSeq (void); // dtor + + static void _tao_any_destructor (void*); }; typedef DescriptionSeq *DescriptionSeq_ptr; @@ -2871,6 +2900,7 @@ class TAO_Export CORBA_IDLType: public virtual CORBA_IRObject { return (CORBA::IDLType_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = @@ -3316,6 +3346,7 @@ class TAO_Export CORBA_Repository: public virtual CORBA_Container { return (CORBA::Repository_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA_Contained_ptr lookup_id ( const char * search_id, @@ -3488,6 +3519,7 @@ class TAO_Export CORBA_ModuleDef: public virtual CORBA_Container, public virtual { return (CORBA::ModuleDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, @@ -3513,6 +3545,8 @@ class TAO_Export CORBA_ModuleDef: public virtual CORBA_Container, public virtual struct CORBA_ModuleDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -3649,6 +3683,7 @@ class TAO_Export CORBA_ConstantDef: public virtual CORBA_Contained { return (CORBA::ConstantDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = @@ -3716,6 +3751,8 @@ class TAO_Export CORBA_ConstantDef: public virtual CORBA_Contained struct CORBA_ConstantDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -3852,6 +3889,7 @@ class TAO_Export CORBA_TypedefDef: public virtual CORBA_Contained, public virtua { return (CORBA::TypedefDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, @@ -3877,6 +3915,8 @@ class TAO_Export CORBA_TypedefDef: public virtual CORBA_Contained, public virtua struct CORBA_TypeDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -4012,6 +4052,7 @@ class TAO_Export CORBA_StructDef: public virtual CORBA_TypedefDef, public virtua { return (CORBA::StructDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA_StructMemberSeq * members ( CORBA::Environment &ACE_TRY_ENV = @@ -4136,6 +4177,7 @@ class TAO_Export CORBA_UnionDef: public virtual CORBA_TypedefDef, public virtual { return (CORBA::UnionDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::TypeCode_ptr discriminator_type ( CORBA::Environment &ACE_TRY_ENV = @@ -4284,6 +4326,7 @@ class TAO_Export CORBA_EnumDef: public virtual CORBA_TypedefDef { return (CORBA::EnumDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA_EnumMemberSeq * members ( CORBA::Environment &ACE_TRY_ENV = @@ -4407,6 +4450,7 @@ class TAO_Export CORBA_AliasDef: public virtual CORBA_TypedefDef { return (CORBA::AliasDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA_IDLType_ptr original_type_def ( CORBA::Environment &ACE_TRY_ENV = @@ -4530,6 +4574,7 @@ class TAO_Export CORBA_PrimitiveDef: public virtual CORBA_IDLType { return (CORBA::PrimitiveDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::PrimitiveKind kind ( CORBA::Environment &ACE_TRY_ENV = @@ -4645,6 +4690,7 @@ class TAO_Export CORBA_StringDef: public virtual CORBA_IDLType { return (CORBA::StringDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::ULong bound ( CORBA::Environment &ACE_TRY_ENV = @@ -4768,6 +4814,7 @@ class TAO_Export CORBA_WstringDef: public virtual CORBA_IDLType { return (CORBA::WstringDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::ULong bound ( CORBA::Environment &ACE_TRY_ENV = @@ -4892,6 +4939,7 @@ class TAO_Export CORBA_FixedDef: public virtual CORBA_IDLType { return (CORBA::FixedDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::UShort digits ( CORBA::Environment &ACE_TRY_ENV = @@ -5032,6 +5080,7 @@ class TAO_Export CORBA_SequenceDef: public virtual CORBA_IDLType { return (CORBA::SequenceDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::ULong bound ( CORBA::Environment &ACE_TRY_ENV = @@ -5181,6 +5230,7 @@ class TAO_Export CORBA_ArrayDef: public virtual CORBA_IDLType { return (CORBA::ArrayDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::ULong length ( CORBA::Environment &ACE_TRY_ENV = @@ -5329,6 +5379,7 @@ class TAO_Export CORBA_ExceptionDef: public virtual CORBA_Contained, public virt { return (CORBA::ExceptionDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = @@ -5379,6 +5430,8 @@ class TAO_Export CORBA_ExceptionDef: public virtual CORBA_Contained, public virt struct CORBA_ExceptionDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -5515,6 +5568,7 @@ class TAO_Export CORBA_AttributeDef: public virtual CORBA_Contained { return (CORBA::AttributeDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = @@ -5582,6 +5636,8 @@ class TAO_Export CORBA_AttributeDef: public virtual CORBA_Contained struct CORBA_AttributeDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -5637,6 +5693,8 @@ class TAO_Export CORBA_AttributeDef: public virtual CORBA_Contained struct CORBA_ParameterDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; CORBA::TypeCode_var type; TAO_Object_Field_T<CORBA_IDLType,CORBA_IDLType_var> type_def; @@ -5756,6 +5814,8 @@ class TAO_Export CORBA_AttributeDef: public virtual CORBA_Contained ); CORBA_ParDescriptionSeq (const CORBA_ParDescriptionSeq &); // copy ctor ~CORBA_ParDescriptionSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -5850,6 +5910,8 @@ class TAO_Export CORBA_AttributeDef: public virtual CORBA_Contained ); CORBA_ContextIdSeq (const CORBA_ContextIdSeq &); // copy ctor ~CORBA_ContextIdSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -5988,6 +6050,8 @@ class TAO_Export CORBA_AttributeDef: public virtual CORBA_Contained ); CORBA_ExceptionDefSeq (const CORBA_ExceptionDefSeq &); // copy ctor ~CORBA_ExceptionDefSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -6125,6 +6189,8 @@ class TAO_Export CORBA_AttributeDef: public virtual CORBA_Contained ); CORBA_ExcDescriptionSeq (const CORBA_ExcDescriptionSeq &); // copy ctor ~CORBA_ExcDescriptionSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -6277,6 +6343,7 @@ class TAO_Export CORBA_OperationDef: public virtual CORBA_Contained { return (CORBA::OperationDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::TypeCode_ptr result ( CORBA::Environment &ACE_TRY_ENV = @@ -6395,6 +6462,8 @@ class TAO_Export CORBA_OperationDef: public virtual CORBA_Contained struct CORBA_OperationDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -6477,6 +6546,8 @@ class TAO_Export CORBA_OperationDef: public virtual CORBA_Contained ); CORBA_RepositoryIdSeq (const CORBA_RepositoryIdSeq &); // copy ctor ~CORBA_RepositoryIdSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -6614,6 +6685,8 @@ class TAO_Export CORBA_OperationDef: public virtual CORBA_Contained ); CORBA_OpDescriptionSeq (const CORBA_OpDescriptionSeq &); // copy ctor ~CORBA_OpDescriptionSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -6751,6 +6824,8 @@ class TAO_Export CORBA_OperationDef: public virtual CORBA_Contained ); CORBA_AttrDescriptionSeq (const CORBA_AttrDescriptionSeq &); // copy ctor ~CORBA_AttrDescriptionSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -6904,6 +6979,7 @@ class TAO_Export CORBA_InterfaceDef: public virtual CORBA_Container, public virt { return (CORBA::InterfaceDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA_InterfaceDefSeq * base_interfaces ( CORBA::Environment &ACE_TRY_ENV = @@ -6933,6 +7009,8 @@ class TAO_Export CORBA_InterfaceDef: public virtual CORBA_Container, public virt struct FullInterfaceDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -7052,6 +7130,8 @@ class TAO_Export CORBA_InterfaceDef: public virtual CORBA_Container, public virt struct CORBA_InterfaceDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -7107,6 +7187,8 @@ class TAO_Export CORBA_InterfaceDef: public virtual CORBA_Container, public virt struct CORBA_ValueMember { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; TAO_String_Manager defined_in; @@ -7230,6 +7312,8 @@ class TAO_Export CORBA_InterfaceDef: public virtual CORBA_Container, public virt ); CORBA_ValueMemberSeq (const CORBA_ValueMemberSeq &); // copy ctor ~CORBA_ValueMemberSeq (void); // dtor + + static void _tao_any_destructor (void*); }; #endif /* end #if !defined */ @@ -7382,6 +7466,7 @@ class TAO_Export CORBA_ValueMemberDef: public virtual CORBA_Contained { return (CORBA::ValueMemberDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA::TypeCode_ptr type ( CORBA::Environment &ACE_TRY_ENV = @@ -7531,6 +7616,7 @@ class TAO_Export CORBA_ValueDef: public virtual CORBA_Container, public virtual { return (CORBA::ValueDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA_InterfaceDef_ptr supported_interface ( CORBA::Environment &ACE_TRY_ENV = @@ -7662,6 +7748,8 @@ class TAO_Export CORBA_ValueDef: public virtual CORBA_Container, public virtual struct FullValueDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; CORBA::Boolean is_abstract; @@ -7800,6 +7888,8 @@ class TAO_Export CORBA_ValueDef: public virtual CORBA_Container, public virtual struct CORBA_ValueDescription { + static void _tao_any_destructor (void*); + TAO_String_Manager name; TAO_String_Manager id; CORBA::Boolean is_abstract; @@ -7941,6 +8031,7 @@ class TAO_Export CORBA_ValueBoxDef: public virtual CORBA_IDLType { return (CORBA::ValueBoxDef_ptr)0; } + static void _tao_any_destructor (void*); virtual CORBA_IDLType_ptr original_type_def ( CORBA::Environment &ACE_TRY_ENV = @@ -7993,472 +8084,472 @@ 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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::Contained_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Contained *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::Contained::Description &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::Contained::Description*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Contained::Description *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::Contained::Description *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::InterfaceDefSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::InterfaceDefSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InterfaceDefSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::InterfaceDefSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueDefSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueDefSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueDefSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ValueDefSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ContainedSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ContainedSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ContainedSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ContainedSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::StructMember &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::StructMember*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::StructMember *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::StructMember *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::StructMemberSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::StructMemberSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::StructMemberSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::StructMemberSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::Initializer &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::Initializer*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Initializer *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::Initializer *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::InitializerSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::InitializerSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InitializerSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::InitializerSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::UnionMember &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::UnionMember*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::UnionMember *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::UnionMember *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::UnionMemberSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::UnionMemberSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::UnionMemberSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::UnionMemberSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::EnumMemberSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::EnumMemberSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::EnumMemberSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::Container_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Container *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::Container::Description &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::Container::Description*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Container::Description *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::Container::Description *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::Container::DescriptionSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::Container::DescriptionSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::Container::DescriptionSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::IDLType_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::IDLType *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::PrimitiveKind); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::Repository_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ModuleDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ModuleDef *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ModuleDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ModuleDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ModuleDescription *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ConstantDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ConstantDef *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ConstantDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ConstantDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ConstantDescription *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::TypedefDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::TypedefDef *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::TypeDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::TypeDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::TypeDescription *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::StructDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::EnumDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::AliasDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::PrimitiveDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::StringDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::WstringDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::FixedDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::SequenceDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ArrayDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ExceptionDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ExceptionDef *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ExceptionDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ExceptionDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ExceptionDescription *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ExceptionDescription *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::AttributeMode); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::AttributeDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::AttributeDef *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::AttributeDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::AttributeDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::AttributeDescription *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::AttributeDescription *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::OperationMode); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OperationMode &); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ParameterMode); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ParameterMode &); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ParameterDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ParameterDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ParameterDescription *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ParameterDescription *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ParDescriptionSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ParDescriptionSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ParDescriptionSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ParDescriptionSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ContextIdSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ContextIdSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ContextIdSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ContextIdSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ExceptionDefSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ExceptionDefSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ExceptionDefSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ExceptionDefSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ExcDescriptionSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ExcDescriptionSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ExcDescriptionSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::OperationDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OperationDef *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::OperationDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::OperationDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OperationDescription *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::OperationDescription *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::RepositoryIdSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::RepositoryIdSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::RepositoryIdSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::RepositoryIdSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::OpDescriptionSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::OpDescriptionSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OpDescriptionSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::OpDescriptionSeq *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::AttrDescriptionSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::AttrDescriptionSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::AttrDescriptionSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::InterfaceDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InterfaceDef *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::InterfaceDef::FullInterfaceDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::InterfaceDef::FullInterfaceDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InterfaceDef::FullInterfaceDescription *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::InterfaceDef::FullInterfaceDescription *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::InterfaceDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::InterfaceDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::InterfaceDescription *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::InterfaceDescription *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueMember &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueMember*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueMember *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ValueMember *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueMemberSeq &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueMemberSeq*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueMemberSeq *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueMemberDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueDef *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueDef::FullValueDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueDef::FullValueDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueDef::FullValueDescription *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::ValueDef::FullValueDescription *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA::ValueDescription &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueDescription*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueDescription *&); // deprecated -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +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 &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::ValueBoxDef_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::ValueBoxDef *&); #ifndef __ACE_INLINE__ diff --git a/TAO/tao/MessagingC.cpp b/TAO/tao/MessagingC.cpp index 4528f4238c8..ddc1e33d3ed 100644 --- a/TAO/tao/MessagingC.cpp +++ b/TAO/tao/MessagingC.cpp @@ -2075,47 +2075,31 @@ TAO_NAMESPACE_END void operator<<= (CORBA::Any &_tao_any, Messaging::RebindPolicy_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 = Messaging::RebindPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_RebindPolicy, + Messaging::_tc_RebindPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::RebindPolicy::_tao_any_destructor (void *x) +{ + Messaging::RebindPolicy *tmp = ACE_static_cast(Messaging::RebindPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RebindPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::RebindPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_RebindPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2128,24 +2112,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RebindPolicy_ { _tao_elem = Messaging::RebindPolicy::_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)->_tao_replace ( Messaging::_tc_RebindPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::RebindPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::RebindPolicy::_nil (); return 0; } @@ -2156,47 +2133,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RebindPolicy_ void operator<<= (CORBA::Any &_tao_any, Messaging::SyncScopePolicy_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 = Messaging::SyncScopePolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_SyncScopePolicy, + Messaging::_tc_SyncScopePolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::SyncScopePolicy::_tao_any_destructor (void *x) +{ + Messaging::SyncScopePolicy *tmp = ACE_static_cast(Messaging::SyncScopePolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::SyncScopePolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::SyncScopePolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_SyncScopePolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2209,24 +2170,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::SyncScopePoli { _tao_elem = Messaging::SyncScopePolicy::_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)->_tao_replace ( Messaging::_tc_SyncScopePolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::SyncScopePolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::SyncScopePolicy::_nil (); return 0; } @@ -2237,34 +2191,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::SyncScopePoli void operator<<= (CORBA::Any &_tao_any, const Messaging::PriorityRange &_tao_elem) // copying { - Messaging::PriorityRange *_any_val = 0; - ACE_NEW (_any_val, Messaging::PriorityRange (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( Messaging::_tc_PriorityRange, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void Messaging::PriorityRange::_tao_any_destructor (void *x) +{ + Messaging::PriorityRange *tmp = ACE_static_cast(Messaging::PriorityRange*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, Messaging::PriorityRange *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -2273,16 +2216,8 @@ void operator<<= (CORBA::Any &_tao_any, Messaging::PriorityRange *_tao_elem) // stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + Messaging::PriorityRange::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PriorityRange *&_tao_elem) @@ -2314,9 +2249,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PriorityRange Messaging::_tc_PriorityRange, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + Messaging::PriorityRange::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -2330,7 +2264,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PriorityRange { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -2338,98 +2272,36 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PriorityRange CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::PriorityRange *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (Messaging::_tc_PriorityRange, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (Messaging::PriorityRange *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, Messaging::PriorityRange, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(Messaging::PriorityRange *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - Messaging::_tc_PriorityRange, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (Messaging::PriorityRange *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (Messaging::PriorityRange *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (Messaging::PriorityRange *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(Messaging::PriorityRange *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, Messaging::RequestPriorityPolicy_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 = Messaging::RequestPriorityPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_RequestPriorityPolicy, + Messaging::_tc_RequestPriorityPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::RequestPriorityPolicy::_tao_any_destructor (void *x) +{ + Messaging::RequestPriorityPolicy *tmp = ACE_static_cast(Messaging::RequestPriorityPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestPriorityPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::RequestPriorityPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_RequestPriorityPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2442,24 +2314,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestPriori { _tao_elem = Messaging::RequestPriorityPolicy::_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)->_tao_replace ( Messaging::_tc_RequestPriorityPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::RequestPriorityPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::RequestPriorityPolicy::_nil (); return 0; } @@ -2470,47 +2335,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestPriori void operator<<= (CORBA::Any &_tao_any, Messaging::ReplyPriorityPolicy_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 = Messaging::ReplyPriorityPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_ReplyPriorityPolicy, + Messaging::_tc_ReplyPriorityPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::ReplyPriorityPolicy::_tao_any_destructor (void *x) +{ + Messaging::ReplyPriorityPolicy *tmp = ACE_static_cast(Messaging::ReplyPriorityPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyPriorityPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::ReplyPriorityPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_ReplyPriorityPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2523,24 +2372,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyPriority { _tao_elem = Messaging::ReplyPriorityPolicy::_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)->_tao_replace ( Messaging::_tc_ReplyPriorityPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::ReplyPriorityPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::ReplyPriorityPolicy::_nil (); return 0; } @@ -2551,47 +2393,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyPriority void operator<<= (CORBA::Any &_tao_any, Messaging::RequestStartTimePolicy_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 = Messaging::RequestStartTimePolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_RequestStartTimePolicy, + Messaging::_tc_RequestStartTimePolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::RequestStartTimePolicy::_tao_any_destructor (void *x) +{ + Messaging::RequestStartTimePolicy *tmp = ACE_static_cast(Messaging::RequestStartTimePolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestStartTimePolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::RequestStartTimePolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_RequestStartTimePolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2604,24 +2430,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestStartT { _tao_elem = Messaging::RequestStartTimePolicy::_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)->_tao_replace ( Messaging::_tc_RequestStartTimePolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::RequestStartTimePolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::RequestStartTimePolicy::_nil (); return 0; } @@ -2632,47 +2451,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestStartT void operator<<= (CORBA::Any &_tao_any, Messaging::RequestEndTimePolicy_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 = Messaging::RequestEndTimePolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_RequestEndTimePolicy, + Messaging::_tc_RequestEndTimePolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::RequestEndTimePolicy::_tao_any_destructor (void *x) +{ + Messaging::RequestEndTimePolicy *tmp = ACE_static_cast(Messaging::RequestEndTimePolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestEndTimePolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::RequestEndTimePolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_RequestEndTimePolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2685,24 +2488,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestEndTim { _tao_elem = Messaging::RequestEndTimePolicy::_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)->_tao_replace ( Messaging::_tc_RequestEndTimePolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::RequestEndTimePolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::RequestEndTimePolicy::_nil (); return 0; } @@ -2713,47 +2509,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RequestEndTim void operator<<= (CORBA::Any &_tao_any, Messaging::ReplyStartTimePolicy_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 = Messaging::ReplyStartTimePolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_ReplyStartTimePolicy, + Messaging::_tc_ReplyStartTimePolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::ReplyStartTimePolicy::_tao_any_destructor (void *x) +{ + Messaging::ReplyStartTimePolicy *tmp = ACE_static_cast(Messaging::ReplyStartTimePolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyStartTimePolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::ReplyStartTimePolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_ReplyStartTimePolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2766,24 +2546,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyStartTim { _tao_elem = Messaging::ReplyStartTimePolicy::_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)->_tao_replace ( Messaging::_tc_ReplyStartTimePolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::ReplyStartTimePolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::ReplyStartTimePolicy::_nil (); return 0; } @@ -2794,47 +2567,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyStartTim void operator<<= (CORBA::Any &_tao_any, Messaging::ReplyEndTimePolicy_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 = Messaging::ReplyEndTimePolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_ReplyEndTimePolicy, + Messaging::_tc_ReplyEndTimePolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::ReplyEndTimePolicy::_tao_any_destructor (void *x) +{ + Messaging::ReplyEndTimePolicy *tmp = ACE_static_cast(Messaging::ReplyEndTimePolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyEndTimePolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::ReplyEndTimePolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_ReplyEndTimePolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2847,24 +2604,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyEndTimeP { _tao_elem = Messaging::ReplyEndTimePolicy::_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)->_tao_replace ( Messaging::_tc_ReplyEndTimePolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::ReplyEndTimePolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::ReplyEndTimePolicy::_nil (); return 0; } @@ -2875,47 +2625,32 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyEndTimeP void operator<<= (CORBA::Any &_tao_any, Messaging::RelativeRequestTimeoutPolicy_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 = Messaging::RelativeRequestTimeoutPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_RelativeRequestTimeoutPolicy, + Messaging::_tc_RelativeRequestTimeoutPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::RelativeRequestTimeoutPolicy::_tao_any_destructor +(void *x) +{ + Messaging::RelativeRequestTimeoutPolicy *tmp = ACE_static_cast(Messaging::RelativeRequestTimeoutPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RelativeRequestTimeoutPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::RelativeRequestTimeoutPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_RelativeRequestTimeoutPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -2928,24 +2663,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RelativeReque { _tao_elem = Messaging::RelativeRequestTimeoutPolicy::_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)->_tao_replace ( Messaging::_tc_RelativeRequestTimeoutPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::RelativeRequestTimeoutPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::RelativeRequestTimeoutPolicy::_nil (); return 0; } @@ -2956,47 +2684,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RelativeReque void operator<<= (CORBA::Any &_tao_any, Messaging::RelativeRoundtripTimeoutPolicy_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 = Messaging::RelativeRoundtripTimeoutPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_RelativeRoundtripTimeoutPolicy, + Messaging::_tc_RelativeRoundtripTimeoutPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::RelativeRoundtripTimeoutPolicy::_tao_any_destructor (void *x) +{ + Messaging::RelativeRoundtripTimeoutPolicy *tmp = ACE_static_cast(Messaging::RelativeRoundtripTimeoutPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RelativeRoundtripTimeoutPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::RelativeRoundtripTimeoutPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_RelativeRoundtripTimeoutPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3009,24 +2721,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RelativeRound { _tao_elem = Messaging::RelativeRoundtripTimeoutPolicy::_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)->_tao_replace ( Messaging::_tc_RelativeRoundtripTimeoutPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::RelativeRoundtripTimeoutPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::RelativeRoundtripTimeoutPolicy::_nil (); return 0; } @@ -3039,34 +2744,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RelativeRound void operator<<= (CORBA::Any &_tao_any, const Messaging::RoutingTypeRange &_tao_elem) // copying { - Messaging::RoutingTypeRange *_any_val = 0; - ACE_NEW (_any_val, Messaging::RoutingTypeRange (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( Messaging::_tc_RoutingTypeRange, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void Messaging::RoutingTypeRange::_tao_any_destructor (void *x) +{ + Messaging::RoutingTypeRange *tmp = ACE_static_cast(Messaging::RoutingTypeRange*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, Messaging::RoutingTypeRange *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -3075,16 +2769,8 @@ void operator<<= (CORBA::Any &_tao_any, Messaging::RoutingTypeRange *_tao_elem) stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + Messaging::RoutingTypeRange::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RoutingTypeRange *&_tao_elem) @@ -3116,9 +2802,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RoutingTypeRa Messaging::_tc_RoutingTypeRange, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + Messaging::RoutingTypeRange::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3132,7 +2817,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RoutingTypeRa { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3140,100 +2825,38 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RoutingTypeRa CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::RoutingTypeRange *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (Messaging::_tc_RoutingTypeRange, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (Messaging::RoutingTypeRange *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, Messaging::RoutingTypeRange, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(Messaging::RoutingTypeRange *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - Messaging::_tc_RoutingTypeRange, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (Messaging::RoutingTypeRange *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (Messaging::RoutingTypeRange *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (Messaging::RoutingTypeRange *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(Messaging::RoutingTypeRange *&,_tao_elem); } // **************************************************************** void operator<<= (CORBA::Any &_tao_any, Messaging::RoutingPolicy_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 = Messaging::RoutingPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_RoutingPolicy, + Messaging::_tc_RoutingPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::RoutingPolicy::_tao_any_destructor (void *x) +{ + Messaging::RoutingPolicy *tmp = ACE_static_cast(Messaging::RoutingPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RoutingPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::RoutingPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_RoutingPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3246,24 +2869,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RoutingPolicy { _tao_elem = Messaging::RoutingPolicy::_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)->_tao_replace ( Messaging::_tc_RoutingPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::RoutingPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::RoutingPolicy::_nil (); return 0; } @@ -3274,47 +2890,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RoutingPolicy void operator<<= (CORBA::Any &_tao_any, Messaging::MaxHopsPolicy_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 = Messaging::MaxHopsPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_MaxHopsPolicy, + Messaging::_tc_MaxHopsPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::MaxHopsPolicy::_tao_any_destructor (void *x) +{ + Messaging::MaxHopsPolicy *tmp = ACE_static_cast(Messaging::MaxHopsPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::MaxHopsPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::MaxHopsPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_MaxHopsPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3327,24 +2927,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::MaxHopsPolicy { _tao_elem = Messaging::MaxHopsPolicy::_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)->_tao_replace ( Messaging::_tc_MaxHopsPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::MaxHopsPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::MaxHopsPolicy::_nil (); return 0; } @@ -3355,47 +2948,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::MaxHopsPolicy void operator<<= (CORBA::Any &_tao_any, Messaging::QueueOrderPolicy_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 = Messaging::QueueOrderPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_QueueOrderPolicy, + Messaging::_tc_QueueOrderPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::QueueOrderPolicy::_tao_any_destructor (void *x) +{ + Messaging::QueueOrderPolicy *tmp = ACE_static_cast(Messaging::QueueOrderPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::QueueOrderPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::QueueOrderPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_QueueOrderPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3408,24 +2985,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::QueueOrderPol { _tao_elem = Messaging::QueueOrderPolicy::_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)->_tao_replace ( Messaging::_tc_QueueOrderPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::QueueOrderPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::QueueOrderPolicy::_nil (); return 0; } @@ -3436,34 +3006,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::QueueOrderPol void operator<<= (CORBA::Any &_tao_any, const Messaging::PolicyValue &_tao_elem) // copying { - Messaging::PolicyValue *_any_val = 0; - ACE_NEW (_any_val, Messaging::PolicyValue (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( Messaging::_tc_PolicyValue, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void Messaging::PolicyValue::_tao_any_destructor (void *x) +{ + Messaging::PolicyValue *tmp = ACE_static_cast(Messaging::PolicyValue*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, Messaging::PolicyValue *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -3472,16 +3031,8 @@ void operator<<= (CORBA::Any &_tao_any, Messaging::PolicyValue *_tao_elem) // no stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + Messaging::PolicyValue::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValue *&_tao_elem) @@ -3513,9 +3064,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValue * Messaging::_tc_PolicyValue, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + Messaging::PolicyValue::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3529,7 +3079,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValue * { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3537,53 +3087,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValue * CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::PolicyValue *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (Messaging::_tc_PolicyValue, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (Messaging::PolicyValue *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, Messaging::PolicyValue, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(Messaging::PolicyValue *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - Messaging::_tc_PolicyValue, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (Messaging::PolicyValue *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (Messaging::PolicyValue *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (Messaging::PolicyValue *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(Messaging::PolicyValue *&,_tao_elem); } // **************************************************************** @@ -3593,40 +3097,25 @@ void operator<<= ( const Messaging::PolicyValueSeq &_tao_elem ) // copying { - Messaging::PolicyValueSeq *_tao_any_val; - ACE_NEW (_tao_any_val, Messaging::PolicyValueSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( Messaging::_tc_PolicyValueSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void Messaging::PolicyValueSeq::_tao_any_destructor (void *x) +{ + Messaging::PolicyValueSeq *tmp = ACE_static_cast(Messaging::PolicyValueSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, Messaging::PolicyValueSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -3635,16 +3124,8 @@ void operator<<= (CORBA::Any &_tao_any, Messaging::PolicyValueSeq *_tao_elem) // stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + Messaging::PolicyValueSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValueSeq *&_tao_elem) @@ -3676,9 +3157,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValueSe Messaging::_tc_PolicyValueSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + Messaging::PolicyValueSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3692,7 +3172,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValueSe { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -3700,53 +3180,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValueSe CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::PolicyValueSeq *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (Messaging::_tc_PolicyValueSeq, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (Messaging::PolicyValueSeq *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, Messaging::PolicyValueSeq, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(Messaging::PolicyValueSeq *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - Messaging::_tc_PolicyValueSeq, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (Messaging::PolicyValueSeq *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (Messaging::PolicyValueSeq *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (Messaging::PolicyValueSeq *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(Messaging::PolicyValueSeq *&,_tao_elem); } // **************************************************************** @@ -3759,47 +3193,31 @@ Messaging::ReplyHandler_ptr (*_TAO_collocation_Messaging_ReplyHandler_Stub_Facto void operator<<= (CORBA::Any &_tao_any, Messaging::ReplyHandler_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 = Messaging::ReplyHandler::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_ReplyHandler, + Messaging::_tc_ReplyHandler, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::ReplyHandler::_tao_any_destructor (void *x) +{ + Messaging::ReplyHandler *tmp = ACE_static_cast(Messaging::ReplyHandler*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyHandler_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::ReplyHandler::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_ReplyHandler, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3812,24 +3230,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyHandler_ { _tao_elem = Messaging::ReplyHandler::_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)->_tao_replace ( Messaging::_tc_ReplyHandler, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::ReplyHandler::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::ReplyHandler::_nil (); return 0; } @@ -3846,47 +3257,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyHandler_ void operator<<= (CORBA::Any &_tao_any, Messaging::Poller_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 = Messaging::Poller::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - Messaging::_tc_Poller, + Messaging::_tc_Poller, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void Messaging::Poller::_tao_any_destructor (void *x) +{ + Messaging::Poller *tmp = ACE_static_cast(Messaging::Poller*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::Poller_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = Messaging::Poller::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (Messaging::_tc_Poller, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3899,24 +3294,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::Poller_ptr &_ { _tao_elem = Messaging::Poller::_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)->_tao_replace ( Messaging::_tc_Poller, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + Messaging::Poller::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = Messaging::Poller::_nil (); return 0; } diff --git a/TAO/tao/MessagingC.h b/TAO/tao/MessagingC.h index 17da530eed0..95c85be51c3 100644 --- a/TAO/tao/MessagingC.h +++ b/TAO/tao/MessagingC.h @@ -188,6 +188,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static RebindPolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual RebindMode rebind_mode ( CORBA::Environment &ACE_TRY_ENV = @@ -281,6 +282,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static SyncScopePolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual SyncScope synchronization ( CORBA::Environment &ACE_TRY_ENV = @@ -310,6 +312,8 @@ TAO_NAMESPACE Messaging struct TAO_Export PriorityRange { + static void _tao_any_destructor (void *); + Priority min; Priority max; }; @@ -411,6 +415,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static RequestPriorityPolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual PriorityRange priority_range ( CORBA::Environment &ACE_TRY_ENV = @@ -504,6 +509,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static ReplyPriorityPolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual PriorityRange priority_range ( CORBA::Environment &ACE_TRY_ENV = @@ -597,6 +603,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static RequestStartTimePolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual TimeBase::UtcT start_time ( CORBA::Environment &ACE_TRY_ENV = @@ -690,6 +697,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static RequestEndTimePolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual TimeBase::UtcT end_time ( CORBA::Environment &ACE_TRY_ENV = @@ -783,6 +791,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static ReplyStartTimePolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual TimeBase::UtcT start_time ( CORBA::Environment &ACE_TRY_ENV = @@ -876,6 +885,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static ReplyEndTimePolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual TimeBase::UtcT end_time ( CORBA::Environment &ACE_TRY_ENV = @@ -969,6 +979,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static RelativeRequestTimeoutPolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual TimeBase::TimeT relative_expiry ( CORBA::Environment &ACE_TRY_ENV = @@ -1062,6 +1073,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static RelativeRoundtripTimeoutPolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual TimeBase::TimeT relative_expiry ( CORBA::Environment &ACE_TRY_ENV = @@ -1091,6 +1103,8 @@ TAO_NAMESPACE Messaging struct TAO_Export RoutingTypeRange { + static void _tao_any_destructor (void *); + RoutingType min; RoutingType max; }; @@ -1192,6 +1206,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static RoutingPolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual RoutingTypeRange routing_range ( CORBA::Environment &ACE_TRY_ENV = @@ -1285,6 +1300,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static MaxHopsPolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual CORBA::UShort max_hops ( CORBA::Environment &ACE_TRY_ENV = @@ -1378,6 +1394,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static QueueOrderPolicy_ptr _nil (void); + static void _tao_any_destructor (void *); virtual Ordering allowed_orders ( CORBA::Environment &ACE_TRY_ENV = @@ -1405,6 +1422,8 @@ TAO_NAMESPACE Messaging struct TAO_Export PolicyValue { + static void _tao_any_destructor (void *); + CORBA::PolicyType ptype; // ************************************************************* @@ -1504,6 +1523,8 @@ TAO_NAMESPACE Messaging ); PolicyValueSeq (const PolicyValueSeq &); // copy ctor ~PolicyValueSeq (void); // dtor + + static void _tao_any_destructor (void *); }; typedef PolicyValueSeq *PolicyValueSeq_ptr; @@ -1875,6 +1896,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static ReplyHandler_ptr _nil (void); + static void _tao_any_destructor (void *); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, @@ -1966,6 +1988,7 @@ TAO_NAMESPACE Messaging CORBA::Environment::default_environment () ); static Poller_ptr _nil (void); + static void _tao_any_destructor (void *); virtual CORBA::Object_ptr operation_target ( CORBA::Environment &ACE_TRY_ENV = diff --git a/TAO/tao/MessagingS.cpp b/TAO/tao/MessagingS.cpp index 608e0fbc22c..cc3f5ef80e7 100644 --- a/TAO/tao/MessagingS.cpp +++ b/TAO/tao/MessagingS.cpp @@ -2223,7 +2223,7 @@ void POA_Messaging::Poller::_non_existent_skel ( CORBA::Environment &ACE_TRY_ENV ) { - POA_MessagingCORBA::Poller *_tao_impl = (POA_Messaging::Poller *) _tao_object_reference; + POA_Messaging::Poller *_tao_impl = (POA_Messaging::Poller *) _tao_object_reference; CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_TRY_ENV); ACE_CHECK; diff --git a/TAO/tao/NVList.cpp b/TAO/tao/NVList.cpp index 2f0d49fd49a..adbdc22bed2 100644 --- a/TAO/tao/NVList.cpp +++ b/TAO/tao/NVList.cpp @@ -151,9 +151,7 @@ CORBA_NVList::add_value (const char *name, // nv->any_._tao_replace (value.type_, value.byte_order_, - value.cdr_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (0); + value.cdr_); } return nv; } diff --git a/TAO/tao/ObjectIDList.cpp b/TAO/tao/ObjectIDList.cpp index 4a728f5a377..23e3e73b4b1 100644 --- a/TAO/tao/ObjectIDList.cpp +++ b/TAO/tao/ObjectIDList.cpp @@ -86,27 +86,12 @@ void operator<<= ( const CORBA_ORB_ObjectIdList &_tao_elem ) // copying { - CORBA_ORB_ObjectIdList *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA_ORB_ObjectIdList (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << _tao_elem; _tao_any._tao_replace (CORBA::ORB::_tc_ObjectIdList, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; + stream.begin ()); } CORBA::Boolean @@ -143,27 +128,23 @@ operator>> (TAO_InputCDR &strm, CORBA_ORB_ObjectIdList &_tao_sequence) return 0; // error } +void CORBA_ORB_ObjectIdList::_tao_any_destructor (void *x) +{ + CORBA_ORB_ObjectIdList *tmp = ACE_static_cast(CORBA_ORB_ObjectIdList*,x); + delete tmp; +} + void operator<<= (CORBA::Any &_tao_any, CORBA_ORB_ObjectIdList *_tao_elem) { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; - CORBA_ORB_ObjectIdList *_tao_copy; - ACE_NEW (_tao_copy, - CORBA_ORB_ObjectIdList (*_tao_elem)); - _tao_any._tao_replace (CORBA::ORB::_tc_ObjectIdList, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_copy, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY {} - ACE_ENDTRY; + _tao_elem, + CORBA_ORB_ObjectIdList::_tao_any_destructor); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_ORB_ObjectIdList *&_tao_elem) @@ -189,8 +170,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_ORB_ObjectIdList * CORBA::ORB::_tc_ObjectIdList, 1, _tao_elem, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA_ORB_ObjectIdList::_tao_any_destructor); return 1; } else diff --git a/TAO/tao/ObjectIDList.h b/TAO/tao/ObjectIDList.h index 4f4040c5200..4573bcd8c4f 100644 --- a/TAO/tao/ObjectIDList.h +++ b/TAO/tao/ObjectIDList.h @@ -58,6 +58,8 @@ public: ); CORBA_ORB_ObjectIdList (const CORBA_ORB_ObjectIdList &); // copy ctor ~CORBA_ORB_ObjectIdList (void); // dtor + + static void _tao_any_destructor (void*); }; typedef CORBA_ORB_ObjectIdList *CORBA_ORB_ObjectIdList_ptr; diff --git a/TAO/tao/POAC.cpp b/TAO/tao/POAC.cpp index 7fd3b87d13e..1f359f8693e 100644 --- a/TAO/tao/POAC.cpp +++ b/TAO/tao/POAC.cpp @@ -147,34 +147,23 @@ CORBA::Exception *PortableServer::ForwardRequest::_alloc (void) void operator<<= (CORBA::Any &_tao_any, const PortableServer::ForwardRequest &_tao_elem) // copying { - PortableServer::ForwardRequest *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::ForwardRequest (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::_tc_ForwardRequest, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::ForwardRequest::_tao_any_destructor (void *x) +{ + PortableServer::ForwardRequest *tmp = ACE_const_cast(PortableServer::ForwardRequest*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::ForwardRequest *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -183,16 +172,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::ForwardRequest *_tao_ele stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::ForwardRequest::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ForwardRequest *&_tao_elem) @@ -224,9 +205,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ForwardR PortableServer::_tc_ForwardRequest, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::ForwardRequest::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -275,9 +255,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::Fo PortableServer::_tc_ForwardRequest, 1, ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::ForwardRequest *&, _tao_elem)), - ACE_TRY_ENV + PortableServer::ForwardRequest::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3201,40 +3180,19 @@ void operator<<= ( const PortableServer::ObjectId &_tao_elem ) // copying { - PortableServer::ObjectId *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::ObjectId (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_ObjectId, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; } void operator<<= (CORBA::Any &_tao_any, PortableServer::ObjectId *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -3243,16 +3201,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::ObjectId *_tao_elem) // stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::ObjectId::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ObjectId *&_tao_elem) @@ -3284,9 +3234,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ObjectId PortableServer::_tc_ObjectId, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::ObjectId::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3335,9 +3284,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::Ob PortableServer::_tc_ObjectId, 1, ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::ObjectId *&, _tao_elem)), - ACE_TRY_ENV + PortableServer::ObjectId::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -3361,29 +3309,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::Ob void operator<<= (CORBA::Any & _tao_any, PortableServer::ThreadPolicyValue _tao_elem) { - PortableServer::ThreadPolicyValue *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::ThreadPolicyValue (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::_tc_ThreadPolicyValue, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ThreadPolicyValue &_tao_elem) @@ -3415,47 +3347,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ThreadPo void operator<<= (CORBA::Any &_tao_any, PortableServer::ThreadPolicy_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 = PortableServer::ThreadPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_ThreadPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::ThreadPolicy::_tao_any_destructor (void *x) +{ + PortableServer::ThreadPolicy *tmp = ACE_const_cast(PortableServer::ThreadPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ThreadPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::ThreadPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_ThreadPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3468,24 +3384,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ThreadPo { _tao_elem = PortableServer::ThreadPolicy::_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)->_tao_replace ( PortableServer::_tc_ThreadPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::ThreadPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::ThreadPolicy::_nil (); return 0; } @@ -3498,29 +3407,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ThreadPo void operator<<= (CORBA::Any &_tao_any, PortableServer::LifespanPolicyValue _tao_elem) { - PortableServer::LifespanPolicyValue *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::LifespanPolicyValue (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::_tc_LifespanPolicyValue, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::LifespanPolicyValue &_tao_elem) @@ -3552,47 +3445,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Lifespan void operator<<= (CORBA::Any &_tao_any, PortableServer::LifespanPolicy_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 = PortableServer::LifespanPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_LifespanPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::LifespanPolicy::_tao_any_destructor (void *x) +{ + PortableServer::LifespanPolicy *tmp = ACE_const_cast(PortableServer::LifespanPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::LifespanPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::LifespanPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_LifespanPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3605,24 +3482,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Lifespan { _tao_elem = PortableServer::LifespanPolicy::_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)->_tao_replace ( PortableServer::_tc_LifespanPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::LifespanPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::LifespanPolicy::_nil (); return 0; } @@ -3633,29 +3503,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Lifespan void operator<<= (CORBA::Any &_tao_any, PortableServer::IdUniquenessPolicyValue _tao_elem) { - PortableServer::IdUniquenessPolicyValue *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::IdUniquenessPolicyValue (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::_tc_IdUniquenessPolicyValue, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdUniquenessPolicyValue &_tao_elem) @@ -3687,47 +3541,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdUnique void operator<<= (CORBA::Any &_tao_any, PortableServer::IdUniquenessPolicy_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 = PortableServer::IdUniquenessPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_IdUniquenessPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::IdUniquenessPolicy::_tao_any_destructor (void *x) +{ + PortableServer::IdUniquenessPolicy *tmp = ACE_const_cast(PortableServer::IdUniquenessPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdUniquenessPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::IdUniquenessPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_IdUniquenessPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3740,24 +3578,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdUnique { _tao_elem = PortableServer::IdUniquenessPolicy::_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)->_tao_replace ( PortableServer::_tc_IdUniquenessPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::IdUniquenessPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::IdUniquenessPolicy::_nil (); return 0; } @@ -3768,29 +3599,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdUnique void operator<<= (CORBA::Any &_tao_any, PortableServer::IdAssignmentPolicyValue _tao_elem) { - PortableServer::IdAssignmentPolicyValue *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::IdAssignmentPolicyValue (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::_tc_IdAssignmentPolicyValue, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdAssignmentPolicyValue &_tao_elem) @@ -3822,47 +3637,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdAssign void operator<<= (CORBA::Any &_tao_any, PortableServer::IdAssignmentPolicy_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 = PortableServer::IdAssignmentPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_IdAssignmentPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::IdAssignmentPolicy::_tao_any_destructor (void *x) +{ + PortableServer::IdAssignmentPolicy *tmp = ACE_const_cast(PortableServer::IdAssignmentPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdAssignmentPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::IdAssignmentPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_IdAssignmentPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -3875,24 +3674,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdAssign { _tao_elem = PortableServer::IdAssignmentPolicy::_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)->_tao_replace ( PortableServer::_tc_IdAssignmentPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::IdAssignmentPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::IdAssignmentPolicy::_nil (); return 0; } @@ -3905,29 +3697,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::IdAssign void operator<<= (CORBA::Any &_tao_any, PortableServer::ImplicitActivationPolicyValue _tao_elem) { - PortableServer::ImplicitActivationPolicyValue *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::ImplicitActivationPolicyValue (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::_tc_ImplicitActivationPolicyValue, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ImplicitActivationPolicyValue &_tao_elem) @@ -3959,47 +3735,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Implicit void operator<<= (CORBA::Any &_tao_any, PortableServer::ImplicitActivationPolicy_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 = PortableServer::ImplicitActivationPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_ImplicitActivationPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::ImplicitActivationPolicy::_tao_any_destructor (void *x) +{ + PortableServer::ImplicitActivationPolicy *tmp = ACE_const_cast(PortableServer::ImplicitActivationPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ImplicitActivationPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::ImplicitActivationPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_ImplicitActivationPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -4012,24 +3772,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Implicit { _tao_elem = PortableServer::ImplicitActivationPolicy::_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)->_tao_replace ( PortableServer::_tc_ImplicitActivationPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::ImplicitActivationPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::ImplicitActivationPolicy::_nil (); return 0; } @@ -4040,29 +3793,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Implicit void operator<<= (CORBA::Any &_tao_any, PortableServer::ServantRetentionPolicyValue _tao_elem) { - PortableServer::ServantRetentionPolicyValue *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::ServantRetentionPolicyValue (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::_tc_ServantRetentionPolicyValue, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantRetentionPolicyValue &_tao_elem) @@ -4094,47 +3831,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantR void operator<<= (CORBA::Any &_tao_any, PortableServer::ServantRetentionPolicy_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 = PortableServer::ServantRetentionPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_ServantRetentionPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::ServantRetentionPolicy::_tao_any_destructor (void *x) +{ + PortableServer::ServantRetentionPolicy *tmp = ACE_const_cast(PortableServer::ServantRetentionPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantRetentionPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::ServantRetentionPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_ServantRetentionPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -4147,24 +3868,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantR { _tao_elem = PortableServer::ServantRetentionPolicy::_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)->_tao_replace ( PortableServer::_tc_ServantRetentionPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::ServantRetentionPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::ServantRetentionPolicy::_nil (); return 0; } @@ -4175,29 +3889,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantR void operator<<= (CORBA::Any &_tao_any, PortableServer::RequestProcessingPolicyValue _tao_elem) { - PortableServer::RequestProcessingPolicyValue *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::RequestProcessingPolicyValue (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::_tc_RequestProcessingPolicyValue, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::RequestProcessingPolicyValue &_tao_elem) @@ -4229,47 +3927,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::RequestP void operator<<= (CORBA::Any &_tao_any, PortableServer::RequestProcessingPolicy_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 = PortableServer::RequestProcessingPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_RequestProcessingPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::RequestProcessingPolicy::_tao_any_destructor (void *x) +{ + PortableServer::RequestProcessingPolicy *tmp = ACE_const_cast(PortableServer::RequestProcessingPolicy*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::RequestProcessingPolicy_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::RequestProcessingPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_RequestProcessingPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -4282,24 +3964,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::RequestP { _tao_elem = PortableServer::RequestProcessingPolicy::_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)->_tao_replace ( PortableServer::_tc_RequestProcessingPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::RequestProcessingPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::RequestProcessingPolicy::_nil (); return 0; } @@ -4312,34 +3987,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::RequestP void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::AdapterAlreadyExists &_tao_elem) // copying { - PortableServer::POA::AdapterAlreadyExists *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::AdapterAlreadyExists (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_AdapterAlreadyExists, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::AdapterAlreadyExists::_tao_any_destructor (void *x) +{ + PortableServer::POA::AdapterAlreadyExists *tmp = ACE_const_cast(PortableServer::POA::AdapterAlreadyExists*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::AdapterAlreadyExists *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -4348,16 +4012,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::AdapterAlreadyExist stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::AdapterAlreadyExists::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::AdapterAlreadyExists *&_tao_elem) @@ -4389,9 +4045,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Ada PortableServer::POA::_tc_AdapterAlreadyExists, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::AdapterAlreadyExists::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4440,9 +4095,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO PortableServer::POA::_tc_AdapterAlreadyExists, 1, ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::AdapterAlreadyExists *&, _tao_elem)), - ACE_TRY_ENV + PortableServer::POA::AdapterAlreadyExists::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4466,34 +4120,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::AdapterInactive &_tao_elem) // copying { - PortableServer::POA::AdapterInactive *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::AdapterInactive (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_AdapterInactive, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::AdapterInactive::_tao_any_destructor (void *x) +{ + PortableServer::POA::AdapterInactive *tmp = ACE_const_cast(PortableServer::POA::AdapterInactive*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::AdapterInactive *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -4502,16 +4145,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::AdapterInactive *_t stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::AdapterInactive::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::AdapterInactive *&_tao_elem) @@ -4543,9 +4178,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Ada PortableServer::POA::_tc_AdapterInactive, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::AdapterInactive::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4594,9 +4228,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO PortableServer::POA::_tc_AdapterInactive, 1, ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::AdapterInactive *&, _tao_elem)), - ACE_TRY_ENV + PortableServer::POA::AdapterInactive::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4620,34 +4253,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::AdapterNonExistent &_tao_elem) // copying { - PortableServer::POA::AdapterNonExistent *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::AdapterNonExistent (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_AdapterNonExistent, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::AdapterNonExistent::_tao_any_destructor (void *x) +{ + PortableServer::POA::AdapterNonExistent *tmp = ACE_const_cast(PortableServer::POA::AdapterNonExistent*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::AdapterNonExistent *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -4656,16 +4278,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::AdapterNonExistent stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::AdapterNonExistent::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::AdapterNonExistent *&_tao_elem) @@ -4697,9 +4311,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Ada PortableServer::POA::_tc_AdapterNonExistent, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::AdapterNonExistent::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4748,9 +4361,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO PortableServer::POA::_tc_AdapterNonExistent, 1, ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::AdapterNonExistent *&, _tao_elem)), - ACE_TRY_ENV + PortableServer::POA::AdapterNonExistent::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4772,34 +4384,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::InvalidPolicy &_tao_elem) // copying { - PortableServer::POA::InvalidPolicy *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::InvalidPolicy (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_InvalidPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::InvalidPolicy::_tao_any_destructor (void *x) +{ + PortableServer::POA::InvalidPolicy *tmp = ACE_const_cast(PortableServer::POA::InvalidPolicy*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::InvalidPolicy *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -4808,16 +4409,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::InvalidPolicy *_tao stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::InvalidPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::InvalidPolicy *&_tao_elem) @@ -4849,9 +4442,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Inv PortableServer::POA::_tc_InvalidPolicy, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::InvalidPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4900,9 +4492,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO PortableServer::POA::_tc_InvalidPolicy, 1, ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::InvalidPolicy *&, _tao_elem)), - ACE_TRY_ENV + PortableServer::POA::InvalidPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -4926,34 +4517,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::NoServant &_tao_elem) // copying { - PortableServer::POA::NoServant *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::NoServant (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_NoServant, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::NoServant::_tao_any_destructor (void *x) +{ + PortableServer::POA::NoServant *tmp = ACE_const_cast(PortableServer::POA::NoServant*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::NoServant *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -4962,16 +4542,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::NoServant *_tao_ele stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::NoServant::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::NoServant *&_tao_elem) @@ -5003,9 +4575,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::NoS PortableServer::POA::_tc_NoServant, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::NoServant::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -5054,9 +4625,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO PortableServer::POA::_tc_NoServant, 1, ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::NoServant *&, _tao_elem)), - ACE_TRY_ENV + PortableServer::POA::NoServant::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -5080,34 +4650,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::PO void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::ObjectAlreadyActive &_tao_elem) // copying { - PortableServer::POA::ObjectAlreadyActive *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::ObjectAlreadyActive (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_ObjectAlreadyActive, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::ObjectAlreadyActive::_tao_any_destructor (void *x) +{ + PortableServer::POA::ObjectAlreadyActive *tmp = ACE_const_cast(PortableServer::POA::ObjectAlreadyActive*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::ObjectAlreadyActive *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -5116,16 +4675,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::ObjectAlreadyActive stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::ObjectAlreadyActive::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::ObjectAlreadyActive *&_tao_elem) @@ -5157,9 +4708,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Obj PortableServer::POA::_tc_ObjectAlreadyActive, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::ObjectAlreadyActive::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -5181,85 +4731,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Obj CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::POA::ObjectAlreadyActive *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::POA::_tc_ObjectAlreadyActive, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::POA::ObjectAlreadyActive *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, PortableServer::POA::ObjectAlreadyActive, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(PortableServer::POA::ObjectAlreadyActive *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::POA::_tc_ObjectAlreadyActive, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::ObjectAlreadyActive *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (PortableServer::POA::ObjectAlreadyActive *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (PortableServer::POA::ObjectAlreadyActive *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(PortableServer::POA::ObjectAlreadyActive *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::ObjectNotActive &_tao_elem) // copying { - PortableServer::POA::ObjectNotActive *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::ObjectNotActive (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_ObjectNotActive, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::ObjectNotActive::_tao_any_destructor (void *x) +{ + PortableServer::POA::ObjectNotActive *tmp = ACE_const_cast(PortableServer::POA::ObjectNotActive*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::ObjectNotActive *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -5268,16 +4761,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::ObjectNotActive *_t stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::ObjectNotActive::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::ObjectNotActive *&_tao_elem) @@ -5309,9 +4794,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Obj PortableServer::POA::_tc_ObjectNotActive, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::ObjectNotActive::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -5333,85 +4817,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Obj CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::POA::ObjectNotActive *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::POA::_tc_ObjectNotActive, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::POA::ObjectNotActive *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, PortableServer::POA::ObjectNotActive, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(PortableServer::POA::ObjectNotActive *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::POA::_tc_ObjectNotActive, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::ObjectNotActive *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (PortableServer::POA::ObjectNotActive *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (PortableServer::POA::ObjectNotActive *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(PortableServer::POA::ObjectNotActive *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::ServantAlreadyActive &_tao_elem) // copying { - PortableServer::POA::ServantAlreadyActive *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::ServantAlreadyActive (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_ServantAlreadyActive, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::ServantAlreadyActive::_tao_any_destructor (void *x) +{ + PortableServer::POA::ServantAlreadyActive *tmp = ACE_const_cast(PortableServer::POA::ServantAlreadyActive*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::ServantAlreadyActive *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -5420,16 +4847,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::ServantAlreadyActiv stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::ServantAlreadyActive::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::ServantAlreadyActive *&_tao_elem) @@ -5461,9 +4880,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Ser PortableServer::POA::_tc_ServantAlreadyActive, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::ServantAlreadyActive::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -5485,85 +4903,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Ser CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::POA::ServantAlreadyActive *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::POA::_tc_ServantAlreadyActive, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::POA::ServantAlreadyActive *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, PortableServer::POA::ServantAlreadyActive, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(PortableServer::POA::ServantAlreadyActive *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::POA::_tc_ServantAlreadyActive, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::ServantAlreadyActive *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (PortableServer::POA::ServantAlreadyActive *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (PortableServer::POA::ServantAlreadyActive *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(PortableServer::POA::ServantAlreadyActive *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::ServantNotActive &_tao_elem) // copying { - PortableServer::POA::ServantNotActive *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::ServantNotActive (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_ServantNotActive, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::ServantNotActive::_tao_any_destructor (void *x) +{ + PortableServer::POA::ServantNotActive *tmp = ACE_const_cast(PortableServer::POA::ServantNotActive*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::ServantNotActive *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -5572,16 +4933,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::ServantNotActive *_ stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::ServantNotActive::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::ServantNotActive *&_tao_elem) @@ -5613,9 +4966,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Ser PortableServer::POA::_tc_ServantNotActive, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::ServantNotActive::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -5637,85 +4989,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Ser CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::POA::ServantNotActive *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::POA::_tc_ServantNotActive, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::POA::ServantNotActive *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, PortableServer::POA::ServantNotActive, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(PortableServer::POA::ServantNotActive *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::POA::_tc_ServantNotActive, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::ServantNotActive *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (PortableServer::POA::ServantNotActive *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (PortableServer::POA::ServantNotActive *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(PortableServer::POA::ServantNotActive *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::WrongAdapter &_tao_elem) // copying { - PortableServer::POA::WrongAdapter *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::WrongAdapter (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_WrongAdapter, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::WrongAdapter::_tao_any_destructor (void *x) +{ + PortableServer::POA::WrongAdapter *tmp = ACE_const_cast(PortableServer::POA::WrongAdapter*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::WrongAdapter *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -5724,16 +5019,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::WrongAdapter *_tao_ stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::WrongAdapter::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::WrongAdapter *&_tao_elem) @@ -5765,9 +5052,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Wro PortableServer::POA::_tc_WrongAdapter, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::WrongAdapter::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -5789,85 +5075,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Wro CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::POA::WrongAdapter *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::POA::_tc_WrongAdapter, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::POA::WrongAdapter *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, PortableServer::POA::WrongAdapter, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(PortableServer::POA::WrongAdapter *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::POA::_tc_WrongAdapter, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::WrongAdapter *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (PortableServer::POA::WrongAdapter *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (PortableServer::POA::WrongAdapter *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(PortableServer::POA::WrongAdapter *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const PortableServer::POA::WrongPolicy &_tao_elem) // copying { - PortableServer::POA::WrongPolicy *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POA::WrongPolicy (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POA::_tc_WrongPolicy, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::POA::WrongPolicy::_tao_any_destructor (void *x) +{ + PortableServer::POA::WrongPolicy *tmp = ACE_const_cast(PortableServer::POA::WrongPolicy*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::WrongPolicy *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -5876,16 +5105,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POA::WrongPolicy *_tao_e stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POA::WrongPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::WrongPolicy *&_tao_elem) @@ -5917,9 +5138,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Wro PortableServer::POA::_tc_WrongPolicy, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POA::WrongPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -5941,85 +5161,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA::Wro CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::POA::WrongPolicy *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::POA::_tc_WrongPolicy, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::POA::WrongPolicy *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, PortableServer::POA::WrongPolicy, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(PortableServer::POA::WrongPolicy *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::POA::_tc_WrongPolicy, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POA::WrongPolicy *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (PortableServer::POA::WrongPolicy *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (PortableServer::POA::WrongPolicy *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(PortableServer::POA::WrongPolicy *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, const PortableServer::Current::NoContext &_tao_elem) // copying { - PortableServer::Current::NoContext *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::Current::NoContext (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::Current::_tc_NoContext, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void PortableServer::Current::NoContext::_tao_any_destructor (void *x) +{ + PortableServer::Current::NoContext *tmp = ACE_const_cast(PortableServer::Current::NoContext*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::Current::NoContext *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -6028,16 +5191,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::Current::NoContext *_tao stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::Current::NoContext::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Current::NoContext *&_tao_elem) @@ -6069,9 +5224,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Current: PortableServer::Current::_tc_NoContext, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::Current::NoContext::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -6093,98 +5247,36 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Current: CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::Current::NoContext *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::Current::_tc_NoContext, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::Current::NoContext *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, PortableServer::Current::NoContext, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(PortableServer::Current::NoContext *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::Current::_tc_NoContext, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::Current::NoContext *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (PortableServer::Current::NoContext *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (PortableServer::Current::NoContext *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(PortableServer::Current::NoContext *&,_tao_elem); } void operator<<= (CORBA::Any &_tao_any, PortableServer::Current_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 = PortableServer::Current::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_Current, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::Current::_tao_any_destructor (void *x) +{ + PortableServer::Current *tmp = ACE_const_cast(PortableServer::Current*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Current_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::Current::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_Current, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -6197,24 +5289,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Current_ { _tao_elem = PortableServer::Current::_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)->_tao_replace ( PortableServer::_tc_Current, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::Current::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::Current::_nil (); return 0; } @@ -6225,47 +5310,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::Current_ void operator<<= (CORBA::Any &_tao_any, PortableServer::POAManager_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 = PortableServer::POAManager::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_POAManager, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::POAManager::_tao_any_destructor (void *x) +{ + PortableServer::POAManager *tmp = ACE_const_cast(PortableServer::POAManager*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POAManager_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::POAManager::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_POAManager, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -6278,24 +5347,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POAManag { _tao_elem = PortableServer::POAManager::_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)->_tao_replace ( PortableServer::_tc_POAManager, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::POAManager::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::POAManager::_nil (); return 0; } @@ -6306,29 +5368,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POAManag void operator<<= (CORBA::Any &_tao_any, PortableServer::POAManager::State _tao_elem) { - PortableServer::POAManager::State *_tao_any_val; - ACE_NEW (_tao_any_val, PortableServer::POAManager::State (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POAManager::_tc_State, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POAManager::State &_tao_elem) @@ -6360,34 +5406,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POAManag void operator<<= (CORBA::Any &_tao_any, const PortableServer::POAManager::AdapterInactive &_tao_elem) // copying { - PortableServer::POAManager::AdapterInactive *_tao_any_val = 0; - ACE_NEW (_tao_any_val, PortableServer::POAManager::AdapterInactive (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( PortableServer::POAManager::_tc_AdapterInactive, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; + stream.begin () + ); +} + +void PortableServer::POAManager::AdapterInactive::_tao_any_destructor (void *x) +{ + PortableServer::POAManager::AdapterInactive *tmp = ACE_const_cast(PortableServer::POAManager::AdapterInactive*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, PortableServer::POAManager::AdapterInactive *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -6396,16 +5431,8 @@ void operator<<= (CORBA::Any &_tao_any, PortableServer::POAManager::AdapterInact stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + PortableServer::POAManager::AdapterInactive::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POAManager::AdapterInactive *&_tao_elem) @@ -6437,9 +5464,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POAManag PortableServer::POAManager::_tc_AdapterInactive, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + PortableServer::POAManager::AdapterInactive::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -6461,100 +5487,38 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POAManag CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableServer::POAManager::AdapterInactive *&_tao_elem) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - if (!type->equivalent (PortableServer::POAManager::_tc_AdapterInactive, ACE_TRY_ENV)) // not equal - { - _tao_elem = 0; - return 0; - } - ACE_TRY_CHECK; - if (_tao_any.any_owns_data ()) - { - _tao_elem = (PortableServer::POAManager::AdapterInactive *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, PortableServer::POAManager::AdapterInactive, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *(PortableServer::POAManager::AdapterInactive *)_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - PortableServer::POAManager::_tc_AdapterInactive, - 1, - ACE_reinterpret_cast (void *, ACE_const_cast (PortableServer::POAManager::AdapterInactive *&, _tao_elem)), - ACE_TRY_ENV - ); - ACE_TRY_CHECK; - return 1; - } - else - { - delete ACE_const_cast (PortableServer::POAManager::AdapterInactive *&, _tao_elem); - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete ACE_const_cast (PortableServer::POAManager::AdapterInactive *&, _tao_elem); - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; + return _tao_any >>= ACE_const_cast(PortableServer::POAManager::AdapterInactive *&,_tao_elem); } #if (TAO_HAS_MINIMUM_POA == 0) void operator<<= (CORBA::Any &_tao_any, PortableServer::AdapterActivator_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 = PortableServer::AdapterActivator::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_AdapterActivator, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::AdapterActivator::_tao_any_destructor (void *x) +{ + PortableServer::AdapterActivator *tmp = ACE_const_cast(PortableServer::AdapterActivator*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::AdapterActivator_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::AdapterActivator::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_AdapterActivator, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -6567,24 +5531,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::AdapterA { _tao_elem = PortableServer::AdapterActivator::_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)->_tao_replace ( PortableServer::_tc_AdapterActivator, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::AdapterActivator::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::AdapterActivator::_nil (); return 0; } @@ -6595,47 +5552,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::AdapterA void operator<<= (CORBA::Any &_tao_any, PortableServer::ServantLocator_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 = PortableServer::ServantLocator::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_ServantLocator, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::ServantLocator::_tao_any_destructor (void *x) +{ + PortableServer::ServantLocator *tmp = ACE_const_cast(PortableServer::ServantLocator*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantLocator_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::ServantLocator::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_ServantLocator, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -6648,24 +5589,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantL { _tao_elem = PortableServer::ServantLocator::_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)->_tao_replace ( PortableServer::_tc_ServantLocator, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::ServantLocator::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::ServantLocator::_nil (); return 0; } @@ -6676,47 +5610,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantL void operator<<= (CORBA::Any &_tao_any, PortableServer::ServantManager_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 = PortableServer::ServantManager::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_ServantManager, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::ServantManager::_tao_any_destructor (void *x) +{ + PortableServer::ServantManager *tmp = ACE_const_cast(PortableServer::ServantManager*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantManager_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::ServantManager::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_ServantManager, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -6729,24 +5647,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantM { _tao_elem = PortableServer::ServantManager::_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)->_tao_replace ( PortableServer::_tc_ServantManager, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::ServantManager::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::ServantManager::_nil (); return 0; } @@ -6757,47 +5668,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantM void operator<<= (CORBA::Any &_tao_any, PortableServer::ServantActivator_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 = PortableServer::ServantActivator::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_ServantActivator, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::ServantActivator::_tao_any_destructor (void *x) +{ + PortableServer::ServantActivator *tmp = ACE_const_cast(PortableServer::ServantActivator*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantActivator_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::ServantActivator::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_ServantActivator, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -6810,24 +5705,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantA { _tao_elem = PortableServer::ServantActivator::_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)->_tao_replace ( PortableServer::_tc_ServantActivator, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::ServantActivator::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::ServantActivator::_nil (); return 0; } @@ -6840,47 +5728,31 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::ServantA void operator<<= (CORBA::Any &_tao_any, PortableServer::POA_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 = PortableServer::POA::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( PortableServer::_tc_POA, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_obj_ptr, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_obj_ptr; } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; +} + +void PortableServer::POA::_tao_any_destructor (void *x) +{ + PortableServer::POA *tmp = ACE_const_cast(PortableServer::POA*,x); + CORBA::release (tmp); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = PortableServer::POA::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (PortableServer::_tc_POA, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -6893,24 +5765,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, PortableServer::POA_ptr { _tao_elem = PortableServer::POA::_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)->_tao_replace ( PortableServer::_tc_POA, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + PortableServer::POA::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = PortableServer::POA::_nil (); return 0; } diff --git a/TAO/tao/POAC.h b/TAO/tao/POAC.h index e3d592ce9a7..5060356774a 100644 --- a/TAO/tao/POAC.h +++ b/TAO/tao/POAC.h @@ -232,6 +232,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static ForwardRequest *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); ForwardRequest( const CORBA::Object_ptr _tao_forward_reference @@ -357,6 +358,7 @@ TAO_NAMESPACE PortableServer{ static ThreadPolicy_ptr _duplicate (ThreadPolicy_ptr obj); static ThreadPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static ThreadPolicy_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual ThreadPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -466,6 +468,7 @@ TAO_NAMESPACE PortableServer{ static LifespanPolicy_ptr _duplicate (LifespanPolicy_ptr obj); static LifespanPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static LifespanPolicy_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual LifespanPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -575,6 +578,7 @@ TAO_NAMESPACE PortableServer{ static IdUniquenessPolicy_ptr _duplicate (IdUniquenessPolicy_ptr obj); static IdUniquenessPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static IdUniquenessPolicy_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual IdUniquenessPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -684,6 +688,7 @@ TAO_NAMESPACE PortableServer{ static IdAssignmentPolicy_ptr _duplicate (IdAssignmentPolicy_ptr obj); static IdAssignmentPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static IdAssignmentPolicy_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual IdAssignmentPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -796,6 +801,7 @@ TAO_NAMESPACE PortableServer{ static ImplicitActivationPolicy_ptr _duplicate (ImplicitActivationPolicy_ptr obj); static ImplicitActivationPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static ImplicitActivationPolicy_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual ImplicitActivationPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -910,6 +916,7 @@ TAO_NAMESPACE PortableServer{ static ServantRetentionPolicy_ptr _duplicate (ServantRetentionPolicy_ptr obj); static ServantRetentionPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static ServantRetentionPolicy_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual ServantRetentionPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -1025,6 +1032,7 @@ TAO_NAMESPACE PortableServer{ static RequestProcessingPolicy_ptr _duplicate (RequestProcessingPolicy_ptr obj); static RequestProcessingPolicy_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static RequestProcessingPolicy_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual RequestProcessingPolicyValue value (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -1135,6 +1143,7 @@ TAO_NAMESPACE PortableServer{ static POAManager_ptr _duplicate (POAManager_ptr obj); static POAManager_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static POAManager_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (_PORTABLESERVER_POAMANAGER_ADAPTERINACTIVE___PTR_CH_) @@ -1163,6 +1172,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static AdapterInactive *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -1282,6 +1292,7 @@ TAO_NAMESPACE PortableServer{ static AdapterActivator_ptr _duplicate (AdapterActivator_ptr obj); static AdapterActivator_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static AdapterActivator_ptr _nil (void); + static void _tao_any_destructor (void*); virtual CORBA::Boolean unknown_adapter (POA_ptr parent, const char *name, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) = 0; virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); @@ -1380,6 +1391,7 @@ TAO_NAMESPACE PortableServer{ static ServantManager_ptr _duplicate (ServantManager_ptr obj); static ServantManager_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static ServantManager_ptr _nil (void); + static void _tao_any_destructor (void*); virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); virtual const char* _interface_repository_id (void) const; @@ -1476,6 +1488,7 @@ TAO_NAMESPACE PortableServer{ static ServantActivator_ptr _duplicate (ServantActivator_ptr obj); static ServantActivator_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static ServantActivator_ptr _nil (void); + static void _tao_any_destructor (void*); virtual Servant incarnate (const ObjectId &oid, POA_ptr adapter, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) = 0; virtual void etherealize (const ObjectId &oid, POA_ptr adapter, Servant serv, CORBA::Boolean cleanup_in_progress, CORBA::Boolean remaining_activations, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) = 0; @@ -1577,6 +1590,7 @@ TAO_NAMESPACE PortableServer{ static ServantLocator_ptr _duplicate (ServantLocator_ptr obj); static ServantLocator_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static ServantLocator_ptr _nil (void); + static void _tao_any_destructor (void*); virtual Servant preinvoke (const ObjectId &oid, POA_ptr adapter, const char *operation, Cookie & the_cookie, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) = 0; virtual void postinvoke (const ObjectId &oid, POA_ptr adapter, const char *operation, Cookie the_cookie, Servant the_servant, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()) = 0; @@ -1676,6 +1690,7 @@ TAO_NAMESPACE PortableServer{ static POA_ptr _duplicate (POA_ptr obj); static POA_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static POA_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (_PORTABLESERVER_POA_ADAPTERALREADYEXISTS___PTR_CH_) @@ -1704,6 +1719,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static AdapterAlreadyExists *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -1744,6 +1760,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static AdapterInactive *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -1789,6 +1806,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static AdapterNonExistent *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -1832,6 +1850,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static InvalidPolicy *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); InvalidPolicy( CORBA::UShort _tao_index @@ -1883,6 +1902,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static NoServant *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -1928,6 +1948,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static ObjectAlreadyActive *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -1971,6 +1992,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static ObjectNotActive *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -2014,6 +2036,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static ServantAlreadyActive *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -2057,6 +2080,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static ServantNotActive *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -2100,6 +2124,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static WrongAdapter *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -2143,6 +2168,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static WrongPolicy *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -2303,6 +2329,7 @@ TAO_NAMESPACE PortableServer{ static Current_ptr _duplicate (Current_ptr obj); static Current_ptr _narrow (CORBA::Object_ptr obj, CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); static Current_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (_PORTABLESERVER_CURRENT_NOCONTEXT___PTR_CH_) @@ -2331,6 +2358,7 @@ TAO_NAMESPACE PortableServer{ CORBA::Environment &); static NoContext *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension static CORBA::Exception *_alloc (void); @@ -2602,7 +2630,7 @@ TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::ForwardReq TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::POAManager_ptr ); TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::POAManager_ptr &); -TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::POAManager::State &); // +TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::POAManager::State &); // TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::POAManager::State &); TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const PortableServer::POAManager::AdapterInactive &); TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableServer::POAManager::AdapterInactive &); diff --git a/TAO/tao/PolicyC.cpp b/TAO/tao/PolicyC.cpp index 8454e32b9ef..92100428d95 100644 --- a/TAO/tao/PolicyC.cpp +++ b/TAO/tao/PolicyC.cpp @@ -610,34 +610,23 @@ const char* CORBA_PolicyCurrent::_interface_repository_id (void) const 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)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_PolicyError, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::PolicyError::_tao_any_destructor (void *x) +{ + CORBA::PolicyError *tmp = ACE_const_cast(CORBA::PolicyError*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyError *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -646,16 +635,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyError *_tao_elem) // non co stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::PolicyError::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyError *&_tao_elem) @@ -687,9 +668,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyError *&_ta CORBA::_tc_PolicyError, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::PolicyError::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -703,7 +683,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyError *&_ta { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -738,9 +718,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyError CORBA::_tc_PolicyError, 1, ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::PolicyError *&, _tao_elem)), - ACE_TRY_ENV + CORBA::PolicyError::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -754,7 +733,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyError { delete ACE_const_cast (CORBA::PolicyError *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -762,34 +741,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyError 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; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_InvalidPolicies, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::InvalidPolicies::_tao_any_destructor (void *x) +{ + CORBA::InvalidPolicies *tmp = ACE_const_cast(CORBA::InvalidPolicies*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::InvalidPolicies *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -798,16 +766,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::InvalidPolicies *_tao_elem) // no stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::InvalidPolicies::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InvalidPolicies *&_tao_elem) @@ -839,9 +799,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InvalidPolicies * CORBA::_tc_InvalidPolicies, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::InvalidPolicies::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -855,7 +814,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::InvalidPolicies * { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -890,9 +849,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::InvalidPoli CORBA::_tc_InvalidPolicies, 1, ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::InvalidPolicies *&, _tao_elem)), - ACE_TRY_ENV + CORBA::InvalidPolicies::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -906,58 +864,45 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::InvalidPoli { delete ACE_const_cast (CORBA::InvalidPolicies *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; } +void CORBA::Policy::_tao_any_destructor (void *x) +{ + CORBA::Policy *tmp = ACE_const_cast(CORBA::Policy*,x); + CORBA::release (tmp); +} + 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_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_Policy, + CORBA::_tc_Policy, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_obj_ptr, - ACE_TRY_ENV + _tao_elem, + CORBA::Policy::_tao_any_destructor ); - 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::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 (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_Policy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -970,24 +915,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Policy_ptr &_tao_ { _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)->_tao_replace ( CORBA::_tc_Policy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::Policy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::Policy::_nil (); return 0; } @@ -1003,40 +941,25 @@ void operator<<= ( const CORBA::PolicyList &_tao_elem ) // copying { - CORBA::PolicyList *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::PolicyList (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_PolicyList, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; } - else - { - delete _tao_any_val; - } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::PolicyList::_tao_any_destructor (void *x) +{ + CORBA::PolicyList *tmp = ACE_const_cast(CORBA::PolicyList*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyList *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1045,16 +968,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyList *_tao_elem) // non cop stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::PolicyList::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyList *&_tao_elem) @@ -1086,9 +1001,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyList *&_tao CORBA::_tc_PolicyList, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::PolicyList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1102,7 +1016,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyList *&_tao { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1137,9 +1051,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyList CORBA::_tc_PolicyList, 1, ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::PolicyList *&, _tao_elem)), - ACE_TRY_ENV + CORBA::PolicyList::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1153,7 +1066,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyList { delete ACE_const_cast (CORBA::PolicyList *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1164,40 +1077,25 @@ void operator<<= ( const CORBA::PolicyTypeSeq &_tao_elem ) // copying { - CORBA::PolicyTypeSeq *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::PolicyTypeSeq (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - if (stream << *_tao_any_val) + if (stream << _tao_elem) { _tao_any._tao_replace ( CORBA::_tc_PolicyTypeSeq, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - else - { - delete _tao_any_val; } - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::PolicyTypeSeq::_tao_any_destructor (void *x) +{ + CORBA::PolicyTypeSeq *tmp = ACE_const_cast(CORBA::PolicyTypeSeq*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyTypeSeq *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1206,16 +1104,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyTypeSeq *_tao_elem) // non stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::PolicyTypeSeq::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyTypeSeq *&_tao_elem) @@ -1247,9 +1137,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyTypeSeq *&_ CORBA::_tc_PolicyTypeSeq, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::PolicyTypeSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1263,7 +1152,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyTypeSeq *&_ { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1298,9 +1187,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyTypeS CORBA::_tc_PolicyTypeSeq, 1, ACE_reinterpret_cast (void *, ACE_const_cast (CORBA::PolicyTypeSeq *&, _tao_elem)), - ACE_TRY_ENV + CORBA::PolicyTypeSeq::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1314,7 +1202,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyTypeS { delete ACE_const_cast (CORBA::PolicyTypeSeq *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1322,29 +1210,13 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PolicyTypeS void operator<<= (CORBA::Any &_tao_any, CORBA::SetOverrideType _tao_elem) { - CORBA::SetOverrideType *_tao_any_val; - ACE_NEW (_tao_any_val, CORBA::SetOverrideType (_tao_elem)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::_tc_SetOverrideType, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - // free allocated storage - delete _tao_any_val; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::SetOverrideType &_tao_elem) @@ -1414,49 +1286,36 @@ operator>> ( return 0; } +void CORBA::PolicyManager::_tao_any_destructor (void *x) +{ + CORBA::PolicyManager *tmp = ACE_const_cast(CORBA::PolicyManager*,x); + CORBA::release (tmp); +} + void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyManager_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::PolicyManager::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_PolicyManager, + CORBA::_tc_PolicyManager, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_obj_ptr, - ACE_TRY_ENV + _tao_elem, + CORBA::PolicyManager::_tao_any_destructor ); - 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::PolicyManager_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::PolicyManager::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_PolicyManager, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -1469,24 +1328,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyManager_ptr { _tao_elem = CORBA::PolicyManager::_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)->_tao_replace ( CORBA::_tc_PolicyManager, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::PolicyManager::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::PolicyManager::_nil (); return 0; } @@ -1495,49 +1347,36 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyManager_ptr return 0; } +void CORBA::PolicyCurrent::_tao_any_destructor (void *x) +{ + CORBA::PolicyCurrent *tmp = ACE_const_cast(CORBA::PolicyCurrent*,x); + CORBA::release (tmp); +} + void operator<<= (CORBA::Any &_tao_any, CORBA::PolicyCurrent_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::PolicyCurrent::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_PolicyCurrent, + CORBA::_tc_PolicyCurrent, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_obj_ptr, - ACE_TRY_ENV + _tao_elem, + CORBA::PolicyCurrent::_tao_any_destructor ); - 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::PolicyCurrent_ptr &_tao_elem) { - CORBA::Object_ptr *tmp = 0; - ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0); ACE_TRY_NEW_ENV { _tao_elem = CORBA::PolicyCurrent::_nil (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_PolicyCurrent, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -1550,24 +1389,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PolicyCurrent_ptr { _tao_elem = CORBA::PolicyCurrent::_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)->_tao_replace ( CORBA::_tc_PolicyCurrent, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::PolicyCurrent::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::PolicyCurrent::_nil (); return 0; } diff --git a/TAO/tao/PolicyC.h b/TAO/tao/PolicyC.h index 0e2ed7697be..56ab2a05432 100644 --- a/TAO/tao/PolicyC.h +++ b/TAO/tao/PolicyC.h @@ -39,6 +39,7 @@ public: CORBA::Environment &); static CORBA_PolicyError *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); CORBA_PolicyError( CORBA::PolicyErrorCode _tao_reason); @@ -87,6 +88,7 @@ public: CORBA::Environment &); static CORBA_InvalidPolicies *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); CORBA_InvalidPolicies( const _tao_seq_UShort & _tao_indices); @@ -158,6 +160,7 @@ public: TAO_default_environment () ); static CORBA_Policy_ptr _nil (void); + static void _tao_any_destructor (void*); #if !defined (TAO_HAS_LOCALITY_CONSTRAINT_POLICIES) virtual CORBA::PolicyType policy_type ( @@ -227,6 +230,8 @@ public: ); CORBA_PolicyList (const CORBA_PolicyList &); // copy ctor ~CORBA_PolicyList (void); // dtor + + static void _tao_any_destructor (void*); }; typedef CORBA_PolicyList *CORBA_PolicyList_ptr; @@ -298,6 +303,8 @@ public: ); CORBA_PolicyTypeSeq (const CORBA_PolicyTypeSeq &); // copy ctor ~CORBA_PolicyTypeSeq (void); // dtor + + static void _tao_any_destructor (void*); }; typedef CORBA_PolicyTypeSeq *CORBA_PolicyTypeSeq_ptr; @@ -410,6 +417,7 @@ public: TAO_default_environment () ); static CORBA_PolicyManager_ptr _nil (void); + static void _tao_any_destructor (void*); virtual CORBA_PolicyList * get_policy_overrides ( const CORBA_PolicyTypeSeq & ts, @@ -500,6 +508,7 @@ public: TAO_default_environment () ); static CORBA_PolicyCurrent_ptr _nil (void); + static void _tao_any_destructor (void*); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, @@ -523,11 +532,11 @@ private: TAO_Export void operator<<= (CORBA::Any &, const CORBA::PolicyError &); -TAO_Export void operator<<= (CORBA::Any &, +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 &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::PolicyError *&); TAO_Export void operator<<= (CORBA::Any &, const CORBA::InvalidPolicies &); @@ -535,7 +544,7 @@ 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 &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::InvalidPolicies *&); // Any operators for interface CORBA::Policy @@ -549,7 +558,7 @@ 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 &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::PolicyList *&); TAO_Export void operator<<= (CORBA::Any &, const CORBA::PolicyTypeSeq &); @@ -557,20 +566,20 @@ 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 &, +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 &, CORBA::SetOverrideType &); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::PolicyManager_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::PolicyManager *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::PolicyCurrent_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::PolicyCurrent *&); // **************************************************************** diff --git a/TAO/tao/PollableC.cpp b/TAO/tao/PollableC.cpp index c7bc2e24b5a..a2db69f73d1 100644 --- a/TAO/tao/PollableC.cpp +++ b/TAO/tao/PollableC.cpp @@ -889,49 +889,36 @@ const char* CORBA_PollableSet::_interface_repository_id (void) const return "IDL:omg.org/CORBA/PollableSet:1.0"; } +void CORBA::Pollable::_tao_any_destructor (void *x) +{ + CORBA::Pollable *tmp = ACE_static_cast(CORBA::Pollable*,x); + CORBA::release (tmp); +} + 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_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_Pollable, + CORBA::_tc_Pollable, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_obj_ptr, - ACE_TRY_ENV + _tao_elem, + CORBA::Pollable::_tao_any_destructor ); - 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::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 (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_Pollable, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -944,24 +931,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Pollable_ptr &_ta { _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)->_tao_replace ( CORBA::_tc_Pollable, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::Pollable::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::Pollable::_nil (); return 0; } @@ -982,49 +962,37 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::Pollable_ptr &_ta CORBA::DIIPollable_ptr (*_TAO_collocation_CORBA_DIIPollable_Stub_Factory_function_pointer) ( CORBA::Object_ptr obj ) = 0; + +void CORBA::DIIPollable::_tao_any_destructor (void *x) +{ + CORBA::DIIPollable *tmp = ACE_static_cast(CORBA::DIIPollable*,x); + CORBA::release (tmp); +} + void operator<<= (CORBA::Any &_tao_any, CORBA::DIIPollable_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::DIIPollable::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_DIIPollable, + CORBA::_tc_DIIPollable, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_obj_ptr, - ACE_TRY_ENV + _tao_elem, + CORBA::DIIPollable::_tao_any_destructor ); - 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::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->equivalent (CORBA::_tc_DIIPollable, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -1037,24 +1005,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DIIPollable_ptr & { _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)->_tao_replace ( CORBA::_tc_DIIPollable, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::DIIPollable::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::DIIPollable::_nil (); return 0; } @@ -1075,49 +1036,37 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::DIIPollable_ptr & CORBA::PollableSet_ptr (*_TAO_collocation_CORBA_PollableSet_Stub_Factory_function_pointer) ( CORBA::Object_ptr obj ) = 0; + +void CORBA::PollableSet::_tao_any_destructor (void *x) +{ + CORBA::PollableSet *tmp = ACE_static_cast(CORBA::PollableSet*,x); + CORBA::release (tmp); +} + 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_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - CORBA::_tc_PollableSet, + CORBA::_tc_PollableSet, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_obj_ptr, - ACE_TRY_ENV + _tao_elem, + CORBA::PollableSet::_tao_any_destructor ); - 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::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 (); CORBA::TypeCode_var type = _tao_any.type (); if (!type->equivalent (CORBA::_tc_PollableSet, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -1130,24 +1079,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet_ptr & { _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)->_tao_replace ( CORBA::_tc_PollableSet, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + CORBA::PollableSet::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = CORBA::PollableSet::_nil (); return 0; } @@ -1167,34 +1109,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet_ptr & 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)); - if (!_tao_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_tao_any_val; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::PollableSet::_tc_NoPossiblePollable, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; } void operator<<= (CORBA::Any &_tao_any, CORBA::PollableSet::NoPossiblePollable *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1203,16 +1128,14 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::PollableSet::NoPossiblePollable * stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::PollableSet::NoPossiblePollable::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; +} + +void CORBA::PollableSet::NoPossiblePollable::_tao_any_destructor (void *x) +{ + CORBA::PollableSet::NoPossiblePollable *tmp = ACE_static_cast(CORBA::PollableSet::NoPossiblePollable*,x); + delete tmp; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::NoPossiblePollable *&_tao_elem) @@ -1244,9 +1167,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::NoPo CORBA::PollableSet::_tc_NoPossiblePollable, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::PollableSet::NoPossiblePollable::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1260,7 +1182,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::NoPo { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1268,85 +1190,28 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::NoPo CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::PollableSet::NoPossiblePollable *&_tao_elem) { - ACE_TRY_NEW_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; + return _tao_any >>= ACE_const_cast(CORBA::PollableSet::NoPossiblePollable *&,_tao_elem); } 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; + stream << _tao_elem; _tao_any._tao_replace ( CORBA::PollableSet::_tc_UnknownPollable, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_any_val; - } - ACE_ENDTRY; +} + +void CORBA::PollableSet::UnknownPollable::_tao_any_destructor (void +{ + CORBA::PollableSet::UnknownPollable *tmp = ACE_static_cast(CORBA::PollableSet::UnknownPollable*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::PollableSet::UnknownPollable *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -1355,16 +1220,8 @@ void operator<<= (CORBA::Any &_tao_any, CORBA::PollableSet::UnknownPollable *_ta stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + CORBA::PollableSet::UnknownPollable::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::UnknownPollable *&_tao_elem) @@ -1396,9 +1253,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::Unkn CORBA::PollableSet::_tc_UnknownPollable, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + CORBA::PollableSet::UnknownPollable::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -1412,7 +1268,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::Unkn { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -1420,53 +1276,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::PollableSet::Unkn 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; + return _tao_any >>= ACE_const_cast(CORBA::PollableSet::UnknownPollable *&,_tao_elem); } // **************************************************************** diff --git a/TAO/tao/PollableC.h b/TAO/tao/PollableC.h index c7672c2a047..88af9e7d58a 100644 --- a/TAO/tao/PollableC.h +++ b/TAO/tao/PollableC.h @@ -155,6 +155,7 @@ class TAO_Export CORBA_Pollable : public virtual CORBA_Object TAO_default_environment () ); static CORBA_Pollable_ptr _nil (void); + static void _tao_any_destructor (void*); virtual CORBA::Boolean is_ready ( CORBA::ULong timeout, @@ -249,6 +250,7 @@ public: TAO_default_environment () ); static CORBA_DIIPollable_ptr _nil (void); + static void _tao_any_destructor (void*); virtual CORBA::Boolean _is_a ( const CORBA::Char *type_id, @@ -289,6 +291,7 @@ public: TAO_default_environment () ); static CORBA_PollableSet_ptr _nil (void); + static void _tao_any_destructor (void*); class NoPossiblePollable; typedef NoPossiblePollable *NoPossiblePollable_ptr; @@ -317,6 +320,7 @@ public: CORBA::Environment &); static NoPossiblePollable *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension @@ -353,6 +357,7 @@ public: CORBA::Environment &); static UnknownPollable *_narrow (CORBA::Exception *); + static void _tao_any_destructor (void*); // = TAO extension @@ -405,37 +410,37 @@ private: }; // Any operators for interface CORBA_Pollable -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA_Pollable_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_Pollable *&); // Any operators for interface CORBA::DIIPollable -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA::DIIPollable_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::DIIPollable *&); // Any operators for interface CORBA_PollableSet -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA_PollableSet_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_PollableSet *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA_PollableSet::NoPossiblePollable &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA_PollableSet::NoPossiblePollable*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_PollableSet::NoPossiblePollable *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::PollableSet::NoPossiblePollable *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const CORBA_PollableSet::UnknownPollable &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, CORBA_PollableSet::UnknownPollable*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_PollableSet::UnknownPollable *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::PollableSet::UnknownPollable *&); #ifndef __ACE_INLINE__ diff --git a/TAO/tao/Sequence.cpp b/TAO/tao/Sequence.cpp index b43ee0505d3..5038b29c4f1 100644 --- a/TAO/tao/Sequence.cpp +++ b/TAO/tao/Sequence.cpp @@ -68,7 +68,7 @@ TAO_Unbounded_String_Sequence (const TAO_Unbounded_String_Sequence &rhs) { if (rhs.buffer_ != 0) { - char* *tmp1 = + char* *tmp1 = TAO_Unbounded_String_Sequence::allocbuf (this->maximum_); char ** const tmp2 = @@ -290,11 +290,11 @@ TAO_Unbounded_WString_Sequence (const TAO_Unbounded_WString_Sequence &rhs) { if (rhs.buffer_ != 0) { - CORBA::WChar* *tmp1 = + CORBA::WChar* *tmp1 = TAO_Unbounded_WString_Sequence::allocbuf (this->maximum_); CORBA::WChar ** const tmp2 = - ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, + ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_); for (CORBA::ULong i = 0; i < rhs.length_; ++i) @@ -324,7 +324,7 @@ operator= (const TAO_Unbounded_WString_Sequence &rhs) if (this->release_) { - CORBA::WChar **tmp = ACE_reinterpret_cast (CORBA::WChar **, + CORBA::WChar **tmp = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) @@ -347,7 +347,7 @@ operator= (const TAO_Unbounded_WString_Sequence &rhs) TAO_Unbounded_Base_Sequence::operator= (rhs); - CORBA::WChar **tmp1 = ACE_reinterpret_cast (CORBA::WChar **, + CORBA::WChar **tmp1 = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_); CORBA::WChar ** const tmp2 = ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_); @@ -416,7 +416,7 @@ TAO_Unbounded_WString_Sequence::get_buffer (CORBA::Boolean orphan) } else { - result = ACE_reinterpret_cast (CORBA::WChar**, + result = ACE_reinterpret_cast (CORBA::WChar**, this->buffer_); } } @@ -426,7 +426,7 @@ TAO_Unbounded_WString_Sequence::get_buffer (CORBA::Boolean orphan) { // We set the state back to default and relinquish // ownership. - result = ACE_reinterpret_cast (CORBA::WChar**, + result = ACE_reinterpret_cast (CORBA::WChar**, this->buffer_); this->maximum_ = 0; this->length_ = 0; @@ -440,7 +440,7 @@ TAO_Unbounded_WString_Sequence::get_buffer (CORBA::Boolean orphan) const CORBA::WChar** TAO_Unbounded_WString_Sequence::get_buffer (void) const { - return ACE_reinterpret_cast (const CORBA::WChar** ACE_CAST_CONST, + return ACE_reinterpret_cast (const CORBA::WChar** ACE_CAST_CONST, this->buffer_); } @@ -451,7 +451,7 @@ TAO_Unbounded_WString_Sequence::_allocate_buffer (CORBA::ULong length) if (this->buffer_ != 0) { - CORBA::WChar* *old = ACE_reinterpret_cast (CORBA::WChar **, + CORBA::WChar* *old = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) @@ -477,7 +477,7 @@ TAO_Unbounded_WString_Sequence::_deallocate_buffer (void) if (this->buffer_ == 0 || this->release_ == 0) return; - CORBA::WChar **tmp = ACE_reinterpret_cast (CORBA::WChar **, + CORBA::WChar **tmp = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_); for (CORBA::ULong i = 0; @@ -496,7 +496,7 @@ void TAO_Unbounded_WString_Sequence::_shrink_buffer (CORBA::ULong nl, CORBA::ULong ol) { - CORBA::WChar **tmp = ACE_reinterpret_cast (CORBA::WChar **, + CORBA::WChar **tmp = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_); for (CORBA::ULong i = nl; i < ol; ++i) { @@ -515,17 +515,17 @@ TAO_Unbounded_Sequence (const TAO_Unbounded_Sequence<CORBA::Octet> &rhs) { if (rhs.buffer_ != 0) { - CORBA::Octet *tmp1 = + CORBA::Octet *tmp1 = TAO_Unbounded_Sequence<CORBA::Octet>::allocbuf (this->maximum_); - CORBA::Octet * const tmp2 = - ACE_reinterpret_cast (CORBA::Octet * ACE_CAST_CONST, + CORBA::Octet * const tmp2 = + ACE_reinterpret_cast (CORBA::Octet * ACE_CAST_CONST, rhs.buffer_); if (rhs.mb_ == 0) { - ACE_OS::memcpy (tmp1, - tmp2, + ACE_OS::memcpy (tmp1, + tmp2, this->length_); } else @@ -535,8 +535,8 @@ TAO_Unbounded_Sequence (const TAO_Unbounded_Sequence<CORBA::Octet> &rhs) i != 0; i = i->cont ()) { - ACE_OS::memcpy (tmp1 + offset, - i->rd_ptr (), + ACE_OS::memcpy (tmp1 + offset, + i->rd_ptr (), i->length ()); offset += i->length (); @@ -621,6 +621,13 @@ TAO_Unbounded_Sequence<CORBA::Octet>::~TAO_Unbounded_Sequence (void) } void +TAO_Unbounded_Sequence<CORBA::Octet>::_tao_any_destructor (void *x) +{ + TAO_Unbounded_Sequence<CORBA::Octet> *tmp = ACE_static_cast(TAO_Unbounded_Sequence<CORBA::Octet>*,x); + delete tmp; +} + +void TAO_Unbounded_Sequence<CORBA::Octet>::_allocate_buffer (CORBA::ULong length) { CORBA::Octet *tmp = TAO_Unbounded_Sequence<CORBA::Octet>::allocbuf (length); diff --git a/TAO/tao/Sequence.h b/TAO/tao/Sequence.h index 33edc95bd0e..8cecf838cbf 100644 --- a/TAO/tao/Sequence.h +++ b/TAO/tao/Sequence.h @@ -489,6 +489,10 @@ public: virtual ~TAO_Unbounded_Sequence (void); // see TAO_Unbounded_Sequence in "Sequence_T.h" + static void _tao_any_destructor (void*); + // Use in the implementation of insertion and extraction operators + // from CORBA::Any + TAO_Unbounded_Sequence (const TAO_Unbounded_Sequence<CORBA::Octet> &); TAO_Unbounded_Sequence<CORBA::Octet>& operator= (const TAO_Unbounded_Sequence<CORBA::Octet> &); // The copy constructor and assignment operators *do* copy the data, diff --git a/TAO/tao/Services.cpp b/TAO/tao/Services.cpp index 78e1f1f91e7..501cddbd6ed 100644 --- a/TAO/tao/Services.cpp +++ b/TAO/tao/Services.cpp @@ -252,46 +252,31 @@ CORBA::ServiceInformation::_tao_seq_ServiceDetail::~_tao_seq_ServiceDetail (void void operator<<= (CORBA::Any &_tao_any, const CORBA::ServiceDetail &_tao_elem) { - CORBA::ServiceDetail *_any_val; - ACE_NEW (_any_val, CORBA::ServiceDetail (_tao_elem)); - if (!_any_val) return; TAO_OutputCDR stream; stream << _tao_elem; - ACE_TRY_NEW_ENV - { - _tao_any._tao_replace (CORBA::_tc_ServiceDetail, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; + _tao_any._tao_replace (CORBA::_tc_ServiceDetail, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); } -void operator<<= (CORBA::Any &_tao_any, CORBA::ServiceDetail *_tao_elem) // non copying +void CORBA::ServiceDetail::_tao_any_destructor (void *x) { - ACE_TRY_NEW_ENV - { - TAO_OutputCDR stream; - stream << *_tao_elem; + CORBA::ServiceDetail *tmp = ACE_static_cast(CORBA::ServiceDetail*,x); + delete tmp; +} - _tao_any._tao_replace (CORBA::_tc_ServiceDetail, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY {} - ACE_ENDTRY; +void operator<<= (CORBA::Any &_tao_any, CORBA::ServiceDetail *_tao_elem) // non copying +{ + TAO_OutputCDR stream; + stream << *_tao_elem; + + _tao_any._tao_replace (CORBA::_tc_ServiceDetail, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + CORBA::ServiceDetail::_tao_any_destructor); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ServiceDetail *&_tao_elem) @@ -317,8 +302,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ServiceDetail *&_ CORBA::_tc_ServiceDetail, 1, _tao_elem, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::ServiceDetail::_tao_any_destructor); return 1; } else @@ -338,45 +322,30 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ServiceDetail *&_ void operator<<= (CORBA::Any &_tao_any, const CORBA::ServiceInformation &_tao_elem) // copying { - CORBA::ServiceInformation *_any_val; - ACE_NEW (_any_val, CORBA::ServiceInformation (_tao_elem)); - if (!_any_val) return; TAO_OutputCDR stream; stream << _tao_elem; - ACE_TRY_NEW_ENV - { - _tao_any._tao_replace (CORBA::_tc_ServiceInformation, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; + _tao_any._tao_replace (CORBA::_tc_ServiceInformation, + TAO_ENCAP_BYTE_ORDER, + stream.begin ()); +} + +void CORBA::ServiceInformation::_tao_any_destructor (void *x) +{ + CORBA::ServiceInformation *tmp = ACE_static_cast(CORBA::ServiceInformation*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, CORBA::ServiceInformation *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; - _tao_any._tao_replace (CORBA::_tc_ServiceDetail, + _tao_any._tao_replace (CORBA::_tc_ServiceInformation, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, _tao_elem, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY {} - ACE_ENDTRY; + CORBA::ServiceInformation::_tao_any_destructor); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ServiceInformation *&_tao_elem) @@ -402,8 +371,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::ServiceInformatio CORBA::_tc_ServiceInformation, 1, _tao_elem, - ACE_TRY_ENV); - ACE_TRY_CHECK; + CORBA::ServiceInformation::_tao_any_destructor); return 1; } else diff --git a/TAO/tao/Services.h b/TAO/tao/Services.h index c1815fb6b0d..60df394d137 100644 --- a/TAO/tao/Services.h +++ b/TAO/tao/Services.h @@ -33,6 +33,8 @@ struct TAO_Export CORBA_ServiceDetail { + static void _tao_any_destructor (void*); + CORBA::ServiceDetailType service_detail_type; #if !defined (_CORBA_SERVICEDETAIL__TAO_SEQ_OCTET_CH_) @@ -182,6 +184,7 @@ class CORBA_ServiceDetail_out struct CORBA_ServiceInformation { + static void _tao_any_destructor (void*); #if !defined (TAO_USE_SEQUENCE_TEMPLATES) diff --git a/TAO/tao/TAOC.cpp b/TAO/tao/TAOC.cpp index 7b309b53287..922a0ec5ac4 100644 --- a/TAO/tao/TAOC.cpp +++ b/TAO/tao/TAOC.cpp @@ -142,36 +142,26 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (TAO) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ClientPriorityPolicy, &_tc_TAO_tc_TAO_ClientPriorityPolicy) TAO_NAMESPACE_END + void operator<<= (CORBA::Any &_tao_any, const TAO::PrioritySpecification &_tao_elem) // copying { - TAO::PrioritySpecification *_any_val = 0; - ACE_NEW (_any_val, TAO::PrioritySpecification (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( TAO::_tc_PrioritySpecification, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void TAO::PrioritySpecification::_tao_any_destructor (void *x) +{ + TAO::PrioritySpecification *tmp = ACE_const_cast(TAO::PrioritySpecification*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TAO::PrioritySpecification *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -180,16 +170,8 @@ void operator<<= (CORBA::Any &_tao_any, TAO::PrioritySpecification *_tao_elem) / stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TAO::PrioritySpecification::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::PrioritySpecification *&_tao_elem) @@ -221,9 +203,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::PrioritySpecificati TAO::_tc_PrioritySpecification, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TAO::PrioritySpecification::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -237,7 +218,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::PrioritySpecificati { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -272,9 +253,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO::PrioritySpeci TAO::_tc_PrioritySpecification, 1, ACE_reinterpret_cast (void *, ACE_const_cast (TAO::PrioritySpecification *&, _tao_elem)), - ACE_TRY_ENV + TAO::PrioritySpecification::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -288,58 +268,45 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO::PrioritySpeci { delete ACE_const_cast (TAO::PrioritySpecification *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; } +void TAO::ClientPriorityPolicy::_tao_any_destructor (void *x) +{ + TAO::ClientPriorityPolicy *tmp = ACE_const_cast(TAO::ClientPriorityPolicy*,x); + CORBA::release (tmp); +} + 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; - ACE_TRY_NEW_ENV - { - ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr); - *_tao_obj_ptr = TAO::ClientPriorityPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - TAO::_tc_ClientPriorityPolicy, + TAO::_tc_ClientPriorityPolicy, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_obj_ptr, - ACE_TRY_ENV + _tao_elem, + TAO::ClientPriorityPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; } 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->equivalent (TAO::_tc_ClientPriorityPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -352,24 +319,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::ClientPriorityPolic { _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)->_tao_replace ( TAO::_tc_ClientPriorityPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + TAO::ClientPriorityPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = TAO::ClientPriorityPolicy::_nil (); return 0; } @@ -524,36 +484,26 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (TAO) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_BufferingConstraintPolicy, &_tc_TAO_tc_TAO_BufferingConstraintPolicy) TAO_NAMESPACE_END + void operator<<= (CORBA::Any &_tao_any, const TAO::BufferingConstraint &_tao_elem) // copying { - TAO::BufferingConstraint *_any_val = 0; - ACE_NEW (_any_val, TAO::BufferingConstraint (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( TAO::_tc_BufferingConstraint, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void TAO::BufferingConstraint::_tao_any_destructor (void *x) +{ + TAO::BufferingConstraint *tmp = ACE_const_cast(TAO::BufferingConstraint*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TAO::BufferingConstraint *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -562,16 +512,8 @@ void operator<<= (CORBA::Any &_tao_any, TAO::BufferingConstraint *_tao_elem) // stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TAO::BufferingConstraint::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::BufferingConstraint *&_tao_elem) @@ -603,9 +545,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::BufferingConstraint TAO::_tc_BufferingConstraint, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TAO::BufferingConstraint::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -619,7 +560,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::BufferingConstraint { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -654,9 +595,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO::BufferingCons TAO::_tc_BufferingConstraint, 1, ACE_reinterpret_cast (void *, ACE_const_cast (TAO::BufferingConstraint *&, _tao_elem)), - ACE_TRY_ENV + TAO::BufferingConstraint::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -670,58 +610,45 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TAO::BufferingCons { delete ACE_const_cast (TAO::BufferingConstraint *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; } +void TAO::BufferingConstraintPolicy::_tao_any_destructor (void *x) +{ + TAO::BufferingConstraintPolicy *tmp = ACE_const_cast(TAO::BufferingConstraintPolicy*,x); + CORBA::release (tmp); +} + 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; - ACE_TRY_NEW_ENV - { - ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr); - *_tao_obj_ptr = TAO::BufferingConstraintPolicy::_duplicate (_tao_elem); TAO_OutputCDR stream; - if (stream << *_tao_obj_ptr) + if (stream << _tao_elem) { _tao_any._tao_replace ( - TAO::_tc_BufferingConstraintPolicy, + TAO::_tc_BufferingConstraintPolicy, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, - _tao_obj_ptr, - ACE_TRY_ENV + _tao_elem, + TAO::BufferingConstraintPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; } - else - { - delete _tao_obj_ptr; - } - } - ACE_CATCHANY - { - delete _tao_obj_ptr; - } - ACE_ENDTRY; } 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->equivalent (TAO::_tc_BufferingConstraintPolicy, ACE_TRY_ENV)) // not equal { - delete tmp; return 0; } ACE_TRY_CHECK; @@ -734,24 +661,17 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TAO::BufferingConstraint { _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)->_tao_replace ( TAO::_tc_BufferingConstraintPolicy, 1, - tmp, - ACE_TRY_ENV + _tao_elem, + TAO::BufferingConstraintPolicy::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } - else // failure - { - delete tmp; - } } ACE_CATCHANY { - delete tmp; _tao_elem = TAO::BufferingConstraintPolicy::_nil (); return 0; } diff --git a/TAO/tao/TAOC.h b/TAO/tao/TAOC.h index ee90c5bdccf..47204183983 100644 --- a/TAO/tao/TAOC.h +++ b/TAO/tao/TAOC.h @@ -58,6 +58,8 @@ TAO_NAMESPACE TAO struct TAO_Export PrioritySpecification { + static void _tao_any_destructor (void*); + ACE_NESTED_CLASS (TAO, PrioritySelectionMode) mode; CORBA::Short min_priority; CORBA::Short max_priority; @@ -189,6 +191,7 @@ class TAO_Export ClientPriorityPolicy: public virtual CORBA::Policy { return (TAO::ClientPriorityPolicy_ptr)0; } + static void _tao_any_destructor (void*); virtual ACE_NESTED_CLASS (TAO, PrioritySpecification) priority_specification ( CORBA::Environment &ACE_TRY_ENV = @@ -233,6 +236,8 @@ class TAO_Export ClientPriorityPolicy: public virtual CORBA::Policy struct TAO_Export BufferingConstraint { + static void _tao_any_destructor (void*); + ACE_NESTED_CLASS (TAO, BufferingConstraintMode) mode; TimeBase::TimeT timeout; CORBA::ULong message_count; @@ -365,6 +370,7 @@ class TAO_Export BufferingConstraintPolicy: public virtual CORBA::Policy { return (TAO::BufferingConstraintPolicy_ptr)0; } + static void _tao_any_destructor (void*); virtual ACE_NESTED_CLASS (TAO, BufferingConstraint) buffering_constraint ( CORBA::Environment &ACE_TRY_ENV = @@ -421,33 +427,33 @@ TAO_NAMESPACE_CLOSE // module TAO #if (TAO_HAS_CORBA_MESSAGING == 1) -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TAO::PrioritySpecification &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO::PrioritySpecification*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO::PrioritySpecification *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const TAO::PrioritySpecification *&); // Any operators for interface TAO::ClientPriorityPolicy -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO::ClientPriorityPolicy_ptr); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO::ClientPriorityPolicy *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TAO::BufferingConstraint &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO::BufferingConstraint*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TAO::BufferingConstraint *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const TAO::BufferingConstraint *&); // Any operators for interface TAO::BufferingConstraintPolicy -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TAO::BufferingConstraintPolicy_ptr); -CORBA::Boolean operator>>= (const CORBA::Any &, +CORBA::Boolean operator>>= (const CORBA::Any &, TAO::BufferingConstraintPolicy *&); #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ diff --git a/TAO/tao/TimeBaseC.cpp b/TAO/tao/TimeBaseC.cpp index 2d0c76cb4b9..76ba10b4817 100644 --- a/TAO/tao/TimeBaseC.cpp +++ b/TAO/tao/TimeBaseC.cpp @@ -133,34 +133,23 @@ TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_IntervalT, &_tc_TAO_tc_TimeBase_I TAO_NAMESPACE_END void operator<<= (CORBA::Any &_tao_any, const TimeBase::UtcT &_tao_elem) // copying { - TimeBase::UtcT *_any_val = 0; - ACE_NEW (_any_val, TimeBase::UtcT (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( TimeBase::_tc_UtcT, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void TimeBase::UtcT::_tao_any_destructor (void *x) +{ + TimeBase::UtcT *tmp = ACE_static_cast (TimeBase::UtcT*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TimeBase::UtcT *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -169,16 +158,8 @@ void operator<<= (CORBA::Any &_tao_any, TimeBase::UtcT *_tao_elem) // non copyin stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TimeBase::UtcT::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TimeBase::UtcT *&_tao_elem) @@ -210,9 +191,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TimeBase::UtcT *&_tao_el TimeBase::_tc_UtcT, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TimeBase::UtcT::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -226,7 +206,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TimeBase::UtcT *&_tao_el { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -261,9 +241,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TimeBase::UtcT *&_ TimeBase::_tc_UtcT, 1, ACE_reinterpret_cast (void *, ACE_const_cast (TimeBase::UtcT *&, _tao_elem)), - ACE_TRY_ENV + TimeBase::UtcT::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -277,7 +256,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TimeBase::UtcT *&_ { delete ACE_const_cast (TimeBase::UtcT *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -285,34 +264,23 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TimeBase::UtcT *&_ void operator<<= (CORBA::Any &_tao_any, const TimeBase::IntervalT &_tao_elem) // copying { - TimeBase::IntervalT *_any_val = 0; - ACE_NEW (_any_val, TimeBase::IntervalT (_tao_elem)); - if (!_any_val) return; - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; - stream << *_any_val; + stream << _tao_elem; _tao_any._tao_replace ( TimeBase::_tc_IntervalT, TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _any_val, - ACE_TRY_ENV + stream.begin () ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _any_val; - } - ACE_ENDTRY; +} + +void TimeBase::IntervalT::_tao_any_destructor (void *x) +{ + TimeBase::IntervalT *tmp = ACE_static_cast (TimeBase::IntervalT*,x); + delete tmp; } void operator<<= (CORBA::Any &_tao_any, TimeBase::IntervalT *_tao_elem) // non copying { - ACE_TRY_NEW_ENV - { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( @@ -321,16 +289,8 @@ void operator<<= (CORBA::Any &_tao_any, TimeBase::IntervalT *_tao_elem) // non c stream.begin (), 1, _tao_elem, - ACE_TRY_ENV + TimeBase::IntervalT::_tao_any_destructor ); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TimeBase::IntervalT *&_tao_elem) @@ -362,9 +322,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TimeBase::IntervalT *&_t TimeBase::_tc_IntervalT, 1, ACE_reinterpret_cast (void *, _tao_elem), - ACE_TRY_ENV + TimeBase::IntervalT::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -378,7 +337,7 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, TimeBase::IntervalT *&_t { delete _tao_elem; _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; @@ -413,9 +372,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TimeBase::Interval TimeBase::_tc_IntervalT, 1, ACE_reinterpret_cast (void *, ACE_const_cast (TimeBase::IntervalT *&, _tao_elem)), - ACE_TRY_ENV + TimeBase::IntervalT::_tao_any_destructor ); - ACE_TRY_CHECK; return 1; } else @@ -429,9 +387,8 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const TimeBase::Interval { delete ACE_const_cast (TimeBase::IntervalT *&, _tao_elem); _tao_elem = 0; - return 0; + return 0; } ACE_ENDTRY; return 0; } - diff --git a/TAO/tao/TimeBaseC.h b/TAO/tao/TimeBaseC.h index cc7dcb931fc..58d1f504c5c 100644 --- a/TAO/tao/TimeBaseC.h +++ b/TAO/tao/TimeBaseC.h @@ -56,6 +56,8 @@ TAO_NAMESPACE TimeBase struct TAO_Export UtcT { + static void _tao_any_destructor (void*); + TimeT time; CORBA::ULong inacclo; CORBA::UShort inacchi; @@ -95,6 +97,8 @@ TAO_NAMESPACE TimeBase struct TAO_Export IntervalT { + static void _tao_any_destructor (void*); + TimeT lower_bound; TimeT upper_bound; }; @@ -134,21 +138,21 @@ TAO_NAMESPACE TimeBase } TAO_NAMESPACE_CLOSE // module TimeBase -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TimeBase::UtcT &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TimeBase::UtcT*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TimeBase::UtcT *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const TimeBase::UtcT *&); -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, const TimeBase::IntervalT &); // copying version -TAO_Export void operator<<= (CORBA::Any &, +TAO_Export void operator<<= (CORBA::Any &, TimeBase::IntervalT*); // noncopying version -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, TimeBase::IntervalT *&); -TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const TimeBase::IntervalT *&); #if defined (__ACE_INLINE__) diff --git a/TAO/tests/Param_Test/Param_Test.dsw b/TAO/tests/Param_Test/Param_Test.dsw index d17cf7c9604..531ee396bfd 100644 --- a/TAO/tests/Param_Test/Param_Test.dsw +++ b/TAO/tests/Param_Test/Param_Test.dsw @@ -1,41 +1,53 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "client"=.\client.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "server"=.\server.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
+Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Param_Test Anyop"=.\anyop.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Param_Test Client"=.\client.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "Param_Test Server"=.\server.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/TAO/tests/Param_Test/anyop.cpp b/TAO/tests/Param_Test/anyop.cpp index 9ae8a0f5c18..fc3f6870bb7 100644 --- a/TAO/tests/Param_Test/anyop.cpp +++ b/TAO/tests/Param_Test/anyop.cpp @@ -91,17 +91,16 @@ main (int argc, char *argv[]) CORBA::Object_var obj = orb->string_to_object ("IOR:010000001b00000049444c3a6f6d" "672e6f72672f506172616d5f54657374" - "3a312e30000001000000000000009000" - "000001010100130000006b656c766172" - "2e6563652e7563692e6564750000e404" - "00003000000014010f004e5550000000" - "130000000001000000006368696c645f" - "706f6100000000000100000070617261" - "6d5f7465737403000000000000000800" - "000001000000004f4154010000001400" - "00000108b54001000100000000000901" - "010000000000004f4154040000000108" - "0000", + "3a312e30000001000000000000008400" + "0000010101cd0a000000474c414d4452" + "494e47008f053000000014010f004e55" + "50000000130000000001000000006368" + "696c645f706f61000000000001000000" + "706172616d5f74657374030000000000" + "00000800000001cdcdcd004f41540100" + "00001400000001cdcdcd010001000000" + "00000901010000000000004f41540400" + "000001cd0000", ACE_TRY_ENV); ACE_TRY_CHECK; @@ -110,7 +109,7 @@ main (int argc, char *argv[]) ACE_TRY_ENV); ACE_TRY_CHECK; - any <<= param_test.in (); + any <<= Param_Test::_duplicate (param_test.in ()); Param_Test_ptr o; if (!(any >>= o)) diff --git a/TAO/tests/Param_Test/anyop.dsp b/TAO/tests/Param_Test/anyop.dsp new file mode 100644 index 00000000000..5a748b6144d --- /dev/null +++ b/TAO/tests/Param_Test/anyop.dsp @@ -0,0 +1,201 @@ +# Microsoft Developer Studio Project File - Name="Param_Test Anyop" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Param_Test Anyop - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "anyop.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "anyop.mak" CFG="Param_Test Anyop - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Param_Test Anyop - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Param_Test Anyop - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Param_Test Anyop - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib tao.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+
+!ELSEIF "$(CFG)" == "Param_Test Anyop - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX /Yc /Yu
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\tao" /libpath:"..\..\..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Param_Test Anyop - Win32 Release"
+# Name "Param_Test Anyop - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ".cpp"
+# Begin Source File
+
+SOURCE=.\anyop.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\param_testCli.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ".h"
+# Begin Source File
+
+SOURCE=.\Param_TestCli.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter ".i"
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter ".idl"
+# Begin Source File
+
+SOURCE=.\param_test.idl
+
+!IF "$(CFG)" == "Param_Test Anyop - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__PARAM="..\..\..\bin\Release\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL Compiler
+InputPath=.\param_test.idl
+InputName=param_test
+
+BuildCmds= \
+ ..\..\..\bin\Release\tao_idl -Ge 1 -hc Cli.h -hs Ser.h -hT Ser_T.h -cs Cli.cpp -ci Cli.i -ss Ser.cpp -sT Ser_T.cpp -si Ser.i -st Ser_T.i $(InputName).idl
+
+"$(InputName)Cli.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Cli.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Cli.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "Param_Test Anyop - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__PARAM="..\..\..\bin\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL Compiler
+InputPath=.\param_test.idl
+InputName=param_test
+
+BuildCmds= \
+ ..\..\..\bin\tao_idl -Ge 1 -hc Cli.h -hs Ser.h -hT Ser_T.h -cs Cli.cpp -ci Cli.i -ss Ser.cpp -sT Ser_T.cpp -si Ser.i -st Ser_T.i $(InputName).idl
+
+"$(InputName)Cli.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Cli.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Cli.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)Ser_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
|