summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-07 16:17:43 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-07-07 16:17:43 +0000
commitc381463baa599726e81a8d0e0b907653dee97d07 (patch)
treee6f4106283509b852969c59365524f7cf8f5b990
parent807789ed8977afb1e582ef3f69788c6db7a35a56 (diff)
downloadATCD-c381463baa599726e81a8d0e0b907653dee97d07.tar.gz
syntax errors
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp81
1 files changed, 32 insertions, 49 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
index f6ff76beaa7..10df936e8ba 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp
@@ -467,6 +467,10 @@ be_visitor_operation_cs::gen_marshal_and_invoke (be_operation *node,
<< "_tao_interceptor_args.inout ()," << be_nl
<< "_tao_cookies,"*/
+ // Get the request_id field for the Request Info. In TAO, request id's
+ // change with differnet profiles so this seems to be the appropriate
+ // place to populate the Request Info with it.
+ << "ri.request_id (_tao_call.request_id ()); "<< be_nl
<< " _tao_vfr.send_request ("<< be_idt << be_idt_nl
<< "&ri,"<< be_nl
<< "ACE_TRY_ENV" << be_uidt_nl
@@ -717,6 +721,27 @@ be_visitor_operation_cs::gen_marshal_and_invoke (be_operation *node,
*os << be_uidt;
}
+ // Populate the Request Info with result if any of the invocation
+ if (!this->void_return_type (bt))
+ {
+ *os << " ri.result (";
+ // get the return val
+ ctx = *this->ctx_;
+ ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_INVOKE_CS);
+ ctx.sub_state (TAO_CodeGen::TAO_CDR_INPUT);
+ visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor || (node->accept (visitor) == -1))
+ {
+ delete visitor;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_compiled_visitor_operation_cs::"
+ "gen_marshal_and_invoke - "
+ "codegen for return var failed\n"),
+ -1);
+ }
+ *os <<")" << be_nl;
+ }
+ /*
// Obtain the scope.
os->indent ();
@@ -763,7 +788,7 @@ be_visitor_operation_cs::gen_marshal_and_invoke (be_operation *node,
}
delete visitor;
*os << ");\n";
-
+ */
// Invoke postinvoke interceptor
*os << be_nl << "TAO_INTERCEPTOR (" << be_idt << be_idt_nl;
@@ -782,7 +807,8 @@ be_visitor_operation_cs::gen_marshal_and_invoke (be_operation *node,
<< "_tao_cookies," <<*/
*os << "_tao_vfr.receive_reply (" << be_idt_nl
- << "&ri_next,"
+ // << "&ri_next,"
+ << "&ri,"
<< be_nl << "ACE_TRY_ENV" << be_uidt_nl
<< ")" << be_uidt << be_uidt_nl << ");\n";
if (this->gen_check_interceptor_exception (bt) == -1)
@@ -805,56 +831,13 @@ be_visitor_operation_cs::gen_marshal_and_invoke (be_operation *node,
<< "ACE_CATCHANY" << be_idt_nl
<< "{" << be_idt_nl;
- // Obtain the scope.
-
- os->indent ();
- if (node->is_nested ())
- {
- be_decl *parent =
- be_scope::narrow_from_scope (node->defined_in ())->decl ();
- // But since we are at the interface level our parents full_name
- // will include the interface name which we dont want and so we
- // get our parent's parent's full name.
- // be_interface *parent_interface = be_interface::narrow_from_decl (parent);
- // be_decl *parents_parent = be_interface::narrow_from_scope (parent_interface->scope ())->decl ();
- // Generate the scope::operation name.
- // *os << parents_parent->full_name () << "::";
- *os << parent->full_name () << "::";
- }
-
- *os << "TAO_ClientRequest_Info_"<< node->flat_name () << " ri_excp (" << this->compute_operation_name (node) << ",\n"
- << "_tao_call.service_info ()," << be_nl
- << "(CORBA::Object_ptr) this" << be_nl;
-
- // This necesary becos: (a) a comma is needed if there are arguments
- // (b) not needed if exceptions enabled since thats done already (c)
- // not needed if there are no args and exceptions is disabled.
-
- os->indent ();
- if (node->argument_count () > 0)
- *os << ",\n";
-
- // Generate the formal argument fields which are passed to the RequestInfo object
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_INTERCEPTORS_INFO_ARGLIST_CS);
- visitor = tao_cg->make_visitor (&ctx);
+ // Update the exception field of teh request info.
+ *os << "ri.exception (&ACE_ANY_EXCEPTION);"<< be_nl;
- // if ((!visitor) || (bt->accept (visitor) == -1))
- if ((!visitor) || (node->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_cs::"
- "visit_operation - "
- "codegen for arglist failed\n"),
- -1);
- }
- delete visitor;
- *os << ");\n";
-
*os << "_tao_vfr.receive_exception (" << be_idt << be_idt_nl
// << "_tao_call.request_id ()," << be_nl;
- << "&ri_excp," << be_nl
+ // << "&ri_excp," << be_nl
+ << "&ri," << be_nl
/*
if (node->flags () == AST_Operation::OP_oneway)
*os << "0";