summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_valuetype
diff options
context:
space:
mode:
authormayur <mayur@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-06-06 21:36:02 +0000
committermayur <mayur@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-06-06 21:36:02 +0000
commit49dccf135fbb933fde13413f413a9f227ea9db20 (patch)
tree900e7ef3c5344e604da709ef884230234f1347b1 /TAO/TAO_IDL/be/be_visitor_valuetype
parentd73bcbbe15cac76b1005e75c71c571a323dac73f (diff)
downloadATCD-49dccf135fbb933fde13413f413a9f227ea9db20.tar.gz
Thu Jun 6 13:36:22 2002 Mayur Deshpande <mayur@ics.uci.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_valuetype')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp9
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp18
2 files changed, 20 insertions, 7 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
index f72daf715bc..89a3c0c5422 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
@@ -68,7 +68,7 @@ be_visitor_obv_operation_arglist::is_amh_exception_holder (be_operation *node)
if (last_E != 0
&& ACE_OS::strcmp (last_E, "ExceptionHolder") == 0)
{
- //ACE_DEBUG ((LM_DEBUG, "Passed second test of amh_excepholder \n"));
+ //ACE_DEBUG ((LM_DEBUG, "obv_operation: Passed second test of amh_excepholder \n"));
is_an_amh_exception_holder = 1;
}
}
@@ -136,12 +136,17 @@ be_visitor_obv_operation_arglist::visit_operation (be_operation *node)
switch (this->ctx_->state ())
{
case TAO_CodeGen::TAO_OBV_OPERATION_ARGLIST_CH:
+ /***********************************************************/
+ // 2.1
// Each method is pure virtual in the Valuetype class.
// BUT, not if it is an AMH ExceptionHolder!
+ /***********************************************************/
if (is_amh_exception_holder (node))
{
- *os << "{ this->exception->_raise (); }" << be_uidt_nl;
+ *os << "{ this->exception->_raise (); }"
+ << be_uidt_nl;
}
+ /***********************************************************/
else
{
*os << " = 0;" << be_uidt_nl;
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
index b2c71d9978b..83079b6f2c5 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp
@@ -186,12 +186,14 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
** compiler again has to generate is superflous, unnecessary, more code
** bloat and unnecessary information for the app-programmer. The
** changes required for this (n the *C.h file) are:
- ** 2.1) Generate the raise_method as non-abstract.
+ ** 2.1) Generate the raise_method as non-abstract and provide a definition
+ ** in place
** 2.2) Generate a new constructor that takes in a CORBA::Exception*
** 2.3) Make the destructor public (instead of protected)
** 2.4) Generate a private CORBA::Exception* field.
** 2.5) Generate the tao_marshal and tao_unmarshal methods as
** non-abstarct.
+ ** 2.6) Generate the right throw spec for the AMH ExceptionHolders
***************************************************************************/
/****************************************************************/
@@ -213,7 +215,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
if (last_E != 0
&& ACE_OS::strcmp (last_E, "ExceptionHolder") == 0)
{
- //ACE_DEBUG ((LM_DEBUG, "Passed second test of amh_excepholder \n"));
+ //ACE_DEBUG ((LM_DEBUG, "visit_valuetype: Passed second test of amh_excepholder \n"));
is_an_amh_exception_holder = 1;
}
}
@@ -231,7 +233,10 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
/*********************************************************************/
// 2
if (is_an_amh_exception_holder)
- *os << "public virtual CORBA_DefaultValueRefCountBase" << be_uidt_nl;
+ {
+ *os << "public virtual CORBA_DefaultValueRefCountBase"
+ << be_uidt_nl;
+ }
/*********************************************************************/
else
*os << "public virtual CORBA_ValueBase" << be_uidt_nl;
@@ -339,8 +344,11 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node)
/*********************************************************/
// 2.4
- *os << "CORBA::Exception *exception;"
- << be_nl;
+ if (is_an_amh_exception_holder)
+ {
+ *os << "CORBA::Exception *exception;"
+ << be_nl;
+ }
/*********************************************************/