summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-30 10:21:53 +0000
committermk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-30 10:21:53 +0000
commitb0a2d132608c159cd59072281f044ccc62506f95 (patch)
tree1d2e1b44d1aac832199e0b61c577a3e504d120e4
parent238f6db29274d1338436622533a79c16d5114477 (diff)
downloadATCD-b0a2d132608c159cd59072281f044ccc62506f95.tar.gz
ChangeLogTag: Thu Sep 30 05:20:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de>
-rw-r--r--TAO/ChangeLog-99c27
-rw-r--r--TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp9
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp11
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp19
-rw-r--r--TAO/docs/releasenotes/index.html15
-rw-r--r--TAO/examples/Simple/time-date/Time_Date.dsp4
-rw-r--r--TAO/tests/AMI/client.cpp20
-rw-r--r--TAO/tests/AMI/simple_client.cpp26
9 files changed, 101 insertions, 32 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 3f2daec4ae2..690f7266df7 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,30 @@
+Thu Sep 30 05:20:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de>
+
+ * TAO_IDL/be/be_visitor_ami_pre_proc.cpp,
+ TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp:
+ Getting exceptions to work correctly.
+
+ * TAO_IDL/be/be_visitor_valuetype/field_ch.cpp:
+ Added missing const in readonly accessor of sequence.
+ Thanks to Torsten Kuepper <kuepper2@uni-wuppertal.de>
+ for sending this fix.
+
+ * TAO_IDL/be/be_visitor_valuetype/field_cs.cpp:
+ Changed set accessor of sequence member.
+ Thanks to Torsten Kuepper <kuepper2@uni-wuppertal.de>
+ for sending this fix.
+
+ * docs/releasenotes/index.html: Documented the current
+ status of AMI.
+
+ * examples/Simple/time-date/Time_Date.dsp:
+ Added the Time_Date.h file to the project file.
+
+ * tests/AMI/client.cpp,
+ tests/AMI/simple_client.cpp:
+ Enhanced the test to do proper exception handling
+ testing, which works now again!
+
Thu Sep 30 02:04:37 1999 Marina Spivak <marina@cs.wustl.edu>
* tao/Object.cpp:
diff --git a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
index 423cb088fc7..37eac53e169 100644
--- a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
@@ -328,13 +328,12 @@ be_visitor_ami_pre_proc::create_exception_holder (be_interface *node)
operation->set_defined_in (excep_holder);
// @@ Michael: this needs a fix!
- AST_Operation *op_base = ACE_reinterpret_cast (AST_Operation *,
- op);
+ be_operation *orig_op = be_operation::narrow_from_decl (op);
// Copy the exceptions.
- if (op_base->exceptions ())
+ if (orig_op->exceptions ())
{
- UTL_ExceptList *exceptions = (UTL_ExceptList *)op_base->exceptions ()->copy ();
+ UTL_ExceptList *exceptions = orig_op->exceptions ();
operation->be_add_exceptions (exceptions);
}
@@ -742,7 +741,7 @@ be_visitor_ami_pre_proc::create_excep_operation (be_operation *node,
field_type->set_defined_in (node->defined_in ());
#endif /* 0 */
// Create the argument
- be_argument *arg = new be_argument (AST_Argument::dir_OUT,
+ be_argument *arg = new be_argument (AST_Argument::dir_IN,
excep_holder, // is also a valuetype
new UTL_ScopedName (
new Identifier (
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp
index 88d4f2b0f12..b9c6f9b058f 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_skeleton_cs.cpp
@@ -215,11 +215,6 @@ be_visitor_operation_ami_handler_skeleton_cs::visit_operation (be_operation *nod
if (original->defined_in ()->scope_node_type () == AST_Decl::NT_module)
{
be_decl *scope = be_scope::narrow_from_scope (original->defined_in ())->decl ();
-#if 0
- *os << "ACE_NESTED_CLASS (OBV_"
- << scope->name() << ","
- << "_tao_" << original->compute_local_name ("AMI_", "ExceptionHolder") << ")";
-#endif /* 0 */
*os << "OBV_" << scope->name() << "::"
<< "_tao_" << original->compute_local_name ("AMI_", "ExceptionHolder");
}
@@ -236,7 +231,11 @@ be_visitor_operation_ami_handler_skeleton_cs::visit_operation (be_operation *nod
<< "exception_holder_var->marshaled_exception (marshaled_exception_var.in ());" << be_nl;
*os << "if (reply_status == TAO_AMI_REPLY_SYSTEM_EXCEPTION)" << be_idt_nl
- << " exception_holder_var->is_system_exception (1);" << be_uidt_nl << be_nl
+ << "exception_holder_var->is_system_exception (1);" << be_uidt_nl
+ << "else" << be_idt_nl
+ << "exception_holder_var->is_system_exception (0);" << be_uidt_nl
+ << "exception_holder_var->byte_order (ACE_CDR_BYTE_ORDER);" << be_nl
+ << be_nl
<< "_tao_reply_handler_object->foo_excep (exception_holder_var," << be_nl
<< " ACE_TRY_ENV);" << be_uidt_nl
<< "}" << be_uidt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp
index 057e7d411fb..5b8affbc45d 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp
@@ -134,7 +134,7 @@ be_visitor_valuetype_field_ch::visit_array (be_array *node)
// the get method
*os << pre_op() << "const _" << bt->local_name ()
<< "_slice * " << ub->local_name ()
- << " (void)" << post_op() << be_nl;
+ << " (void) const" << post_op() << be_nl;
*os << pre_op() << "_" << bt->local_name ()
<< "_slice * " << ub->local_name ()
<< " (void)" << post_op();
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp
index 86dadbaaca9..7b015a86a95 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp
@@ -671,19 +671,12 @@ be_visitor_valuetype_field_cs::visit_sequence (be_sequence *node)
<< " (const " << bt->name () << " &val)" << be_nl
<< "{" << be_idt_nl;
- *os << "ACE_NEW (" << be_idt << be_idt_nl
- << "this->" << bu->field_pd_prefix() << ub->local_name ()
- << bu->field_pd_postfix() << "," << be_nl
- << bt->name () << " (val)" << be_uidt_nl
- << ");" << be_uidt << be_uidt_nl;
-
-// This was replaced by the above output statement, but this doesn't work
-// *os << "this->"
-// << bu->field_pd_prefix() << ub->local_name () << bu->field_pd_postfix()
-// << " = new "
-// << bt->name () << " (val);" << be_uidt_nl;
+ *os << "this->"
+ << bu->field_pd_prefix() << ub->local_name ()
+ << bu->field_pd_postfix()
+ << " = val;" << be_uidt_nl;
- *os << "}" << be_nl;
+ *os << "}" << be_nl << be_nl;
// readonly get method
*os << "// readonly get method " << be_nl
@@ -695,7 +688,7 @@ be_visitor_valuetype_field_cs::visit_sequence (be_sequence *node)
<< "return this->" // %! *this (seq_var, not seq member)
<< bu->field_pd_prefix() << ub->local_name () << bu->field_pd_postfix()
<< ";" << be_uidt_nl
- << "}" << be_nl;
+ << "}" << be_nl << be_nl;
// read/write get method
*os << "// read/write get method " << be_nl
diff --git a/TAO/docs/releasenotes/index.html b/TAO/docs/releasenotes/index.html
index c2e9de9800b..9b84621ddf8 100644
--- a/TAO/docs/releasenotes/index.html
+++ b/TAO/docs/releasenotes/index.html
@@ -1376,13 +1376,22 @@ Points of contact: <a href="mailto:alex@cs.wustl.edu">Alexander Arulanthu</a>
<ul>
Currently only the callback model of the Messaging Specification is implemented.
To activate the AMI for TAO and the TAO IDL
-compiler define <tt>TAO_HAS_CORBA_MESSAGING</tt> and <tt>TAO_HAS_AMI_CALLBACK</tt>
+compiler define <tt>TAO_HAS_CORBA_MESSAGING</tt>, <tt>TAO_HAS_AMI_CALLBACK</tt>,
+<tt>TAO_HAS_VALUETYPE</tt> and <tt>IDL_HAS_VALUETYPE</tt>
in your config.h file.
-The TAO IDL compiler can generate the stubs and client-side skeletons
+The TAO IDL compiler can generate the AMI stubs, ReplyHandler und reply stubs
using the -GC switch.</ul>
-<p> Future Work:
+<p> Finished work:
<ul>
+<li> Redesign of the IDL compiler to make an addtional pass over
+the AbstractSyntaxTree and generate the implied-IDL code in memory.
+This reduced the amount of AMI specific IDL compiler code dramatically.</li>
<li>Support for exceptions</li>
+</ul>
+<p> Future Work:
+<ul>
+<li>Testing the current implementation</li>
+<li>Support for attributes</li>
<li>Implementation of the poller model.</li>
<li>Supporting deferred synchronous invocations.</li>
</ul>
diff --git a/TAO/examples/Simple/time-date/Time_Date.dsp b/TAO/examples/Simple/time-date/Time_Date.dsp
index 8aca99634a9..277a8ef06a2 100644
--- a/TAO/examples/Simple/time-date/Time_Date.dsp
+++ b/TAO/examples/Simple/time-date/Time_Date.dsp
@@ -113,6 +113,10 @@ SOURCE=.\Time_DateS.cpp
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
+SOURCE=.\Time_Date.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Time_Date_i.h
# End Source File
# Begin Source File
diff --git a/TAO/tests/AMI/client.cpp b/TAO/tests/AMI/client.cpp
index e76701a3b3e..52c83c9391c 100644
--- a/TAO/tests/AMI/client.cpp
+++ b/TAO/tests/AMI/client.cpp
@@ -113,7 +113,25 @@ public:
number_of_replies--;
};
-
+ void foo_excep (A::AMI_AMI_TestExceptionHolder * excep_holder,
+ CORBA::Environment &ACE_TRY_ENV)
+ {
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Callback method <foo_excep> called: \n"));
+ ACE_TRY
+ {
+ excep_holder->raise_foo ();
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Catched exception:");
+ }
+ ACE_ENDTRY;
+ };
+
+
~Handler (void) {};
};
diff --git a/TAO/tests/AMI/simple_client.cpp b/TAO/tests/AMI/simple_client.cpp
index 159042d63ff..522f35069f6 100644
--- a/TAO/tests/AMI/simple_client.cpp
+++ b/TAO/tests/AMI/simple_client.cpp
@@ -97,12 +97,22 @@ public:
}
};
- void foo_excep (A::AMI_AMI_TestExceptionHolder_out excep_holder,
+ void foo_excep (A::AMI_AMI_TestExceptionHolder * excep_holder,
CORBA::Environment &ACE_TRY_ENV)
{
ACE_DEBUG ((LM_DEBUG,
"Callback method <foo_excep> called: \n"));
+ ACE_TRY
+ {
+ excep_holder->raise_foo ();
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Catched exception:");
+ }
+ ACE_ENDTRY;
};
@@ -183,7 +193,17 @@ main (int argc, char *argv[])
A::AMI_AMI_TestHandler_var the_handler_var =
handler._this (ACE_TRY_ENV);
ACE_TRY_CHECK;
-
+
+ // Trigger the DidNotWork exception on the server side
+ // by sending 0 to it.
+ ACE_DEBUG ((LM_DEBUG,
+ "Sending asynch message\n"));
+
+ ami_test_var->sendc_foo (the_handler_var.in (),
+ 0,
+ "Let's talk AMI.",
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
CORBA::Long l = 931247;
@@ -194,7 +214,7 @@ main (int argc, char *argv[])
ni));
ami_test_var->sendc_foo (the_handler_var.in (),
- 0,
+ l,
"Let's talk AMI.",
ACE_TRY_ENV);
ACE_TRY_CHECK;