summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-06-30 22:18:16 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-06-30 22:18:16 +0000
commitb10f8fc37382f4ab610702dfc8e6a3f69a0a85df (patch)
tree21d99d946cb538ebb3c51110ce842fa4c0a86bff
parent71edab48cb2e612288dac7db4d50b288701e7b64 (diff)
downloadATCD-IDL3.tar.gz
ChangeLogTag: Sun Jun 30 17:15:52 2002 Jeff Parsons <parsons@cs.wustl.edu>IDL3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp49
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_valuetype/arglist.h3
2 files changed, 51 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
index 0b984e62acb..4fc80e5de03 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp
@@ -41,6 +41,40 @@ be_visitor_obv_operation_arglist::~be_visitor_obv_operation_arglist (void)
{
}
+int
+be_visitor_obv_operation_arglist::is_amh_exception_holder (be_operation *node)
+{
+ UTL_Scope *scope = node->defined_in ();
+ be_interface *iface = be_interface::narrow_from_scope (scope);
+
+ int is_an_amh_exception_holder = 0;
+
+ if (iface != 0)
+ {
+ const char *amh_underbar = "AMH_";
+ const char *node_name = iface->local_name ();
+
+ if( amh_underbar[0] == node_name[0] &&
+ amh_underbar[1] == node_name[1] &&
+ amh_underbar[2] == node_name[2] &&
+ amh_underbar[3] == node_name[3]
+ ) // node name starts with "AMH_"
+ {
+ //ACE_DEBUG ((LM_DEBUG, "Passed first test of amh_excepholder \n"));
+ const char *last_E = ACE_OS::strrchr (iface->full_name (), 'E');
+
+ if (last_E != 0
+ && ACE_OS::strcmp (last_E, "ExceptionHolder") == 0)
+ {
+ //ACE_DEBUG ((LM_DEBUG, "obv_operation: Passed second test of amh_excepholder \n"));
+ is_an_amh_exception_holder = 1;
+ }
+ }
+ }
+
+ return is_an_amh_exception_holder;
+}
+
int
be_visitor_obv_operation_arglist::visit_operation (be_operation *node)
{
@@ -102,8 +136,21 @@ 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.
- *os << " = 0;" << be_nl;
+ // BUT, not if it is an AMH ExceptionHolder!
+ /***********************************************************/
+ if (is_amh_exception_holder (node))
+ {
+ *os << "{ this->exception->_raise (); }"
+ << be_uidt_nl;
+ }
+ /***********************************************************/
+ else
+ {
+ *os << " = 0;" << be_uidt_nl;
+ }
break;
case TAO_CodeGen::TAO_OBV_OPERATION_ARGLIST_IH:
break;
diff --git a/TAO/TAO_IDL/be_include/be_visitor_valuetype/arglist.h b/TAO/TAO_IDL/be_include/be_visitor_valuetype/arglist.h
index e9b6747180d..9e8002f517a 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_valuetype/arglist.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_valuetype/arglist.h
@@ -41,6 +41,9 @@ public:
~be_visitor_obv_operation_arglist (void);
// destructor
+ int is_amh_exception_holder (be_operation *node);
+ // special arglist generation for amh_exceptionholders
+
int visit_operation (be_operation *node);
// visit the operation