summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:21 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:21 +0000
commit3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch)
tree197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp
parent6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff)
downloadATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp72
1 files changed, 72 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp
new file mode 100644
index 00000000000..84d1bd214c5
--- /dev/null
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp
@@ -0,0 +1,72 @@
+//
+// $Id$
+//
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO IDL
+//
+// = FILENAME
+// ami_exception_holder_ch.cpp
+//
+// = DESCRIPTION
+// Visitor generating exception holders for the AMI callback model.
+//
+// = AUTHOR
+// Michael Kircher <Michael.Kircher@mchp.siemens.de>
+//
+// ============================================================================
+
+ACE_RCSID (be_visitor_valuetype,
+ ami_exception_holder_ch,
+ "$Id$")
+
+// ******************************************************
+// Interface visitor for client header.
+// ******************************************************
+
+be_visitor_valuetype_ami_exception_holder_ch::
+be_visitor_valuetype_ami_exception_holder_ch (be_visitor_context *ctx)
+ : be_visitor_valuetype (ctx)
+{
+}
+
+be_visitor_valuetype_ami_exception_holder_ch::
+~be_visitor_valuetype_ami_exception_holder_ch (void)
+{
+}
+
+int
+be_visitor_valuetype_ami_exception_holder_ch::visit_operation (
+ be_operation *node
+ )
+{
+ be_visitor_context ctx (*this->ctx_);
+
+ // Using the implementation class visitor is strange, but we
+ // do it here because it's the only one that generates the
+ // environment variable in the operation signature without
+ // the trailing _WITH_DEFAULTS, which is what we want.
+ // For performance reasons, we would rather there be a
+ // compile error if the user does not pass an environment
+ // variable, than create a default one, which causes extra
+ // TSS activity.
+ be_visitor_operation_ih visitor (&ctx);
+
+ if (node->accept (&visitor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_valuetype_"
+ "ami_exception_holder_ch::"
+ "visit_operation - "
+ "codegen for argument list failed\n"),
+ -1);
+ }
+
+ TAO_OutStream *os = this->ctx_->stream ();
+
+ *os << be_uidt;
+
+ return 0;
+}