summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-02-01 17:31:16 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-02-01 17:31:16 +0000
commitb9b455236a35d5684888ec2c988b9f14cd7a78ea (patch)
tree37eea79e092349814352d6283bcd3c2a842d5309
parent29f0881797ff186edaf910c0f17059244661fb67 (diff)
downloadATCD-b9b455236a35d5684888ec2c988b9f14cd7a78ea.tar.gz
ChangeLogTag: Tue Feb 1 11:17:10 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog21
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp36
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp10
-rw-r--r--TAO/tao/Any_Array_Impl_T.cpp1
5 files changed, 46 insertions, 30 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index d4a92784cf5..147732af520 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,24 @@
+Tue Feb 1 11:17:10 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_interface/interface_cs.cpp:
+ * TAO_IDL/be/be_visitor_interface/interface_ss.cpp:
+ * TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp:
+
+ - Converted more generated C-style casts to C++-style casts, in
+ _is_a() (stub side), _non_existent_skel(), _is_a_skel(),
+ _interface_skel(), and _component_skel().
+
+ - Refactored generated code for _this() to eliminate an
+ IF block.
+
+ Thanks to Johnny Willemsen <jwillemsen@remedy.nl> for
+ the above suggestions.
+
+ * tao/Any_Array_Impl_T.cpp:
+
+ Added #include of SystemException.h. The definition of
+ _tao_decode() at the end of the file now seems to need it.
+
Tue Feb 1 13:39:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
* tao/FlResource.mpc:
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
index 91451e2bc0c..50c10d3c5ac 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
@@ -380,14 +380,14 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
if (node->is_abstract () || node->has_mixed_parentage ())
{
*os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
- << "(char *)value," << be_nl
+ << "value," << be_nl
<< "\"IDL:omg.org/CORBA/AbstractBase:1.0\"" << be_uidt_nl
<< ")";
}
else if (node->is_local ())
{
*os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
- << "(char *)value," << be_nl
+ << "value," << be_nl
<< "\"IDL:omg.org/CORBA/LocalObject:1.0\"" << be_uidt_nl
<< ")";
}
@@ -404,12 +404,12 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
if (! node->is_abstract ())
{
*os << "!ACE_OS::strcmp (" << be_idt << be_idt_nl
- << "(char *)value," << be_nl
+ << "value," << be_nl
<< "\"IDL:omg.org/CORBA/Object:1.0\"" << be_uidt_nl
<< ")" << be_uidt << be_uidt_nl;
}
- *os << " )" << be_nl
+ *os << ")" << be_nl
<< "{" << be_idt_nl
<< "return 1; // success using local knowledge" << be_uidt_nl
<< "}" << be_uidt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
index be9fcb60c0d..80abebb3547 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp
@@ -174,7 +174,8 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
<< be_nl << be_nl;
*os << full_skel_name << " *_tao_impl =" << be_idt_nl
- << "(" << full_skel_name << " *) _tao_servant;" << be_uidt_nl << be_nl;
+ << "reinterpret_cast<" << full_skel_name
+ << " *> (_tao_servant);" << be_uidt_nl << be_nl;
*os << "CORBA::Boolean _tao_retval = 0;" << be_nl;
*os << "CORBA::String_var value;" << be_nl << be_nl;
@@ -233,7 +234,8 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
<< ")" << be_uidt_nl;
*os << "{" << be_idt_nl;
*os << full_skel_name << " *_tao_impl =" << be_idt_nl
- << "(" << full_skel_name << " *) _tao_servant;" << be_uidt_nl << be_nl;
+ << "reinterpret_cast<" << full_skel_name
+ << " *> (_tao_servant);" << be_uidt_nl << be_nl;
*os << "CORBA::Boolean _tao_retval =" << be_idt_nl
<< "_tao_impl->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);"
@@ -284,7 +286,8 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
<< "ACE_THROW (CORBA::INTF_REPOS ());" << be_uidt_nl
<< "}" << be_uidt_nl << be_nl;
*os << full_skel_name << " *_tao_impl =" << be_idt_nl
- << "(" << full_skel_name << " *) _tao_servant;" << be_uidt_nl << be_nl;
+ << "reinterpret_cast<" << full_skel_name
+ << " *> (_tao_servant);" << be_uidt_nl << be_nl;
*os << "CORBA::InterfaceDef_ptr _tao_retval = " << be_idt_nl
<< "_tao_impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER);"
@@ -320,8 +323,8 @@ be_visitor_interface_ss::visit_interface (be_interface *node)
<< ")" << be_uidt_nl;
*os << "{" << be_idt_nl;
*os << full_skel_name << " *_tao_impl =" << be_idt_nl
- << "(" << full_skel_name << " *) _tao_object_reference;"
- << be_uidt_nl << be_nl;
+ << "reinterpret_cast<" << full_skel_name
+ << " *> (_tao_object_reference);" << be_uidt_nl << be_nl;
*os << "CORBA::Object_var _tao_retval =" << be_idt_nl
<< "_tao_impl->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);"
@@ -533,25 +536,16 @@ be_visitor_interface_ss::this_method (be_interface *node)
<< "ACE_CHECK_RETURN (0);" << be_nl << be_nl
<< "TAO_Stub_Auto_Ptr safe_stub (stub);" << be_nl;
- *os << "CORBA::Object_ptr tmp = CORBA::Object::_nil ();" << be_nl
- << be_nl
- << "if (stub->servant_orb_var ()->orb_core ()->"
- << "optimize_collocation_objects ())" << be_idt_nl
- << "{" << be_idt_nl
- << "ACE_NEW_RETURN (" << be_idt << be_idt_nl
- << "tmp," << be_nl
- << "CORBA::Object (stub, 1, this)," << be_nl
- << "0" << be_uidt_nl
- << ");" << be_uidt << be_uidt_nl
- << "}" << be_uidt_nl
- << "else" << be_idt_nl
- << "{" << be_idt_nl
+ *os << "CORBA::Object_ptr tmp = CORBA::Object::_nil ();"
+ << be_nl << be_nl
+ << "CORBA::Boolean _tao_opt_colloc =" << be_idt_nl
+ << "stub->servant_orb_var ()->orb_core ()->"
+ << "optimize_collocation_objects ();" << be_uidt_nl << be_nl
<< "ACE_NEW_RETURN (" << be_idt << be_idt_nl
<< "tmp," << be_nl
- << "CORBA::Object (stub, 0, this)," << be_nl
+ << "CORBA::Object (stub, _tao_opt_colloc, this)," << be_nl
<< "0" << be_uidt_nl
- << ");" << be_uidt << be_uidt_nl
- << "}" << be_uidt_nl << be_nl;
+ << ");" << be_uidt_nl << be_nl;
*os << "CORBA::Object_var obj = tmp;" << be_nl
<< "(void) safe_stub.release ();" << be_nl << be_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp
index 6c8aa07b375..345e59d88a2 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp
@@ -74,6 +74,7 @@ be_visitor_valuetype_cdr_op_cs::visit_valuetype (be_valuetype *node)
// Set the sub state as generating code for the output operator.
this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT);
+
*os << "CORBA::Boolean" << be_nl
<< "operator<< (" << be_idt << be_idt_nl
<< "TAO_OutputCDR &strm," << be_nl
@@ -84,11 +85,10 @@ be_visitor_valuetype_cdr_op_cs::visit_valuetype (be_valuetype *node)
*os << "return" << be_idt_nl
<< "CORBA::ValueBase::_tao_marshal (" << be_idt << be_idt_nl
<< "strm," << be_nl
- << "const_cast<" << be_idt << be_idt_nl
- << node->full_name () << " *> (" << be_nl
- << "_tao_valuetype" << be_uidt_nl
- << ")," << be_uidt_nl
- << "(ptrdiff_t) &" << node->full_name () <<"::_downcast"
+ << "const_cast<" << node->full_name ()
+ << " *> (_tao_valuetype)," << be_nl
+ << "reinterpret_cast<ptrdiff_t> (&"
+ << node->full_name () << "::_downcast)"
<< be_uidt_nl
<< ");" << be_uidt << be_uidt << be_uidt_nl
<< "}" << be_nl << be_nl;
diff --git a/TAO/tao/Any_Array_Impl_T.cpp b/TAO/tao/Any_Array_Impl_T.cpp
index 22760549b42..49acebc0e43 100644
--- a/TAO/tao/Any_Array_Impl_T.cpp
+++ b/TAO/tao/Any_Array_Impl_T.cpp
@@ -8,6 +8,7 @@
#include "tao/Marshal.h"
#include "tao/debug.h"
#include "tao/CDR.h"
+#include "tao/SystemException.h"
#include "ace/CORBA_macros.h"
#include "ace/Auto_Ptr.h"