diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-09 16:12:57 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-09 16:12:57 +0000 |
commit | 28cd37273c62317e83c67928dae5decb0544daf1 (patch) | |
tree | 2c42bc17e39cc684bcf57b03eb84ff0c32b000e1 | |
parent | 0c98841e68cbf1ee80683c713ccc6359d51ff4a5 (diff) | |
download | ATCD-28cd37273c62317e83c67928dae5decb0544daf1.tar.gz |
ChangeLogTag: Wed Jul 9 11:10:20 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog_ref | 23 | ||||
-rw-r--r-- | TAO/TAO_IDL/ast/ast_decl.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/ast/ast_string.cpp | 38 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_codegen.cpp | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation.cpp | 177 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp | 30 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_traits.cpp | 7 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_visitor_operation/operation.h | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/ast_decl.h | 6 | ||||
-rw-r--r-- | TAO/tests/Bench/wire/client.dsp | 13 | ||||
-rw-r--r-- | TAO/tests/Bench/wire/test.idl | 6 | ||||
-rw-r--r-- | TAO/tests/Bench/wire/testC.cpp | 981 | ||||
-rw-r--r-- | TAO/tests/Bench/wire/testC.h | 252 | ||||
-rw-r--r-- | TAO/tests/Bench/wire/testC.i | 58 | ||||
-rw-r--r-- | TAO/tests/Bench/wire/testS.cpp | 384 | ||||
-rw-r--r-- | TAO/tests/Bench/wire/testS.h | 30 |
17 files changed, 1547 insertions, 475 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref index 10e203628fd..c8c5575b35a 100644 --- a/TAO/ChangeLog_ref +++ b/TAO/ChangeLog_ref @@ -1,3 +1,26 @@ +Wed Jul 9 11:10:20 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/ast/ast_decl.cpp: + * TAO_IDL/ast/ast_string.cpp: + * TAO_IDL/be/be_codegen.cpp: + * TAO_IDL/be/be_visitor_traits.cpp: + * TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp: + * TAO_IDL/be/be_visitor_operation/operation.cpp: + * TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp: + * TAO_IDL/be_include/be_visitor_operation/operation.h: + * TAO_IDL/include/ast_decl.h: + * tests/Bench/wire/client.dsp: + * tests/Bench/wire/test.idl: + * tests/Bench/wire/testC.cpp: + * tests/Bench/wire/testC.h: + * tests/Bench/wire/testC.i: + * tests/Bench/wire/testS.cpp: + * tests/Bench/wire/testS.h: + + Changes to generated code, and the hand-crafted + example, to deal with exceptions, oneways and + AMI flags in the invoke() parameter list. + Tue Jul 8 22:44:44 2003 Jeff Parsons <j.parsons@vanderbilt.edu> * tests/Bench/Bench.dsw: diff --git a/TAO/TAO_IDL/ast/ast_decl.cpp b/TAO/TAO_IDL/ast/ast_decl.cpp index 98c87780efe..9915392c27d 100644 --- a/TAO/TAO_IDL/ast/ast_decl.cpp +++ b/TAO/TAO_IDL/ast/ast_decl.cpp @@ -122,6 +122,7 @@ COMMON_Base::destroy (void) AST_Decl::AST_Decl (void) : COMMON_Base (), repoID_ (0), + flat_name_ (0), contains_wstring_ (-1), pd_imported (I_FALSE), pd_in_main_file (I_FALSE), @@ -137,7 +138,6 @@ AST_Decl::AST_Decl (void) version_ (0), anonymous_ (I_FALSE), typeid_set_ (I_FALSE), - flat_name_ (0), last_referenced_as_ (0), prefix_scope_ (0) { @@ -148,6 +148,7 @@ AST_Decl::AST_Decl (NodeType nt, idl_bool anonymous) : COMMON_Base (), repoID_ (0), + flat_name_ (0), contains_wstring_ (-1), pd_imported (idl_global->imported ()), pd_in_main_file (idl_global->in_main_file ()), @@ -166,7 +167,6 @@ AST_Decl::AST_Decl (NodeType nt, version_ (0), anonymous_ (anonymous), typeid_set_ (I_FALSE), - flat_name_ (0), last_referenced_as_ (0), prefix_scope_ (0) { diff --git a/TAO/TAO_IDL/ast/ast_string.cpp b/TAO/TAO_IDL/ast/ast_string.cpp index 2ca33407e3d..7e614ed8a89 100644 --- a/TAO/TAO_IDL/ast/ast_string.cpp +++ b/TAO/TAO_IDL/ast/ast_string.cpp @@ -72,6 +72,9 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_string.h" #include "ast_expression.h" #include "ast_visitor.h" +#include "utl_identifier.h" +#include "idl_defines.h" +#include "global_extern.h" ACE_RCSID (ast, ast_string, @@ -106,6 +109,41 @@ AST_String::AST_String (AST_Decl::NodeType nt, { // Always the case. this->size_type (AST_Type::VARIABLE); + + Identifier *id = 0; + UTL_ScopedName *new_name = 0; + UTL_ScopedName *conc_name = 0; + + ACE_NEW (id, + Identifier (this->width () == 1 ? "Char *" : "WChar *")); + + ACE_NEW (conc_name, + UTL_ScopedName (id, + 0)); + + ACE_NEW (id, + Identifier ("CORBA")); + + ACE_NEW (new_name, + UTL_ScopedName (id, + conc_name)); + + this->set_name (new_name); + + unsigned long bound = ms->ev ()->u.ulval; + + if (bound > 0) + { + static char namebuf[NAMEBUFSIZE]; + ACE_OS::memset (namebuf, + '\0', + NAMEBUFSIZE); + ACE_OS::sprintf (namebuf, + "CORBA_%sSTRING_%d", + (wide == 1 ? "" : "W"), + bound); + this->flat_name_ = ACE::strnew (namebuf); + } } AST_String::~AST_String (void) diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index 29642decbfa..bbe43ebb6b8 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -1380,6 +1380,7 @@ TAO_CodeGen::gen_stub_src_includes (void) << "\""; this->gen_standard_include (this->client_stubs_, "tao/Stub.h"); + this->gen_standard_include (this->client_stubs_, "tao/Invocation_Base.h"); this->gen_standard_include (this->client_stubs_, "tao/Invocation.h"); // The following header must always be included. diff --git a/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp index 0a8a34ad455..8f026a892a0 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/exceptlist_cs.cpp @@ -46,10 +46,8 @@ be_visitor_operation_exceptlist_cs::visit_operation (be_operation *node) // Don't do anything if the exception list is empty. if (node->exceptions ()) { - os->indent (); - *os << "static TAO_Exception_Data " << "_tao_" << node->flat_name () - << "_exceptiondata [] = " << be_nl; + << "_exceptiondata [] = " << be_idt_nl; *os << "{" << be_idt_nl; AST_Decl *d = 0; @@ -72,11 +70,11 @@ be_visitor_operation_exceptlist_cs::visit_operation (be_operation *node) if (!ei.is_done ()) { - *os << "," << be_nl; + *os << "," << be_nl << be_nl; } } - *os << be_uidt_nl << "};\n\n"; + *os << be_uidt_nl << "};" << be_uidt_nl << be_nl; } return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp index 995840b607f..70643631c07 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp @@ -422,24 +422,122 @@ be_visitor_operation::gen_stub_operation_body ( } } - // Declare return type. - ctx = *this->ctx_; - be_visitor_operation_rettype_vardecl_cs rd_visitor (&ctx); + // Declare return type helper class. + + *os << "TAO::Arg_Traits<"; + + this->gen_arg_template_param_name (return_type, os); + + *os << ">::stub_ret_val _tao_retval;"; + + // Declare the argument helper classes. - if (return_type->accept (&rd_visitor) == -1) + AST_Argument *arg = 0; + + for (UTL_ScopeActiveIterator arg_decl_iter (node, UTL_Scope::IK_decls); + ! arg_decl_iter.is_done (); + arg_decl_iter.next ()) { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_remote_proxy_impl_cs::" - "visit_operation - " - "codegen for return var decl failed\n"), - -1); + arg = AST_Argument::narrow_from_decl (arg_decl_iter.item ()); + + *os << be_nl + << "TAO::Arg_Traits<"; + + this->gen_arg_template_param_name (arg->field_type (), os); + + *os << ">::"; + + switch (arg->direction ()) + { + case AST_Argument::dir_IN: + *os << "in"; + break; + case AST_Argument::dir_INOUT: + *os << "inout"; + break; + case AST_Argument::dir_OUT: + *os << "out"; + default: + break; + } + + *os << "_arg_val _tao_" << arg->local_name () << " (" + << arg->local_name () << ");"; } - if (node->void_return_type () == 0) + *os << be_nl << be_nl + << "TAO::Argument *_tao_signature [] =" << be_idt_nl + << "{" << be_idt_nl + << "&_tao_retval"; + + for (UTL_ScopeActiveIterator arg_list_iter (node, UTL_Scope::IK_decls); + ! arg_list_iter.is_done (); + arg_list_iter.next ()) { - *os << be_nl; + arg = AST_Argument::narrow_from_decl (arg_list_iter.item ()); + + *os << "," << be_nl + << "&_tao_" << arg->local_name (); + } + + *os << be_uidt_nl + << "};" << be_uidt; + + *os << be_nl << be_nl + << "TAO::Invocation_Base _tao_call (" << be_idt << be_idt_nl + << "_collocated_tao_target_," << be_nl + << "_tao_signature," << be_nl + << node->argument_count () + 1 << "," << be_nl + << "\"" << node->local_name () << "\"," << be_nl + << ACE_OS::strlen (node->local_name ()->get_string ()); + + if (node->flags () == AST_Operation::OP_oneway) + { + *os << "," << be_nl + << "TAO::TAO_ONEWAY_INVOCATION"; + } + + if (be_global->ami_call_back ()) + { + *os << "," << be_nl + << "TAO::TAO_ASYNCHRONOUS_CALLBACK_INVOCATION"; + } + + *os << be_uidt_nl + << ");" << be_uidt; + + *os << be_nl << be_nl; + + // Since oneways cannot raise user exceptions, we have that + // case covered as well. + if (node->exceptions ()) + { + *os << "_tao_call.invoke (" << be_idt << be_idt_nl + << "_tao_" << node->flat_name () + << "_exceptiondata," << be_nl + << node->exceptions ()->length () << be_nl + << "ACE_ENV_ARG_PARAMETER" << be_uidt_nl + << ");" << be_uidt; + } + else + { + *os << "_tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);"; + } + + *os << be_nl; + + if (this->void_return_type (return_type)) + { + *os << "ACE_CHECK;"; + } + else + { + *os << "ACE_CHECK_RETURN (_tao_retval.excp ());"; } + // Temporary hack until we finish code generation refactoring. + *os << "\n\n#if 0" << be_nl << be_nl; + if (node->has_native ()) // native exists => no stub { if (this->gen_raise_exception (return_type, @@ -526,32 +624,15 @@ be_visitor_operation::gen_stub_operation_body ( ), -1 ); - } + // Temporary hack until we finish refactoring the code generation. + *os << "\n\n#endif /* 0 */"; + if (!this->void_return_type (return_type)) { - AST_Decl::NodeType nt = return_type->node_type (); - - if (nt == AST_Decl::NT_typedef) - { - AST_Typedef *td = AST_Typedef::narrow_from_decl (return_type); - AST_Type *t = td->primitive_base_type (); - nt = t->node_type (); - } - - *os << be_nl << be_nl; - - // Now generate the normal successful return statement. - if (return_type->size_type () == AST_Type::VARIABLE - || nt == AST_Decl::NT_array) - { - *os << "return _tao_retval._retn ();"; - } - else - { - *os << "return _tao_retval;"; - } + *os << be_nl << be_nl + << "return _tao_retval.retn ();"; } } // end of if (!native) @@ -1278,7 +1359,7 @@ be_visitor_operation::gen_marshal_and_invoke ( *os << be_nl << "if (_invoke_status != TAO_INVOKE_RESTART)" << be_idt_nl << "break;" << be_uidt << be_uidt << be_uidt_nl - << "}" << be_uidt << be_uidt; + << "}" << be_uidt; return 0; } @@ -1377,3 +1458,31 @@ be_visitor_operation::compute_operation_name ( return this->operation_name_; } + +void +be_visitor_operation::gen_arg_template_param_name (AST_Type *bt, + TAO_OutStream *os) +{ + AST_Decl::NodeType nt = bt->node_type (); + + if (nt == AST_Decl::NT_typedef) + { + AST_Typedef *td = AST_Typedef::narrow_from_decl (bt); + AST_Type *pbt = td->primitive_base_type (); + nt = pbt->node_type (); + + if (nt == AST_Decl::NT_string) + { + AST_String *s = AST_String::narrow_from_decl (pbt); + unsigned long bound = s->max_size ()->ev ()->u.ulval; + + if (bound > 0) + { + *os << "TAO::" << td->local_name () << "_" << bound; + return; + } + } + } + + *os << bt->name (); +} diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp index 8dd768e1899..b6a5ad60a2d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp @@ -43,18 +43,18 @@ int be_visitor_operation_rettype_vardecl_cs::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt; - if (this->ctx_->alias ()) + *os << be_idt_nl + << node->name () << "," << be_nl + << node->name () << "_slice," << be_nl + << node->name () << "_var," << be_nl; + + if (node->size_type () == AST_Type::VARIABLE) { - bt = this->ctx_->alias (); - } - else - { - bt = node; + *os << node->name () << "_out," << be_nl; } - *os << bt->name () << "_var _tao_retval;"; + *os << node->name () << "_forany" << be_uidt_nl; return 0; } @@ -74,7 +74,7 @@ be_visitor_operation_rettype_vardecl_cs::visit_enum (be_enum *node) bt = node; } - *os << bt->name () << " _tao_retval = (" << bt->name () << ")0;"; + *os << bt->name (); return 0; } @@ -266,15 +266,15 @@ be_visitor_operation_rettype_vardecl_cs::visit_string (be_string *node) { TAO_OutStream *os = this->ctx_->stream (); // grab the out stream - if (node->width () == (long) sizeof (char)) - { - *os << "CORBA::String_var _tao_retval;"; - } - else + *os << "CORBA::"; + + if (node->width () != (long) sizeof (char)) { - *os << "CORBA::WString_var _tao_retval;"; + *os << "W"; } + *os << "Char *"; + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index 62b30ce928b..ec7b4a6d1a6 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -374,10 +374,15 @@ be_visitor_traits::visit_string (be_string *node) os->gen_ifdef_macro (node->flat_name (), "arg_traits"); + // A workaround since bounded (w)strings are all generated as typedefs + // of (w)char *. + *os << be_nl << be_nl + << "struct " << alias->local_name () << "_" << bound << " {};"; + *os << be_nl << be_nl << "ACE_TEMPLATE_SPECIALIZATION" << be_nl << "class " << be_global->stub_export_macro () << " Arg_Traits<" - << alias->name () << ">" << be_idt_nl + << alias->local_name () << "_" << bound << ">" << be_idt_nl << ": public" << be_idt << be_idt_nl << "BD_" << (wide ? "W" : "") << "String_Arg_Traits<" << bound << ">" diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/operation.h b/TAO/TAO_IDL/be_include/be_visitor_operation/operation.h index 9aca9919467..460a06ec0b9 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/operation.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/operation.h @@ -110,6 +110,10 @@ public: // _does_ include the double quote. private: + void gen_arg_template_param_name (AST_Type *bt, + TAO_OutStream *os); + +private: char *operation_name_; }; diff --git a/TAO/TAO_IDL/include/ast_decl.h b/TAO/TAO_IDL/include/ast_decl.h index 1f77b7bb8eb..54d58590808 100644 --- a/TAO/TAO_IDL/include/ast_decl.h +++ b/TAO/TAO_IDL/include/ast_decl.h @@ -284,6 +284,9 @@ protected: char *repoID_; // Repository ID. + char *flat_name_; + // Flattened fully scoped name. + int contains_wstring_; // If we are a scope, do we contain a wstring at some level? @@ -344,9 +347,6 @@ private: idl_bool typeid_set_; // Has our repo id been set by a typeId declaration? - char *flat_name_; - // Flattened fully scoped name. - UTL_ScopedName *last_referenced_as_; // Temporary holder of the most recent way we were reference. // The top level component of this is added to pd_name_referenced. diff --git a/TAO/tests/Bench/wire/client.dsp b/TAO/tests/Bench/wire/client.dsp index 3dbda27d114..70a480728eb 100644 --- a/TAO/tests/Bench/wire/client.dsp +++ b/TAO/tests/Bench/wire/client.dsp @@ -65,8 +65,8 @@ LINK32=link.exe # PROP Intermediate_Dir ""
# 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" /YX /FD /c
+# 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" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -124,7 +124,14 @@ SOURCE=.\test.idl !ELSEIF "$(CFG)" == "client - Win32 Debug"
-# PROP Exclude_From_Build 1
+# Begin Custom Build
+InputPath=.\test.idl
+InputName=test
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ tao_idl -Ge 1 $(InputPath)
+
+# End Custom Build
!ENDIF
diff --git a/TAO/tests/Bench/wire/test.idl b/TAO/tests/Bench/wire/test.idl index e7d04ef7126..47583445eff 100644 --- a/TAO/tests/Bench/wire/test.idl +++ b/TAO/tests/Bench/wire/test.idl @@ -1,11 +1,15 @@ // $Id$ +exception one_bad {}; +exception two_bad {}; + interface foo { string all_str (in string inarg, inout string inoutarg, - out string outarg); + out string outarg) + raises (one_bad, two_bad); oneway void push (in string inarg); diff --git a/TAO/tests/Bench/wire/testC.cpp b/TAO/tests/Bench/wire/testC.cpp index e38aeabbf82..d83f675ab0b 100644 --- a/TAO/tests/Bench/wire/testC.cpp +++ b/TAO/tests/Bench/wire/testC.cpp @@ -26,7 +26,7 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:351 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:301 #include "testC.h" @@ -41,8 +41,8 @@ #include "tao/ClientInterceptorAdapter.h" #endif /* TAO_HAS_INTERCEPTORS == 1 */ -#include "tao/UB_String_Arguments.h" #include "tao/Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" #if defined (__BORLANDC__) #pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig @@ -52,8 +52,308 @@ #include "testC.i" #endif /* !defined INLINE */ +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/exception_cs.cpp:63 + +one_bad::one_bad (void) + : CORBA::UserException ( + "IDL:one_bad:1.0", + "one_bad" + ) +{ +} + +one_bad::~one_bad (void) +{ +} + +one_bad::one_bad (const ::one_bad &_tao_excp) + : CORBA::UserException ( + _tao_excp._rep_id (), + _tao_excp._name () + ) +{ +} + +one_bad& +one_bad::operator= (const ::one_bad &_tao_excp) +{ + this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp); + return *this; +} + +void one_bad::_tao_any_destructor (void *_tao_void_pointer) +{ + one_bad *tmp = ACE_static_cast (one_bad*, _tao_void_pointer); + delete tmp; +} + +one_bad * +one_bad::_downcast (CORBA::Exception *_tao_excp) +{ + if (!ACE_OS::strcmp ("IDL:one_bad:1.0", _tao_excp->_rep_id ())) + { + return ACE_dynamic_cast (one_bad *, _tao_excp); + } + else + { + return 0; + } +} + +CORBA::Exception *one_bad::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::one_bad, 0); + return retval; +} + +CORBA::Exception * +one_bad::_tao_duplicate (void) const +{ + CORBA::Exception *result; + ACE_NEW_RETURN ( + result, + ::one_bad (*this), + 0 + ); + return result; +} + +void one_bad::_raise (void) +{ + TAO_RAISE (*this); +} + +void one_bad::_tao_encode ( + TAO_OutputCDR &cdr + ACE_ENV_ARG_DECL + ) const +{ + if (cdr << *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +void one_bad::_tao_decode ( + TAO_InputCDR &cdr + ACE_ENV_ARG_DECL + ) +{ + if (cdr >> *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the virtual _type method. +CORBA::TypeCode_ptr one_bad::_type (void) const +{ + return ::_tc_one_bad; +} + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_defn.cpp:284 + +static const CORBA::Long _oc_one_bad[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 16, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6e655f), + ACE_NTOHL (0x6261643a), + ACE_NTOHL (0x312e3000), // repository ID = IDL:one_bad:1.0 + 8, + ACE_NTOHL (0x6f6e655f), + ACE_NTOHL (0x62616400), // name = one_bad + 0, // member count + }; + +static CORBA::TypeCode _tc_TAO_tc_one_bad ( + CORBA::tk_except, + sizeof (_oc_one_bad), + (char *) &_oc_one_bad, + 0, + sizeof (one_bad) + ); + +::CORBA::TypeCode_ptr _tc_one_bad = + &_tc_TAO_tc_one_bad; + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/exception_cs.cpp:63 + +two_bad::two_bad (void) + : CORBA::UserException ( + "IDL:two_bad:1.0", + "two_bad" + ) +{ +} + +two_bad::~two_bad (void) +{ +} + +two_bad::two_bad (const ::two_bad &_tao_excp) + : CORBA::UserException ( + _tao_excp._rep_id (), + _tao_excp._name () + ) +{ +} + +two_bad& +two_bad::operator= (const ::two_bad &_tao_excp) +{ + this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp); + return *this; +} + +void two_bad::_tao_any_destructor (void *_tao_void_pointer) +{ + two_bad *tmp = ACE_static_cast (two_bad*, _tao_void_pointer); + delete tmp; +} + +two_bad * +two_bad::_downcast (CORBA::Exception *_tao_excp) +{ + if (!ACE_OS::strcmp ("IDL:two_bad:1.0", _tao_excp->_rep_id ())) + { + return ACE_dynamic_cast (two_bad *, _tao_excp); + } + else + { + return 0; + } +} + +CORBA::Exception *two_bad::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::two_bad, 0); + return retval; +} + +CORBA::Exception * +two_bad::_tao_duplicate (void) const +{ + CORBA::Exception *result; + ACE_NEW_RETURN ( + result, + ::two_bad (*this), + 0 + ); + return result; +} + +void two_bad::_raise (void) +{ + TAO_RAISE (*this); +} + +void two_bad::_tao_encode ( + TAO_OutputCDR &cdr + ACE_ENV_ARG_DECL + ) const +{ + if (cdr << *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +void two_bad::_tao_decode ( + TAO_InputCDR &cdr + ACE_ENV_ARG_DECL + ) +{ + if (cdr >> *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the virtual _type method. +CORBA::TypeCode_ptr two_bad::_type (void) const +{ + return ::_tc_two_bad; +} + // TAO_IDL - Generated from -// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_cs.cpp:63 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_defn.cpp:284 + +static const CORBA::Long _oc_two_bad[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 16, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x74776f5f), + ACE_NTOHL (0x6261643a), + ACE_NTOHL (0x312e3000), // repository ID = IDL:two_bad:1.0 + 8, + ACE_NTOHL (0x74776f5f), + ACE_NTOHL (0x62616400), // name = two_bad + 0, // member count + }; + +static CORBA::TypeCode _tc_TAO_tc_two_bad ( + CORBA::tk_except, + sizeof (_oc_two_bad), + (char *) &_oc_two_bad, + 0, + sizeof (two_bad) + ); + +::CORBA::TypeCode_ptr _tc_two_bad = + &_tc_TAO_tc_two_bad; + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for foo. + +foo_ptr +TAO::Objref_Traits<foo>::tao_duplicate ( + foo_ptr p + ) +{ + return foo::_duplicate (p); +} + +void +TAO::Objref_Traits<foo>::tao_release ( + foo_ptr p + ) +{ + CORBA::release (p); +} + +foo_ptr +TAO::Objref_Traits<foo>::tao_nil (void) +{ + return foo::_nil (); +} + +CORBA::Boolean +TAO::Objref_Traits<foo>::tao_marshal ( + foo_ptr p, + TAO_OutputCDR & cdr + ) +{ + return p->marshal (cdr); +} + int foo::_tao_class_id = 0; foo_ptr @@ -152,33 +452,33 @@ public: virtual Dynamic::ParameterList * arguments (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual Dynamic::ExceptionList * exceptions (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual CORBA::Any * result (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); void result (char * result); - + private: TAO_ClientRequestInfo_foo_all_str (const TAO_ClientRequestInfo_foo_all_str &); void operator= (const TAO_ClientRequestInfo_foo_all_str &); const char * inarg_; char * inoutarg_; - + char * _result; }; - + // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_cs.cpp:376 - + TAO_ClientRequestInfo_foo_all_str::TAO_ClientRequestInfo_foo_all_str ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, const char * inarg, char *& inoutarg - ACE_ENV_ARG_DECL_NOT_USED + ACE_ENV_ARG_DECL_NOT_USED ) : TAO_ClientRequestInfo_i (_tao_invocation, _tao_target), inarg_ (inarg), @@ -193,19 +493,19 @@ TAO_ClientRequestInfo_foo_all_str::arguments (ACE_ENV_SINGLE_ARG_DECL) Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + Dynamic::ParameterList_var safe_parameter_list = parameter_list; - + parameter_list->length (2); CORBA::ULong len = 0; (*parameter_list)[len].argument <<= inarg_; (*parameter_list)[len].mode = CORBA::PARAM_IN; len++; - + (*parameter_list)[len].argument <<= inoutarg_; (*parameter_list)[len].mode = CORBA::PARAM_INOUT; len++; - + return safe_parameter_list._retn (); } @@ -217,11 +517,27 @@ TAO_ClientRequestInfo_foo_all_str::exceptions (ACE_ENV_SINGLE_ARG_DECL) Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); + + Dynamic::ExceptionList_var safe_exception_list = exception_list; + + static CORBA::TypeCode_ptr _tao_foo_all_str_exceptiondata[] = + { + _tc_one_bad, + _tc_two_bad + }; + + exception_list->length (2); + for (CORBA::ULong i = 0; i < 2; ++i) + { + CORBA::TypeCode_ptr tcp = _tao_foo_all_str_exceptiondata[i]; + TAO_Pseudo_Object_Manager<CORBA::TypeCode, CORBA::TypeCode_var> tcp_object (&tcp, 1); + (*exception_list)[i] = tcp_object; + } - return exception_list; + return safe_exception_list._retn (); } -CORBA::Any * +CORBA::Any * TAO_ClientRequestInfo_foo_all_str::result (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -230,20 +546,22 @@ TAO_ClientRequestInfo_foo_all_str::result (ACE_ENV_SINGLE_ARG_DECL) CORBA::Any *result_any = TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + CORBA::Any_var safe_result_any = result_any; - + (*result_any) <<= this->_result; return safe_result_any._retn (); } -void +void TAO_ClientRequestInfo_foo_all_str::result (char * result) { - // Update the result. + // Update the result. this->_result = result; } +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_cs.cpp:76 class TAO_ClientRequestInfo_foo_push : public TAO_ClientRequestInfo_i { @@ -256,10 +574,10 @@ public: virtual Dynamic::ParameterList * arguments (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual Dynamic::ExceptionList * exceptions (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual CORBA::Any * result (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); @@ -268,15 +586,15 @@ public: void operator= (const TAO_ClientRequestInfo_foo_push &); const char * inarg_; }; - + // TAO_IDL - Generated from - // be/be_visitor_operation/interceptors_cs.cpp:376 - + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_cs.cpp:376 + TAO_ClientRequestInfo_foo_push::TAO_ClientRequestInfo_foo_push ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, const char * inarg - ACE_ENV_ARG_DECL_NOT_USED + ACE_ENV_ARG_DECL_NOT_USED ) : TAO_ClientRequestInfo_i (_tao_invocation, _tao_target), inarg_ (inarg) @@ -290,15 +608,15 @@ TAO_ClientRequestInfo_foo_push::arguments (ACE_ENV_SINGLE_ARG_DECL) Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + Dynamic::ParameterList_var safe_parameter_list = parameter_list; - + parameter_list->length (1); CORBA::ULong len = 0; (*parameter_list)[len].argument <<= inarg_; (*parameter_list)[len].mode = CORBA::PARAM_IN; len++; - + return safe_parameter_list._retn (); } @@ -310,11 +628,11 @@ TAO_ClientRequestInfo_foo_push::exceptions (ACE_ENV_SINGLE_ARG_DECL) Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + return exception_list; } -CORBA::Any * +CORBA::Any * TAO_ClientRequestInfo_foo_push::result (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { @@ -323,7 +641,7 @@ TAO_ClientRequestInfo_foo_push::result (ACE_ENV_SINGLE_ARG_DECL) CORBA::Any *result_any = TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + return result_any; } @@ -335,7 +653,7 @@ TAO_ClientRequestInfo_foo_push::result (ACE_ENV_SINGLE_ARG_DECL) // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/remote_proxy_impl_cs.cpp:31 /////////////////////////////////////////////////////////////////////// -// Base & Remote Proxy Implementation. +// Base & Remote Proxy Implementation. // _TAO_foo_Proxy_Impl::_TAO_foo_Proxy_Impl (void) @@ -358,38 +676,60 @@ char * _TAO_foo_Remote_Proxy_Impl::all_str ( ) ACE_THROW_SPEC (( CORBA::SystemException + , one_bad + , two_bad )) { + static TAO_Exception_Data _tao_foo_all_str_exceptiondata [] = + { + { + "IDL:one_bad:1.0", + one_bad::_alloc + }, + + { + "IDL:two_bad:1.0", + two_bad::_alloc + } + }; + TAO::Arg_Traits<CORBA::Char *>::stub_ret_val _tao_retval; TAO::Arg_Traits<CORBA::Char *>::in_arg_val _tao_inarg (inarg); TAO::Arg_Traits<CORBA::Char *>::inout_arg_val _tao_inoutarg (inoutarg); TAO::Arg_Traits<CORBA::Char *>::out_arg_val _tao_outarg (outarg); - + TAO::Argument *_tao_signature [] = - { - &_tao_retval, - &_tao_inarg, - &_tao_inoutarg, - &_tao_outarg - }; - - TAO::Invocation_Base _tao_call (_collocated_tao_target_, - _tao_signature, - 4, //arg number - "all_str", - 7); - - _tao_call.invoke (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (_tao_retval.retn ()); + { + &_tao_retval, + &_tao_inarg, + &_tao_inoutarg, + &_tao_outarg + }; + + TAO::Invocation_Base _tao_call ( + _collocated_tao_target_, + _tao_signature, + 4, + "all_str", + 7 + ); + + _tao_call.invoke ( + _tao_foo_all_str_exceptiondata, + 2 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (_tao_retval.excp ()); #if 0 + TAO_Stub *istub = _collocated_tao_target_->_stubobj (); - + if (istub == 0) { - ACE_THROW_RETURN (CORBA::INTERNAL (),_tao_retval.excp ()); + ACE_THROW_RETURN (CORBA::INTERNAL (),_tao_retval._retn ()); } - + TAO_GIOP_Twoway_Invocation _tao_call ( istub, "all_str", @@ -397,24 +737,23 @@ char * _TAO_foo_Remote_Proxy_Impl::all_str ( 2, istub->orb_core () ); - + int _invoke_status; - + #if (TAO_HAS_INTERCEPTORS == 1) TAO_ClientRequestInterceptor_Adapter _tao_vfr ( istub->orb_core ()->client_request_interceptors (), &_tao_call, _invoke_status ); - + #endif /* TAO_HAS_INTERCEPTORS */ - + for (;;) { _invoke_status = TAO_INVOKE_EXCEPTION; - + #if TAO_HAS_INTERCEPTORS == 1 - // @@@ (JP) This constructor will eventually take _tao_signature. TAO_ClientRequestInfo_foo_all_str _tao_ri ( &_tao_call, _collocated_tao_target_, @@ -422,15 +761,15 @@ char * _TAO_foo_Remote_Proxy_Impl::all_str ( inoutarg ACE_ENV_ARG_PARAMETER ); - ACE_CHECK_RETURN (_tao_retval.excp ()); - + ACE_CHECK_RETURN (_tao_retval._retn ()); + #endif /* TAO_HAS_INTERCEPTORS */ - + CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG; TAO_INTERCEPTOR (_tao_ri.response_expected (1)); - + #if TAO_HAS_INTERCEPTORS == 1 - + ACE_TRY { _tao_vfr.send_request ( @@ -438,42 +777,40 @@ char * _TAO_foo_Remote_Proxy_Impl::all_str ( ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - + if (_invoke_status == TAO_INVOKE_RESTART) { _tao_call.restart_flag (1); } else { - + #endif /* TAO_HAS_INTERCEPTORS */ - + _tao_call.start (ACE_ENV_SINGLE_ARG_PARAMETER); - TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ()); + TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval._retn ()); _tao_call.prepare_header ( ACE_static_cast (CORBA::Octet, _tao_response_flag) ACE_ENV_ARG_PARAMETER ); - TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ()); + TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval._retn ()); TAO_OutputCDR &_tao_out = _tao_call.out_stream (); - + if (!( - (_tao_retval.marshal (_tao_out)) && - (_tao_inarg.marshal (_tao_out)) && - (_tao_inoutarg.marshal (_tao_out)) && - (_tao_outarg.marshal (_tao_out)) + (_tao_out << inarg) && + (_tao_out << inoutarg) )) { - TAO_OutputCDR::throw_stub_exception (errno ACE_ENV_ARG_PARAMETER); - TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ()); + TAO_OutputCDR::throw_stub_exception (errno ACE_ENV_ARG_PARAMETER); + TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval._retn ()); } - + _invoke_status = - _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER); - TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ()); + _tao_call.invoke (_tao_foo_all_str_exceptiondata, 2 ACE_ENV_ARG_PARAMETER); + TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval._retn ()); if (_invoke_status == TAO_INVOKE_EXCEPTION) { @@ -481,7 +818,7 @@ char * _TAO_foo_Remote_Proxy_Impl::all_str ( CORBA::UNKNOWN ( CORBA::OMGVMCID | 1, CORBA::COMPLETED_YES ), - _tao_retval.excp () + 0 ); } else if (_invoke_status == TAO_INVOKE_RESTART) @@ -497,38 +834,40 @@ char * _TAO_foo_Remote_Proxy_Impl::all_str ( ) } else - { + { CORBA::string_free (inoutarg); + + TAO_InputCDR &_tao_in = _tao_call.inp_stream (); _tao_call.transport()->assign_translators (&_tao_in,0); - + if (!( - (_tao_retval.demarshal (_tao_in)) && - (_tao_inarg.demarshal (_tao_in)) && - (_tao_inoutarg.demarshal (_tao_in)) && - (_tao_outarg.demarshal (_tao_in)) + (_tao_in >> _tao_retval.inout ()) && + (_tao_in >> inoutarg) && + (_tao_in >> outarg.ptr ()) )) { - TAO_InputCDR::throw_stub_exception (errno ACE_ENV_ARG_PARAMETER); - TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ()); - + TAO_InputCDR::throw_stub_exception (errno ACE_ENV_ARG_PARAMETER); + TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval._retn ()); + } - + #if TAO_HAS_INTERCEPTORS == 1 - // @@@ (JP) This call will eventually take _tao_signature[0]. - char * _tao_retval_info = 0; + char * _tao_retval_info = + _tao_retval._retn (); _tao_ri.result (_tao_retval_info); - + _tao_retval = _tao_retval_info; + _tao_ri.reply_status (_invoke_status); _tao_vfr.receive_reply ( &_tao_ri ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - + #endif /* TAO_HAS_INTERCEPTORS */ } - + #if TAO_HAS_INTERCEPTORS == 1 } } @@ -540,59 +879,64 @@ char * _TAO_foo_Remote_Proxy_Impl::all_str ( ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - + const PortableInterceptor::ReplyStatus _tao_status = _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION || _tao_status == PortableInterceptor::USER_EXCEPTION) { ACE_RE_THROW; } } - + # if defined (ACE_HAS_EXCEPTIONS) \ && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS) ACE_CATCHALL { CORBA::UNKNOWN ex; - + _tao_ri.exception (&ex); _tao_vfr.receive_exception ( &_tao_ri ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - + const PortableInterceptor::ReplyStatus _tao_status = _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION) ACE_TRY_THROW (ex); } # endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */ - + ACE_ENDTRY; - ACE_CHECK_RETURN (_tao_retval.excp ()); - + ACE_CHECK_RETURN (_tao_retval._retn ()); + const PortableInterceptor::ReplyStatus _tao_status = _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (_tao_retval.excp ()); - + ACE_CHECK_RETURN (_tao_retval._retn ()); + if (_tao_status != PortableInterceptor::LOCATION_FORWARD && _tao_status != PortableInterceptor::TRANSPORT_RETRY) - + #endif /* TAO_HAS_INTERCEPTORS */ - + if (_invoke_status != TAO_INVOKE_RESTART) break; } -#endif /*if 0*/ -return _tao_retval.retn (); + +#endif /* 0 */ + + return _tao_retval.retn (); } +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/remote_proxy_impl_cs.cpp:63 + void _TAO_foo_Remote_Proxy_Impl::push ( CORBA::Object *_collocated_tao_target_, const char * inarg @@ -604,24 +948,214 @@ void _TAO_foo_Remote_Proxy_Impl::push ( { TAO::Arg_Traits<void>::stub_ret_val _tao_retval; TAO::Arg_Traits<CORBA::Char *>::in_arg_val _tao_inarg (inarg); - + TAO::Argument *_tao_signature [] = - { - &_tao_retval, - &_tao_inarg - }; + { + &_tao_retval, + &_tao_inarg + }; + + TAO::Invocation_Base _tao_call ( + _collocated_tao_target_, + _tao_signature, + 2, + "push", + 4, + TAO::TAO_ONEWAY_INVOCATION + ); + + _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +#if 0 + + TAO_Stub *istub = _collocated_tao_target_->_stubobj (); + + if (istub == 0) + { + ACE_THROW (CORBA::INTERNAL ()); + } + + TAO_GIOP_Oneway_Invocation _tao_call ( + istub, + "push", + 4, + 1, + istub->orb_core () + ); + + int _invoke_status; + +#if (TAO_HAS_INTERCEPTORS == 1) + TAO_ClientRequestInterceptor_Adapter _tao_vfr ( + istub->orb_core ()->client_request_interceptors (), + &_tao_call, + _invoke_status + ); + +#endif /* TAO_HAS_INTERCEPTORS */ + + for (;;) + { + _invoke_status = TAO_INVOKE_EXCEPTION; + +#if TAO_HAS_INTERCEPTORS == 1 + TAO_ClientRequestInfo_foo_push _tao_ri ( + &_tao_call, + _collocated_tao_target_, + inarg + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; + +#endif /* TAO_HAS_INTERCEPTORS */ + + CORBA::Short _tao_response_flag = _tao_call.sync_scope (); + TAO_INTERCEPTOR (_tao_ri.response_expected (0)); + +#if TAO_HAS_INTERCEPTORS == 1 + + ACE_TRY + { + _tao_vfr.send_request ( + &_tao_ri + ACE_ENV_ARG_PARAMETER + ); + ACE_TRY_CHECK; + + if (_invoke_status == TAO_INVOKE_RESTART) + { + _tao_call.restart_flag (1); + } + else + { + +#endif /* TAO_HAS_INTERCEPTORS */ + + _tao_call.start (ACE_ENV_SINGLE_ARG_PARAMETER); + TAO_INTERCEPTOR_CHECK; - TAO::Invocation_Base _tao_call (_collocated_tao_target_, - _tao_signature, - 2, //arg number - "push", - 4); + _tao_call.prepare_header ( + ACE_static_cast (CORBA::Octet, _tao_response_flag) + ACE_ENV_ARG_PARAMETER + ); + TAO_INTERCEPTOR_CHECK; - _tao_call.invoke (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + TAO_OutputCDR &_tao_out = _tao_call.out_stream (); + + if (!( + (_tao_out << inarg) + )) + { + TAO_OutputCDR::throw_stub_exception (errno ACE_ENV_ARG_PARAMETER); + TAO_INTERCEPTOR_CHECK; + + } + + _invoke_status = + _tao_call.invoke (ACE_ENV_SINGLE_ARG_PARAMETER); + TAO_INTERCEPTOR_CHECK; + + if (_invoke_status == TAO_INVOKE_EXCEPTION) + { + TAO_INTERCEPTOR_THROW ( + CORBA::UNKNOWN ( + CORBA::OMGVMCID | 1, CORBA::COMPLETED_YES + ) + ); + } + else if (_invoke_status == TAO_INVOKE_RESTART) + { + _tao_call.restart_flag (1); + TAO_INTERCEPTOR ( + _tao_ri.reply_status (_invoke_status); + _tao_vfr.receive_other ( + &_tao_ri + ACE_ENV_ARG_PARAMETER + ); + ACE_TRY_CHECK; + ) + } + else + { +#if TAO_HAS_INTERCEPTORS == 1 + + _tao_ri.reply_status (_invoke_status); + _tao_vfr.receive_other ( + &_tao_ri + ACE_ENV_ARG_PARAMETER + ); + ACE_TRY_CHECK; + +#endif /* TAO_HAS_INTERCEPTORS */ + } + +#if TAO_HAS_INTERCEPTORS == 1 + } + } + ACE_CATCHANY + { + _tao_ri.exception (&ACE_ANY_EXCEPTION); + _tao_vfr.receive_exception ( + &_tao_ri + ACE_ENV_ARG_PARAMETER + ); + ACE_TRY_CHECK; + + const PortableInterceptor::ReplyStatus _tao_status = + _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION + || _tao_status == PortableInterceptor::USER_EXCEPTION) + { + ACE_RE_THROW; + } + } + +# if defined (ACE_HAS_EXCEPTIONS) \ + && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS) + ACE_CATCHALL + { + CORBA::UNKNOWN ex; + + _tao_ri.exception (&ex); + _tao_vfr.receive_exception ( + &_tao_ri + ACE_ENV_ARG_PARAMETER + ); + ACE_TRY_CHECK; + + const PortableInterceptor::ReplyStatus _tao_status = + _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_TRY_CHECK; + + if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION) + ACE_TRY_THROW (ex); + } +# endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */ + + ACE_ENDTRY; + ACE_CHECK; + + const PortableInterceptor::ReplyStatus _tao_status = + _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (_tao_status != PortableInterceptor::LOCATION_FORWARD + && _tao_status != PortableInterceptor::TRANSPORT_RETRY) + +#endif /* TAO_HAS_INTERCEPTORS */ + + if (_invoke_status != TAO_INVOKE_RESTART) + break; + } + +#endif /* 0 */ } + // -// End Base & Remote Proxy Implemeentation. +// End Base & Remote Proxy Implemeentation. /////////////////////////////////////////////////////////////////////// // TAO_IDL - Generated from @@ -672,8 +1206,8 @@ _TAO_foo_Remote_Proxy_Broker::select_proxy ( // End Remote & Base Proxy Broker Implementation /////////////////////////////////////////////////////////////////////// -// TAO_IDL - Generated from -// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_cs.cpp:245 +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_cs.cpp:284 foo::foo (int collocated) { @@ -694,7 +1228,7 @@ foo::foo_setup_collocation (int collocated) foo::~foo (void) {} -void +void foo::_tao_any_destructor (void *_tao_void_pointer) { foo *tmp = ACE_static_cast (foo *, _tao_void_pointer); @@ -711,7 +1245,7 @@ foo::_narrow ( { return foo::_nil (); } - + if (! obj->_is_local ()) { CORBA::Boolean is_a = @@ -720,17 +1254,17 @@ foo::_narrow ( ACE_ENV_ARG_PARAMETER ); ACE_CHECK_RETURN (foo::_nil ()); - + if (is_a == 0) { return foo::_nil (); } } - + return foo::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER); } -foo_ptr +foo_ptr foo::_unchecked_narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_NOT_USED @@ -740,9 +1274,9 @@ foo::_unchecked_narrow ( { return foo::_nil (); } - + foo_ptr default_proxy = foo::_nil (); - + // Code for lazily evaluated IOR's if (!obj->is_evaluated ()) { @@ -754,19 +1288,19 @@ foo::_unchecked_narrow ( ), foo::_nil () ); - + return default_proxy; } - + if (! obj->_is_local ()) { TAO_Stub* stub = obj->_stubobj (); - + if (stub != 0) { stub->_incr_refcnt (); } - + if ( !CORBA::is_nil (stub->servant_orb_var ().ptr ()) && stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () && @@ -784,7 +1318,7 @@ foo::_unchecked_narrow ( foo::_nil () ); } - + if (CORBA::is_nil (default_proxy)) { ACE_NEW_RETURN ( @@ -797,10 +1331,10 @@ foo::_unchecked_narrow ( foo::_nil () ); } - + return default_proxy; } - else + else return ACE_reinterpret_cast ( foo_ptr, @@ -820,7 +1354,7 @@ foo::_duplicate (foo_ptr obj) { obj->_add_ref (); } - + return obj; } @@ -855,7 +1389,7 @@ foo::_is_a ( void *foo::_tao_QueryInterface (ptrdiff_t type) { void *retv = 0; - + if (type == ACE_reinterpret_cast ( ptrdiff_t, &foo::_tao_class_id) @@ -874,12 +1408,12 @@ void *foo::_tao_QueryInterface (ptrdiff_t type) ACE_static_cast (CORBA::Object_ptr, this) ); } - + if (retv != 0) { this->_add_ref (); } - + return retv; } @@ -905,12 +1439,14 @@ char * foo::all_str ( ) ACE_THROW_SPEC (( CORBA::SystemException + , one_bad + , two_bad )) { if (!this->is_evaluated ()) { ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); - + } if (this->the_TAO_foo_Proxy_Broker_ == 0) { @@ -918,11 +1454,11 @@ char * foo::all_str ( this->ACE_NESTED_CLASS (CORBA, Object)::_is_collocated () ); } - - _TAO_foo_Proxy_Impl &proxy = + + _TAO_foo_Proxy_Impl &proxy = this->the_TAO_foo_Proxy_Broker_->select_proxy (this ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + return proxy.all_str ( this, inarg, @@ -932,6 +1468,9 @@ char * foo::all_str ( ); } +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_cs.cpp:80 + void foo::push ( const char * inarg ACE_ENV_ARG_DECL @@ -943,7 +1482,7 @@ void foo::push ( if (!this->is_evaluated ()) { ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); - + } if (this->the_TAO_foo_Proxy_Broker_ == 0) { @@ -951,17 +1490,18 @@ void foo::push ( this->ACE_NESTED_CLASS (CORBA, Object)::_is_collocated () ); } - - _TAO_foo_Proxy_Impl &proxy = + + _TAO_foo_Proxy_Impl &proxy = this->the_TAO_foo_Proxy_Broker_->select_proxy (this ACE_ENV_ARG_PARAMETER); ACE_CHECK; - - return proxy.push ( + + proxy.push ( this, inarg ACE_ENV_ARG_PARAMETER ); } + // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_defn.cpp:284 @@ -969,8 +1509,8 @@ static const CORBA::Long _oc_foo[] = { TAO_ENCAP_BYTE_ORDER, // byte order 12, - ACE_NTOHL (0x49444c3a), - ACE_NTOHL (0x666f6f3a), + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x666f6f3a), ACE_NTOHL (0x312e3000), // repository ID = IDL:foo:1.0 4, ACE_NTOHL (0x666f6f00), // name = foo @@ -987,6 +1527,136 @@ static CORBA::TypeCode _tc_TAO_tc_foo ( ::CORBA::TypeCode_ptr _tc_foo = &_tc_TAO_tc_foo; +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/any_op_cs.cpp:50 + +// Copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + const one_bad &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<one_bad>::insert_copy ( + _tao_any, + one_bad::_tao_any_destructor, + _tc_one_bad, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + one_bad *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<one_bad>::insert ( + _tao_any, + one_bad::_tao_any_destructor, + _tc_one_bad, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + one_bad *&_tao_elem + ) +{ + return _tao_any >>= ACE_const_cast ( + const one_bad *&, + _tao_elem + ); +} + +// Extraction to const pointer. +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + const one_bad *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<one_bad>::extract ( + _tao_any, + one_bad::_tao_any_destructor, + _tc_one_bad, + _tao_elem + ); +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ + defined (ACE_HAS_GNU_REPO) + template class TAO::Any_Dual_Impl_T<one_bad>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +# pragma instantiate TAO::Any_Dual_Impl_T<one_bad \> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/any_op_cs.cpp:50 + +// Copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + const two_bad &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<two_bad>::insert_copy ( + _tao_any, + two_bad::_tao_any_destructor, + _tc_two_bad, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + two_bad *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<two_bad>::insert ( + _tao_any, + two_bad::_tao_any_destructor, + _tc_two_bad, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + two_bad *&_tao_elem + ) +{ + return _tao_any >>= ACE_const_cast ( + const two_bad *&, + _tao_elem + ); +} + +// Extraction to const pointer. +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + const two_bad *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<two_bad>::extract ( + _tao_any, + two_bad::_tao_any_destructor, + _tc_two_bad, + _tao_elem + ); +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ + defined (ACE_HAS_GNU_REPO) + template class TAO::Any_Dual_Impl_T<two_bad>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +# pragma instantiate TAO::Any_Dual_Impl_T<two_bad \> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/any_op_cs.cpp:50 @@ -1059,12 +1729,12 @@ CORBA::Boolean operator>> ( ACE_TRY_NEW_ENV { CORBA::Object_var obj; - + if ((strm >> obj.inout ()) == 0) { return 0; } - + // Narrow to the right type. _tao_objref = foo::_unchecked_narrow ( @@ -1081,3 +1751,4 @@ CORBA::Boolean operator>> ( ACE_ENDTRY; return 0; } + diff --git a/TAO/tests/Bench/wire/testC.h b/TAO/tests/Bench/wire/testC.h index 1082c9789cd..f21a2d8e7b9 100644 --- a/TAO/tests/Bench/wire/testC.h +++ b/TAO/tests/Bench/wire/testC.h @@ -42,13 +42,13 @@ #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO #endif -#define TAO_EXPORT_MACRO +#define TAO_EXPORT_MACRO #if defined (TAO_EXPORT_NESTED_CLASSES) # if defined (TAO_EXPORT_NESTED_MACRO) # undef TAO_EXPORT_NESTED_MACRO # endif /* defined (TAO_EXPORT_NESTED_MACRO) */ -# define TAO_EXPORT_NESTED_MACRO +# define TAO_EXPORT_NESTED_MACRO #endif /* TAO_EXPORT_NESTED_CLASSES */ #if defined(_MSC_VER) @@ -63,10 +63,106 @@ #endif /* __BORLANDC__ */ // TAO_IDL - Generated from -// W:\ACE_wrappers\TAO\TAO_IDL\be\be_interface.cpp:577 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/exception_ch.cpp:51 -#if !defined (_FOO__ODDS_N_ENDS_CH_) -#define _FOO__ODDS_N_ENDS_CH_ +#if !defined (_ONE_BAD_CH_) +#define _ONE_BAD_CH_ + +class one_bad : public CORBA::UserException +{ +public: + + one_bad (void); + one_bad (const one_bad &); + ~one_bad (void); + + one_bad &operator= (const one_bad &); + + static void _tao_any_destructor (void *); + + static one_bad *_downcast (CORBA::Exception *); + static CORBA::Exception *_alloc (void); + + virtual CORBA::Exception *_tao_duplicate (void) const; + + virtual void _raise (void); + + virtual void _tao_encode ( + TAO_OutputCDR & + ACE_ENV_ARG_DECL_NOT_USED + ) const; + + virtual void _tao_decode ( + TAO_InputCDR & + ACE_ENV_ARG_DECL_NOT_USED + ); + + // TAO_IDL - Generated from + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/exception_ch.cpp:125 + + virtual CORBA::TypeCode_ptr _type (void) const; +}; + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_decl.cpp:44 + +extern ::CORBA::TypeCode_ptr _tc_one_bad; + +#endif /* end #if !defined */ + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/exception_ch.cpp:51 + +#if !defined (_TWO_BAD_CH_) +#define _TWO_BAD_CH_ + +class two_bad : public CORBA::UserException +{ +public: + + two_bad (void); + two_bad (const two_bad &); + ~two_bad (void); + + two_bad &operator= (const two_bad &); + + static void _tao_any_destructor (void *); + + static two_bad *_downcast (CORBA::Exception *); + static CORBA::Exception *_alloc (void); + + virtual CORBA::Exception *_tao_duplicate (void) const; + + virtual void _raise (void); + + virtual void _tao_encode ( + TAO_OutputCDR & + ACE_ENV_ARG_DECL_NOT_USED + ) const; + + virtual void _tao_decode ( + TAO_InputCDR & + ACE_ENV_ARG_DECL_NOT_USED + ); + + // TAO_IDL - Generated from + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/exception_ch.cpp:125 + + virtual CORBA::TypeCode_ptr _type (void) const; +}; + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_decl.cpp:44 + +extern ::CORBA::TypeCode_ptr _tc_two_bad; + +#endif /* end #if !defined */ + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_interface.cpp:584 + +#if !defined (_FOO__VAR_OUT_CH_) +#define _FOO__VAR_OUT_CH_ class foo; typedef foo *foo_ptr; @@ -126,30 +222,30 @@ public: typedef foo_ptr _ptr_type; typedef foo_var _var_type; static int _tao_class_id; - + // The static operations. static foo_ptr _duplicate (foo_ptr obj); - + static foo_ptr _narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + static foo_ptr _unchecked_narrow ( CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + static foo_ptr _nil (void) { return (foo_ptr)0; } - + static void _tao_any_destructor (void *); - + // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46 - + virtual char * all_str ( const char * inarg, char *& inoutarg, @@ -158,27 +254,31 @@ public: ) ACE_THROW_SPEC (( CORBA::SystemException + , one_bad + , two_bad )); - - + + // TAO_IDL - Generated from + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46 + virtual void push ( - const char * inarg - ACE_ENV_ARG_DECL_WITH_DEFAULTS - ) + const char * inarg + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) ACE_THROW_SPEC (( - CORBA::SystemException - )); - + CORBA::SystemException + )); + // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ch.cpp:210 - + virtual CORBA::Boolean _is_a ( const char *type_id ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + virtual void *_tao_QueryInterface (ptrdiff_t type); - + virtual const char* _interface_repository_id (void) const; virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); private: @@ -186,22 +286,22 @@ private: protected: foo (int collocated = 0); - + // These methods travese the inheritance tree and set the // parents piece of the given class in the right mode. virtual void foo_setup_collocation (int collocated); - + foo (IOP::IOR *ior, TAO_ORB_Core *orb_core = 0); - + foo ( - TAO_Stub *objref, + TAO_Stub *objref, CORBA::Boolean _tao_collocated = 0, TAO_Abstract_ServantBase *servant = 0, TAO_ORB_Core *orb_core = 0 ); virtual ~foo (void); - + friend class _TAO_foo_Remote_Proxy_Impl; friend class _TAO_foo_ThruPOA_Proxy_Impl; friend class _TAO_foo_Direct_Proxy_Impl; @@ -228,10 +328,10 @@ class _TAO_foo_Proxy_Impl { public: virtual ~_TAO_foo_Proxy_Impl (void) {} - + // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/base_proxy_impl_ch.cpp:24 - + virtual char * all_str ( CORBA::Object *_collocated_tao_target_, const char * inarg, @@ -241,16 +341,22 @@ public: ) ACE_THROW_SPEC (( CORBA::SystemException + , one_bad + , two_bad )) = 0; - + + // TAO_IDL - Generated from + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/base_proxy_impl_ch.cpp:24 + virtual void push ( - CORBA::Object * /*_collocated_tao_target_*/, - const char * /* inarg */ - ACE_ENV_ARG_DECL_NOT_USED + CORBA::Object *_collocated_tao_target_, + const char * inarg + ACE_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException - )) {}; + )) = 0; + protected: _TAO_foo_Proxy_Impl (void); }; @@ -273,12 +379,12 @@ class _TAO_foo_Remote_Proxy_Impl { public: _TAO_foo_Remote_Proxy_Impl (void); - + virtual ~_TAO_foo_Remote_Proxy_Impl (void) {} - + // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/proxy_impl_xh.cpp:24 - + virtual char * all_str ( CORBA::Object *_collocated_tao_target_, const char * inarg, @@ -288,8 +394,13 @@ public: ) ACE_THROW_SPEC (( CORBA::SystemException + , one_bad + , two_bad )); - + + // TAO_IDL - Generated from + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/proxy_impl_xh.cpp:24 + virtual void push ( CORBA::Object *_collocated_tao_target_, const char * inarg @@ -305,12 +416,12 @@ public: /////////////////////////////////////////////////////////////////////// // The Proxy Brokers are used by each interface to get -// the right proxy for performing a call. In the new +// the right proxy for performing a call. In the new // collocation scheme, the proxy to be used can vary on // a call by call basis. /////////////////////////////////////////////////////////////////////// -// Base Proxy Broker Declaration +// Base Proxy Broker Declaration // // TAO_IDL - Generated from @@ -324,19 +435,19 @@ public: foo *object ACE_ENV_ARG_DECL_WITH_DEFAULTS ) = 0; - + protected: _TAO_foo_Proxy_Broker (void); - + }; // -// End Base Proxy Broker Declaration +// End Base Proxy Broker Declaration /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// -// Remote Proxy Broker Declaration +// Remote Proxy Broker Declaration // // TAO_IDL - Generated from @@ -345,16 +456,16 @@ protected: class _TAO_foo_Remote_Proxy_Broker : public virtual _TAO_foo_Proxy_Broker { -public: +public: _TAO_foo_Remote_Proxy_Broker (void); - + virtual ~_TAO_foo_Remote_Proxy_Broker (void); - + virtual _TAO_foo_Proxy_Impl &select_proxy ( foo *object ACE_ENV_ARG_DECL ); - + private: _TAO_foo_Remote_Proxy_Impl remote_proxy_impl_; @@ -366,7 +477,7 @@ public: }; // -// End Remote Proxy Broker Declaration +// End Remote Proxy Broker Declaration /////////////////////////////////////////////////////////////////////// #endif /* end #if !defined */ @@ -381,13 +492,37 @@ extern ::CORBA::TypeCode_ptr _tc_foo; // TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_root/root.cpp:76 -extern +extern _TAO_foo_Proxy_Broker * (*_TAO_foo_Proxy_Broker_Factory_function_pointer) ( CORBA::Object_ptr obj ); // TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_traits.cpp:53 + +// Traits specializations. +namespace TAO +{ +}; + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/any_op_ch.cpp:52 + + void operator<<= (CORBA::Any &, const one_bad &); // copying version + void operator<<= (CORBA::Any &, one_bad*); // noncopying version + CORBA::Boolean operator>>= (const CORBA::Any &, one_bad *&); // deprecated + CORBA::Boolean operator>>= (const CORBA::Any &, const one_bad *&); + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/any_op_ch.cpp:52 + + void operator<<= (CORBA::Any &, const two_bad &); // copying version + void operator<<= (CORBA::Any &, two_bad*); // noncopying version + CORBA::Boolean operator>>= (const CORBA::Any &, two_bad *&); // deprecated + CORBA::Boolean operator>>= (const CORBA::Any &, const two_bad *&); + +// TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/any_op_ch.cpp:52 void operator<<= (CORBA::Any &, foo_ptr); // copying @@ -400,6 +535,18 @@ _TAO_foo_Proxy_Broker * #ifndef __ACE_INLINE__ // TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/cdr_op_ch.cpp:52 + + CORBA::Boolean operator<< (TAO_OutputCDR &, const one_bad &); + CORBA::Boolean operator>> (TAO_InputCDR &, one_bad &); + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/cdr_op_ch.cpp:52 + + CORBA::Boolean operator<< (TAO_OutputCDR &, const two_bad &); + CORBA::Boolean operator>> (TAO_InputCDR &, two_bad &); + +// TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/cdr_op_ch.cpp:55 CORBA::Boolean operator<< (TAO_OutputCDR &, const foo_ptr ); @@ -411,7 +558,7 @@ _TAO_foo_Proxy_Broker * #endif /* __ACE_INLINE__ */ // TAO_IDL - Generated from -// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:1055 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:958 #if defined (__ACE_INLINE__) #include "testC.i" @@ -426,3 +573,4 @@ _TAO_foo_Proxy_Broker * #endif /* __BORLANDC__ */ #endif /* ifndef */ + diff --git a/TAO/tests/Bench/wire/testC.i b/TAO/tests/Bench/wire/testC.i index 534c5a79ae1..5c0dd62580a 100644 --- a/TAO/tests/Bench/wire/testC.i +++ b/TAO/tests/Bench/wire/testC.i @@ -71,6 +71,64 @@ foo::foo ( #endif /* end #if !defined */ // TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/cdr_op_ci.cpp:71 + +ACE_INLINE +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const one_bad &_tao_aggregate + ) +{ + // First marshal the repository ID. + if (strm << _tao_aggregate._rep_id ()) + { + return 1; + } + else + { + return 0; + } +} + +ACE_INLINE +CORBA::Boolean operator>> ( + TAO_InputCDR &, + one_bad& + ) +{ + return 1; +} + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_exception/cdr_op_ci.cpp:71 + +ACE_INLINE +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const two_bad &_tao_aggregate + ) +{ + // First marshal the repository ID. + if (strm << _tao_aggregate._rep_id ()) + { + return 1; + } + else + { + return 0; + } +} + +ACE_INLINE +CORBA::Boolean operator>> ( + TAO_InputCDR &, + two_bad& + ) +{ + return 1; +} + +// TAO_IDL - Generated from // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/cdr_op_ci.cpp:72 CORBA::Boolean operator<< ( diff --git a/TAO/tests/Bench/wire/testS.cpp b/TAO/tests/Bench/wire/testS.cpp index 82efea712f6..09aee2594c8 100644 --- a/TAO/tests/Bench/wire/testS.cpp +++ b/TAO/tests/Bench/wire/testS.cpp @@ -26,11 +26,11 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html -// TAO_IDL - Generated from -// be/be_codegen.cpp:714 +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:617 -#ifndef _TAO_IDL_ONEWAYS_CPP_ -#define _TAO_IDL_ONEWAYS_CPP_ +#ifndef _TAO_IDL_TESTS_CPP_ +#define _TAO_IDL_TESTS_CPP_ #include "testS.h" @@ -50,7 +50,6 @@ #endif /* TAO_HAS_INTERCEPTORS == 1 */ #include "ace/Dynamic_Service.h" -#include "tao/UB_String_Arguments.h" #if defined (__BORLANDC__) #pragma option -w-rvl -w-rch -w-ccc -w-aus @@ -63,7 +62,7 @@ // TAO_IDL - Generated from -// be/be_interface.cpp:1248 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_interface.cpp:1248 class TAO_foo_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable { @@ -74,7 +73,7 @@ public: }; /* C++ code produced by gperf version 2.8 (ACE version) */ -/* Command-line: /project/tangotmp/bala/work/ACE+TAO/refactor/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_foo_Perfect_Hash_OpTable -N lookup */ +/* 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_foo_Perfect_Hash_OpTable -N lookup */ unsigned int TAO_foo_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) { @@ -144,10 +143,10 @@ TAO_foo_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) static const class TAO_operation_db_entry wordlist[] = { {"",0},{"",0},{"",0},{"",0}, - {"push", &POA_foo::push_skel}, + {"push", &POA_foo::push_skel}, {"_is_a", &POA_foo::_is_a_skel}, {"",0}, - {"all_str", &POA_foo::all_str_skel}, + {"all_str", &POA_foo::all_str_skel}, {"",0},{"",0}, {"_component", &POA_foo::_component_skel}, {"",0},{"",0}, @@ -173,12 +172,12 @@ TAO_foo_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) static TAO_foo_Perfect_Hash_OpTable tao_foo_optable; // TAO_IDL - Generated from -// be/be_visitor_interface/interceptors_ss.cpp:52 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interceptors_ss.cpp:52 #if (TAO_HAS_INTERCEPTORS == 1) // TAO_IDL - Generated from -// be/be_visitor_operation/interceptors_ss.cpp:74 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_ss.cpp:74 class TAO_ServerRequestInfo_foo_all_str : public TAO_ServerRequestInfo { @@ -191,54 +190,54 @@ public: char *& inoutarg ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + virtual Dynamic::ParameterList * arguments ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual Dynamic::ExceptionList * exceptions ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual CORBA::Any * result ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual char * target_most_derived_interface ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual CORBA::Boolean target_is_a ( const char * id ACE_ENV_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + void result (char * result); private: TAO_ServerRequestInfo_foo_all_str ( const TAO_ServerRequestInfo_foo_all_str & ); - + void operator= ( const TAO_ServerRequestInfo_foo_all_str & ); - + private: POA_foo *_tao_impl; - + const char * inarg_; char *& inoutarg_; char * _result; }; // TAO_IDL - Generated from -// be/be_visitor_operation/interceptors_ss.cpp:438 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_ss.cpp:438 TAO_ServerRequestInfo_foo_all_str::TAO_ServerRequestInfo_foo_all_str ( TAO_ServerRequest &_tao_server_request, @@ -264,19 +263,19 @@ TAO_ServerRequestInfo_foo_all_str::arguments ( Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + Dynamic::ParameterList_var safe_parameter_list = parameter_list; parameter_list->length (2); CORBA::ULong len = 0; - + (*parameter_list)[len].argument <<= inarg_; (*parameter_list)[len].mode = CORBA::PARAM_IN; len++; - + (*parameter_list)[len].argument <<= inoutarg_; (*parameter_list)[len].mode = CORBA::PARAM_INOUT; len++; - + return safe_parameter_list._retn (); } @@ -290,11 +289,27 @@ TAO_ServerRequestInfo_foo_all_str::exceptions ( Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); + + Dynamic::ExceptionList_var safe_exception_list = exception_list; + + static CORBA::TypeCode_ptr _tao_foo_all_str_exceptiondata[] = + { + _tc_one_bad, + _tc_two_bad + }; + + exception_list->length (2); + for (CORBA::ULong i = 0; i < 2; ++i) + { + CORBA::TypeCode_ptr tcp = _tao_foo_all_str_exceptiondata[i]; + TAO_Pseudo_Object_Manager<CORBA::TypeCode, CORBA::TypeCode_var> tcp_object (&tcp, 1); + (*exception_list)[i] = tcp_object; + } - return exception_list; + return safe_exception_list._retn (); } -CORBA::Any * +CORBA::Any * TAO_ServerRequestInfo_foo_all_str::result ( ACE_ENV_SINGLE_ARG_DECL ) @@ -305,11 +320,11 @@ TAO_ServerRequestInfo_foo_all_str::result ( CORBA::Any *result_any = TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + CORBA::Any_var safe_result_any = result_any; - + (*result_any) <<= this->_result; - + return safe_result_any._retn (); } @@ -333,7 +348,7 @@ TAO_ServerRequestInfo_foo_all_str::target_is_a ( return this->_tao_impl->_is_a (id ACE_ENV_ARG_PARAMETER); } -void +void TAO_ServerRequestInfo_foo_all_str::result (char * result) { // Update the result. @@ -341,7 +356,7 @@ TAO_ServerRequestInfo_foo_all_str::result (char * result) } // TAO_IDL - Generated from -// be/be_visitor_operation/interceptors_ss.cpp:74 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_ss.cpp:74 class TAO_ServerRequestInfo_foo_push : public TAO_ServerRequestInfo { @@ -353,50 +368,50 @@ public: const char * inarg ACE_ENV_ARG_DECL_WITH_DEFAULTS ); - + virtual Dynamic::ParameterList * arguments ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual Dynamic::ExceptionList * exceptions ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual CORBA::Any * result ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual char * target_most_derived_interface ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + virtual CORBA::Boolean target_is_a ( const char * id ACE_ENV_ARG_DECL_WITH_DEFAULTS ) ACE_THROW_SPEC ((CORBA::SystemException)); - + private: TAO_ServerRequestInfo_foo_push ( const TAO_ServerRequestInfo_foo_push & ); - + void operator= ( const TAO_ServerRequestInfo_foo_push & ); - + private: POA_foo *_tao_impl; - + const char * inarg_; }; // TAO_IDL - Generated from -// be/be_visitor_operation/interceptors_ss.cpp:438 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_ss.cpp:438 TAO_ServerRequestInfo_foo_push::TAO_ServerRequestInfo_foo_push ( TAO_ServerRequest &_tao_server_request, @@ -420,15 +435,15 @@ TAO_ServerRequestInfo_foo_push::arguments ( Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + Dynamic::ParameterList_var safe_parameter_list = parameter_list; parameter_list->length (1); CORBA::ULong len = 0; - + (*parameter_list)[len].argument <<= inarg_; (*parameter_list)[len].mode = CORBA::PARAM_IN; len++; - + return safe_parameter_list._retn (); } @@ -442,11 +457,11 @@ TAO_ServerRequestInfo_foo_push::exceptions ( Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + return exception_list; } -CORBA::Any * +CORBA::Any * TAO_ServerRequestInfo_foo_push::result ( ACE_ENV_SINGLE_ARG_DECL ) @@ -457,7 +472,7 @@ TAO_ServerRequestInfo_foo_push::result ( CORBA::Any *result_any = TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + return result_any; } @@ -488,7 +503,7 @@ TAO_ServerRequestInfo_foo_push::target_is_a ( // // TAO_IDL - Generated from -// be/be_visitor_interface/strategized_proxy_broker_ss.cpp:40 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/strategized_proxy_broker_ss.cpp:40 // Factory function Implementation. _TAO_foo_Strategized_Proxy_Broker *_TAO_foo_Strategized_Proxy_Broker::the_TAO_foo_Strategized_Proxy_Broker (void) @@ -510,7 +525,7 @@ _TAO_foo_Strategized_Proxy_Broker::~_TAO_foo_Strategized_Proxy_Broker (void) for (int i = 0; i < TAO_Collocation_Strategies::CS_LAST; ++i) { delete this->proxy_cache_[i]; - + // Hack to prevent bug mentioned in 1204. Refer to 1204 // for details.. this->proxy_cache_[i] = 0; @@ -526,26 +541,26 @@ _TAO_foo_Strategized_Proxy_Broker::select_proxy ( int strategy = TAO_ORB_Core::collocation_strategy (object ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (*this->proxy_cache_[strategy]); - + if (this->proxy_cache_[strategy] != 0) { return *this->proxy_cache_[strategy]; } - + this->create_proxy (strategy ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (*this->proxy_cache_[strategy]); - + return *this->proxy_cache_[strategy]; } -void +void _TAO_foo_Strategized_Proxy_Broker::create_proxy ( int strategy ACE_ENV_ARG_DECL ) { ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->mutex_); - + if (this->proxy_cache_[strategy] == 0) { switch (strategy) @@ -558,7 +573,7 @@ _TAO_foo_Strategized_Proxy_Broker::create_proxy ( ); ACE_CHECK; break; - + case TAO_Collocation_Strategies::CS_REMOTE_STRATEGY: default: ACE_NEW_THROW_EX ( @@ -577,7 +592,7 @@ _TAO_foo_Strategized_Proxy_Broker::create_proxy ( /////////////////////////////////////////////////////////////////////// // TAO_IDL - Generated from -// be/be_visitor_interface/interface_ss.cpp:598 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:598 _TAO_foo_Proxy_Broker * _TAO_foo_Proxy_Broker_Factory_function (CORBA::Object_ptr obj) @@ -589,13 +604,13 @@ _TAO_foo_Proxy_Broker_Factory_function (CORBA::Object_ptr obj) int _TAO_foo_Proxy_Broker_Factory_Initializer (size_t) { - _TAO_foo_Proxy_Broker_Factory_function_pointer = + _TAO_foo_Proxy_Broker_Factory_function_pointer = _TAO_foo_Proxy_Broker_Factory_function; - + return 0; } -static int _TAO_foo_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = +static int _TAO_foo_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = _TAO_foo_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, _TAO_foo_Proxy_Broker_Factory_Initializer)); @@ -604,15 +619,15 @@ static int _TAO_foo_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = // // TAO_IDL - Generated from -// be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp:37 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/thru_poa_proxy_impl_ss.cpp:37 _TAO_foo_ThruPOA_Proxy_Impl::_TAO_foo_ThruPOA_Proxy_Impl (void) {} // ThruPOA Implementation of the IDL interface methods -// TAO_IDL - Generated from -// be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp:67 +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/thru_poa_proxy_impl_ss.cpp:67 char * _TAO_foo_ThruPOA_Proxy_Impl::all_str ( CORBA::Object *_collocated_tao_target_, @@ -623,6 +638,8 @@ char * _TAO_foo_ThruPOA_Proxy_Impl::all_str ( ) ACE_THROW_SPEC (( CORBA::SystemException + , one_bad + , two_bad )) { CORBA::String_var _tao_retval; @@ -638,19 +655,19 @@ char * _TAO_foo_ThruPOA_Proxy_Impl::all_str ( ACE_ENV_ARG_PARAMETER ); ACE_CHECK_RETURN (_tao_retval._retn ()); - + servant_upcall.pre_invoke_collocated_request ( ACE_ENV_SINGLE_ARG_PARAMETER ); ACE_CHECK_RETURN (_tao_retval._retn ()); - + return ACE_reinterpret_cast ( POA_foo_ptr, servant_upcall.servant ()->_downcast ( "IDL:foo:1.0" ) )->all_str ( - + inarg, inoutarg, outarg @@ -658,8 +675,8 @@ char * _TAO_foo_ThruPOA_Proxy_Impl::all_str ( ); } -// TAO_IDL - Generated from -// be/be_visitor_operation/thru_poa_proxy_impl_ss.cpp:67 +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/thru_poa_proxy_impl_ss.cpp:67 void _TAO_foo_ThruPOA_Proxy_Impl::push ( CORBA::Object *_collocated_tao_target_, @@ -670,7 +687,7 @@ void _TAO_foo_ThruPOA_Proxy_Impl::push ( CORBA::SystemException )) { - + TAO_Object_Adapter::Servant_Upcall servant_upcall ( _collocated_tao_target_->_stubobj ()->servant_orb_var ()->orb_core () ); @@ -682,19 +699,19 @@ void _TAO_foo_ThruPOA_Proxy_Impl::push ( ACE_ENV_ARG_PARAMETER ); ACE_CHECK; - + servant_upcall.pre_invoke_collocated_request ( ACE_ENV_SINGLE_ARG_PARAMETER ); ACE_CHECK; - + ACE_reinterpret_cast ( POA_foo_ptr, servant_upcall.servant ()->_downcast ( "IDL:foo:1.0" ) )->push ( - + inarg ACE_ENV_ARG_PARAMETER ); @@ -702,8 +719,8 @@ void _TAO_foo_ThruPOA_Proxy_Impl::push ( // End ThruPOA Proxy Implementation /////////////////////////////////////////////////////////////////////// -// TAO_IDL - Generated from -// be/be_visitor_interface/interface_ss.cpp:98 +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:98 POA_foo::POA_foo (void) { @@ -720,8 +737,8 @@ POA_foo::~POA_foo (void) { } -// TAO_IDL - Generated from -// be/be_visitor_operation/operation_ss.cpp:100 +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ss.cpp:100 void POA_foo::all_str_skel ( TAO_ServerRequest &_tao_server_request, @@ -730,99 +747,83 @@ void POA_foo::all_str_skel ( ACE_ENV_ARG_DECL ) { - TAO::Arg_Traits<CORBA::Char *>::skel_ret_val _tao_retval; - TAO::Arg_Traits<CORBA::Char *>::in_sarg_val _tao_inarg; - TAO::Arg_Traits<CORBA::Char *>::inout_sarg_val _tao_inoutarg; - TAO::Arg_Traits<CORBA::Char *>::out_sarg_val _tao_outarg; - - /*TAO::Argument *_tao_signature [] = - { - &_tao_retval, - &_tao_inarg, - &_tao_inoutarg, - &_tao_outarg - }; - */ - TAO_InputCDR &_tao_in = _tao_server_request.incoming (); POA_foo *_tao_impl = ACE_static_cast ( POA_foo *, _tao_servant ); - + CORBA::String_var _tao_retval; + CORBA::String_var inarg; + CORBA::String_var inoutarg; + CORBA::String_var outarg; + if (!( - (_tao_retval.demarshal (_tao_in)) && - (_tao_inarg.demarshal (_tao_in)) && - (_tao_inoutarg.demarshal (_tao_in)) && - (_tao_outarg.demarshal (_tao_in)) + (_tao_in >> inarg.out ()) && + (_tao_in >> inoutarg.out ()) )) { - + TAO_InputCDR::throw_skel_exception (errno ACE_ENV_ARG_PARAMETER); ACE_CHECK; } - + #if (TAO_HAS_INTERCEPTORS == 1) TAO_Object_Adapter::Servant_Upcall *_tao_upcall = ACE_static_cast (TAO_Object_Adapter::Servant_Upcall *, _tao_servant_upcall); - + TAO_ServerRequestInterceptor_Adapter _tao_vfr ( _tao_server_request.orb_core ()->server_request_interceptors (), _tao_server_request.interceptor_count () ); - - // @@@ (JP) This constructor will take _tao_signature eventually. - CORBA::String_var inarg; - CORBA::String_var inoutarg; + TAO_ServerRequestInfo_foo_all_str _tao_ri ( _tao_server_request, _tao_upcall, _tao_impl, - + inarg.in (), - + inoutarg.inout () ACE_ENV_ARG_PARAMETER ); - + ACE_TRY { { TAO_PICurrent_Guard _tao_pi_guard (_tao_ri.server_request (), 1 /* Copy TSC to RSC */); - + _tao_vfr.receive_request (&_tao_ri ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + if (!_tao_vfr.location_forwarded ()) { - + #endif /* TAO_HAS_INTERCEPTORS */ - _tao_retval.arg () = + _tao_retval = _tao_impl->all_str ( - - _tao_inarg.arg (), - - _tao_inoutarg.arg (), - - _tao_outarg.arg () + + inarg.in (), + + inoutarg.inout (), + + outarg.out () ACE_ENV_ARG_PARAMETER ); TAO_INTERCEPTOR_CHECK; #if (TAO_HAS_INTERCEPTORS == 1) - + } } - + if (!_tao_vfr.location_forwarded ()) { - // @@@ (JP) This call will take the arg class eventually. - char * _tao_retval_info = 0; + char * _tao_retval_info = _tao_retval._retn (); _tao_ri.result (_tao_retval_info); - + _tao_retval = _tao_retval_info; _tao_ri.reply_status (PortableInterceptor::SUCCESSFUL); _tao_vfr.send_reply (&_tao_ri ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -836,67 +837,66 @@ void POA_foo::all_str_skel ( ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - + PortableInterceptor::ReplyStatus _tao_status = _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION || _tao_status == PortableInterceptor::USER_EXCEPTION) { ACE_RE_THROW; } } - + # if defined (ACE_HAS_EXCEPTIONS) \ && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS) ACE_CATCHALL { CORBA::UNKNOWN ex; - + _tao_ri.exception (&ex); _tao_vfr.send_exception ( &_tao_ri ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - + PortableInterceptor::ReplyStatus _tao_status = _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION) ACE_TRY_THROW (ex); } # endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */ - + ACE_ENDTRY; ACE_CHECK; #endif /* TAO_HAS_INTERCEPTORS */ - + _tao_server_request.init_reply (); - + TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - + if (!( - (_tao_retval.marshal (_tao_out)) && - (_tao_inarg.marshal (_tao_out)) && - (_tao_inoutarg.marshal (_tao_out)) && - (_tao_outarg.marshal (_tao_out)) + (_tao_out << _tao_retval.in ()) && + (_tao_out << inoutarg.in ()) && + (_tao_out << outarg.in ()) )) { - + TAO_OutputCDR::throw_skel_exception (errno ACE_ENV_ARG_PARAMETER); ACE_CHECK; } - - + + // In case _tao_servant_upcall is not used in this function ACE_UNUSED_ARG (_tao_servant_upcall); } -// TAO_IDL - Generated from -// be/be_visitor_operation/operation_ss.cpp:100 +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ss.cpp:100 void POA_foo::push_skel ( TAO_ServerRequest &_tao_server_request, @@ -912,63 +912,63 @@ void POA_foo::push_skel ( _tao_servant ); _tao_server_request.argument_flag (0); - + CORBA::String_var inarg; - + if (!( (_tao_in >> inarg.out ()) )) { - + TAO_InputCDR::throw_skel_exception (errno ACE_ENV_ARG_PARAMETER); ACE_CHECK; } - + #if (TAO_HAS_INTERCEPTORS == 1) TAO_Object_Adapter::Servant_Upcall *_tao_upcall = ACE_static_cast (TAO_Object_Adapter::Servant_Upcall *, _tao_servant_upcall); - + TAO_ServerRequestInterceptor_Adapter _tao_vfr ( _tao_server_request.orb_core ()->server_request_interceptors (), _tao_server_request.interceptor_count () ); - + TAO_ServerRequestInfo_foo_push _tao_ri ( _tao_server_request, _tao_upcall, _tao_impl, - + inarg.in () ACE_ENV_ARG_PARAMETER ); - + ACE_TRY { { TAO_PICurrent_Guard _tao_pi_guard (_tao_ri.server_request (), 1 /* Copy TSC to RSC */); - + _tao_vfr.receive_request (&_tao_ri ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + if (!_tao_vfr.location_forwarded ()) { - + #endif /* TAO_HAS_INTERCEPTORS */ - + _tao_impl->push ( - + inarg.in () ACE_ENV_ARG_PARAMETER ); TAO_INTERCEPTOR_CHECK; #if (TAO_HAS_INTERCEPTORS == 1) - + } } - + if (!_tao_vfr.location_forwarded ()) { _tao_ri.reply_status (PortableInterceptor::SUCCESSFUL); @@ -984,59 +984,59 @@ void POA_foo::push_skel ( ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - + PortableInterceptor::ReplyStatus _tao_status = _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION || _tao_status == PortableInterceptor::USER_EXCEPTION) { ACE_RE_THROW; } } - + # if defined (ACE_HAS_EXCEPTIONS) \ && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS) ACE_CATCHALL { CORBA::UNKNOWN ex; - + _tao_ri.exception (&ex); _tao_vfr.send_exception ( &_tao_ri ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; - + PortableInterceptor::ReplyStatus _tao_status = _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION) ACE_TRY_THROW (ex); } # endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */ - + ACE_ENDTRY; ACE_CHECK; #endif /* TAO_HAS_INTERCEPTORS */ - + if (_tao_server_request.response_expected () && !_tao_server_request.sync_with_server ()) { _tao_server_request.init_reply (); } - + // In case _tao_servant_upcall is not used in this function ACE_UNUSED_ARG (_tao_servant_upcall); } -// TAO_IDL - Generated from -// be/be_visitor_interface/interface_ss.cpp:165 +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:165 void POA_foo::_is_a_skel ( - TAO_ServerRequest &_tao_server_request, + TAO_ServerRequest &_tao_server_request, void * _tao_servant, void * /* Servant_Upcall */ ACE_ENV_ARG_DECL @@ -1046,22 +1046,22 @@ void POA_foo::_is_a_skel ( POA_foo *_tao_impl = (POA_foo *) _tao_servant; CORBA::Boolean _tao_retval = 0; CORBA::String_var value; - + if (!(_tao_in >> value.out ())) ACE_THROW (CORBA::MARSHAL ()); - + _tao_retval = _tao_impl->_is_a (value.in () ACE_ENV_ARG_PARAMETER); ACE_CHECK; - + _tao_server_request.init_reply (); TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - + if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) ACE_THROW (CORBA::MARSHAL ()); } void POA_foo::_non_existent_skel ( - TAO_ServerRequest &_tao_server_request, + TAO_ServerRequest &_tao_server_request, void * _tao_servant, void * /* Servant_Upcall */ ACE_ENV_ARG_DECL @@ -1071,16 +1071,16 @@ void POA_foo::_non_existent_skel ( CORBA::Boolean _tao_retval = _tao_impl->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - + _tao_server_request.init_reply (); TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - + if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval))) ACE_THROW (CORBA::MARSHAL ()); } void POA_foo::_interface_skel ( - TAO_ServerRequest &_tao_server_request, + TAO_ServerRequest &_tao_server_request, void * _tao_servant, void * /* Servant_Upcall */ ACE_ENV_ARG_DECL @@ -1089,27 +1089,27 @@ void POA_foo::_interface_skel ( POA_foo *_tao_impl = (POA_foo *) _tao_servant; CORBA::InterfaceDef_ptr _tao_retval = 0; CORBA::Boolean _tao_result = 0; - + TAO_IFR_Client_Adapter *_tao_adapter = ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( TAO_ORB_Core::ifr_client_adapter_name () ); - + if (_tao_adapter == 0) { ACE_THROW (CORBA::INTF_REPOS ()); } - + ACE_TRY { - _tao_retval = + _tao_retval = _tao_impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - + _tao_server_request.init_reply (); - + TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - + _tao_result = _tao_adapter->interfacedef_cdr_insert ( _tao_out, @@ -1121,7 +1121,7 @@ void POA_foo::_interface_skel ( _tao_adapter->dispose (_tao_retval); } ACE_ENDTRY; - + if (_tao_result == 0) { ACE_THROW (CORBA::MARSHAL ()); @@ -1129,7 +1129,7 @@ void POA_foo::_interface_skel ( } void POA_foo::_component_skel ( - TAO_ServerRequest &_tao_server_request, + TAO_ServerRequest &_tao_server_request, void * _tao_object_reference, void * /* Servant_Upcall */ ACE_ENV_ARG_DECL @@ -1139,10 +1139,10 @@ void POA_foo::_component_skel ( CORBA::Object_var _tao_retval = _tao_impl->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - + _tao_server_request.init_reply (); TAO_OutputCDR &_tao_out = _tao_server_request.outgoing (); - + if (!(_tao_out << _tao_retval._retn ())) ACE_THROW (CORBA::MARSHAL ()); } @@ -1180,13 +1180,13 @@ void* POA_foo::_downcast ( { return ACE_static_cast (POA_foo_ptr, this); } - + if (ACE_OS::strcmp (logical_type_id, "IDL:omg.org/CORBA/Object:1.0") == 0) { return ACE_static_cast(PortableServer::Servant, this); } - + return 0; } @@ -1196,7 +1196,7 @@ const char* POA_foo::_interface_repository_id (void) const } // TAO_IDL - Generated from -// be/be_visitor_interface/interface_ss.cpp:533 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:533 void POA_foo::_dispatch ( TAO_ServerRequest &req, @@ -1211,17 +1211,17 @@ void POA_foo::_dispatch ( } // TAO_IDL - Generated from -// be/be_visitor_interface/interface_ss.cpp:479 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:479 foo * POA_foo::_this (ACE_ENV_SINGLE_ARG_DECL) { TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); - + TAO_Stub_Auto_Ptr safe_stub (stub); CORBA::Object_ptr tmp = CORBA::Object::_nil (); - + if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ()) { ACE_NEW_RETURN ( @@ -1246,7 +1246,7 @@ POA_foo::_this (ACE_ENV_SINGLE_ARG_DECL) 0 ); } - + CORBA::Object_var obj = tmp; (void) safe_stub.release (); return ::foo::_unchecked_narrow (obj.in ()); diff --git a/TAO/tests/Bench/wire/testS.h b/TAO/tests/Bench/wire/testS.h index c97182605a0..11f95f120d4 100644 --- a/TAO/tests/Bench/wire/testS.h +++ b/TAO/tests/Bench/wire/testS.h @@ -26,13 +26,13 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html // TAO_IDL - Generated from -// be/be_codegen.cpp:487 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:390 -#ifndef _TAO_IDL_ONEWAYS_H_ -#define _TAO_IDL_ONEWAYS_H_ +#ifndef _TAO_IDL_TESTS_H_ +#define _TAO_IDL_TESTS_H_ -#include "onewayC.h" +#include "testC.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -54,7 +54,7 @@ #if defined (__BORLANDC__) #pragma option push -w-rvl -w-rch -w-ccc -w-inl #endif /* __BORLANDC__ */// TAO_IDL - Generated from -// be/be_visitor_interface/interface_sh.cpp:86 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_sh.cpp:86 class POA_foo; typedef POA_foo *POA_foo_ptr; @@ -127,7 +127,7 @@ public: virtual const char* _interface_repository_id (void) const; // TAO_IDL - Generated from - // be/be_visitor_operation/operation_sh.cpp:45 + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_sh.cpp:45 virtual char * all_str ( const char * inarg, @@ -137,6 +137,8 @@ public: ) ACE_THROW_SPEC (( CORBA::SystemException + , one_bad + , two_bad )) = 0; static void all_str_skel ( @@ -147,7 +149,7 @@ public: ); // TAO_IDL - Generated from - // be/be_visitor_operation/operation_sh.cpp:45 + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_sh.cpp:45 virtual void push ( const char * inarg @@ -170,7 +172,7 @@ public: // // TAO_IDL - Generated from -// be/be_visitor_interface/strategized_proxy_broker_sh.cpp:39 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/strategized_proxy_broker_sh.cpp:39 class _TAO_foo_Strategized_Proxy_Broker : public virtual ::_TAO_foo_Proxy_Broker { @@ -217,7 +219,7 @@ public: // // TAO_IDL - Generated from -// be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp:37 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/thru_poa_proxy_impl_sh.cpp:37 class _TAO_foo_ThruPOA_Proxy_Impl : public virtual ::_TAO_foo_Proxy_Impl, @@ -229,7 +231,7 @@ public: virtual ~_TAO_foo_ThruPOA_Proxy_Impl (void) {} // TAO_IDL - Generated from - // be/be_visitor_operation/proxy_impl_xh.cpp:24 + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/proxy_impl_xh.cpp:24 virtual char * all_str ( CORBA::Object *_collocated_tao_target_, @@ -240,10 +242,12 @@ public: ) ACE_THROW_SPEC (( CORBA::SystemException + , one_bad + , two_bad )); // TAO_IDL - Generated from - // be/be_visitor_operation/proxy_impl_xh.cpp:24 + // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/proxy_impl_xh.cpp:24 virtual void push ( CORBA::Object *_collocated_tao_target_, @@ -260,7 +264,9 @@ public: /////////////////////////////////////////////////////////////////////// // TAO_IDL - Generated from -// be/be_codegen.cpp:1090 +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:993 + +#include "testS_T.h" #if defined (__ACE_INLINE__) #include "testS.i" |