diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-13 00:12:43 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-13 00:12:43 +0000 |
commit | 79129d4642bd5b6ed15172ee0eef0fdf4786141b (patch) | |
tree | 0f6e0933f55e0b2ff6970fcd4fb745c7b013ace9 | |
parent | 810faafd880dde08449fa74bac07f65b7d770c90 (diff) | |
download | ATCD-79129d4642bd5b6ed15172ee0eef0fdf4786141b.tar.gz |
ChangeLogTag:Fri Mar 12 18:09:25 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-99c | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_helper.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp | 50 |
3 files changed, 24 insertions, 36 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index b3c6750f582..a33801bcfe0 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,11 @@ +Fri Mar 12 18:09:25 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + + * TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp: + Removed warnings in generated code. + + * TAO_IDL/be/be_helper.cpp: + Cosmetic changes. + Fri Mar 12 16:17:40 1999 Darrell Brunsch <brunsch@cs.wustl.edu> * orbsvcs/tests/ImplRepo/client.cpp: diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 0618cf5aed4..a1c20ffbca5 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -28,7 +28,7 @@ ACE_RCSID(be, be_helper, "$Id$") static const char copyright [] = "/* -*- C++ -*- */\n\n\ // ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******\n\ -// TAO ORB and the TAO IDL Compiler have been developed by Washington \n\ +// TAO ORB and the TAO IDL Compiler have been developed by Washington\n\ // University Computer Science's Distributed Object Computing Group.\n\ //\n\ // Information on TAO is available at\n\ diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp index 1f34d2a73ae..5c20605093f 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp @@ -75,10 +75,10 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) << "operator>> (" << be_idt << be_idt_nl << "TAO_InputCDR &," << be_nl << node->name () << "_ptr &" << be_uidt_nl - << ");" << be_uidt << "\n"; + << ");" << be_uidt << "\n\n"; // Now it really the type to generate the operators for the members - // of the interface... + // of the interface... // set the substate as generating code for the types defined in our scope this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_SCOPE); @@ -101,27 +101,9 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) << "const " << node->name () << "_ptr _tao_objref" << be_uidt_nl << ")" << be_uidt_nl << "{" << be_idt_nl; - // hand over the encoding to the TAO's internal engine - // *os << "CORBA::Environment env;" << be_nl; - *os << "ACE_TRY_NEW_ENV" << be_nl - << "{" << be_idt_nl; - // resolve the nastiness created due to casting to void* and then to - // CORBA::Object_ptr *os << "CORBA::Object_ptr _tao_corba_obj = _tao_objref;" << be_nl; - *os << "if (TAO_MARSHAL_OBJREF::instance ()->" << be_nl - << " encode (0, &_tao_corba_obj, 0, &strm, ACE_TRY_ENV) == " - << be_nl - << " CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_idt_nl - << "return 1;" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_uidt_nl - << "}" << be_nl - << "ACE_CATCHANY" << be_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_nl - << "ACE_ENDTRY;" << be_nl - << "return 0;" << be_uidt_nl; - *os << "}\n\n"; + *os << "return (strm << _tao_corba_obj);" << be_uidt_nl + << "}\n\n"; // set the substate as generating code for the input operator this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT); @@ -137,26 +119,24 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) // *os << "CORBA::Environment env;" << be_nl; *os << "ACE_TRY_NEW_ENV" << be_nl << "{" << be_idt_nl; - *os << "CORBA::Object_ptr obj;" << be_nl; - *os << "if (TAO_MARSHAL_OBJREF::instance ()->" << be_nl - << " decode (0, &obj, 0, &strm, ACE_TRY_ENV) == " << be_nl - << " CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl - << "{" << be_idt_nl; - *os << "ACE_TRY_CHECK;" << be_nl; - *os << "// narrow to the right type" << be_nl; - *os << "_tao_objref = " << node->name () - << "::_narrow (obj, ACE_TRY_ENV);" << be_nl; + *os << "CORBA::Object_var obj;" << be_nl; + *os << "if ((strm >> obj.inout ()) == 0)" << be_idt_nl + << "return 0;" << be_uidt_nl + << "// narrow to the right type" << be_nl; + *os << "_tao_objref =" << be_idt_nl + << node->name () << "::_narrow (" << be_idt << be_idt_nl + << "obj.in ()," << be_nl + << "ACE_TRY_ENV" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl; *os << "ACE_TRY_CHECK;" << be_nl; - *os << "CORBA::release (obj);" << be_nl; *os << "return 1;" << be_uidt_nl; - *os << "}" << be_uidt_nl; *os << "}" << be_nl << "ACE_CATCHANY" << be_nl << "{" << be_idt_nl - << "return 0;" << be_uidt_nl + << "// do nothing" << be_uidt_nl << "}" << be_nl << "ACE_ENDTRY;" << be_nl - << "ACE_NOTREACHED (return 0);" << be_uidt_nl; + << "return 0;" << be_uidt_nl; *os << "}\n\n"; node->cli_stub_cdr_op_gen (1); |