summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_interface/interceptors_cs.cpp
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-08-19 00:03:53 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-08-19 00:03:53 +0000
commit326aa4307318128f76f74fcaa29b1b13586fc63a (patch)
tree1824f40048b8722f0fd6afc49f46f9188d765c23 /TAO/TAO_IDL/be/be_visitor_interface/interceptors_cs.cpp
parentcf1598a29c47934ff5e7c75e39f3fb5571b76371 (diff)
downloadATCD-326aa4307318128f76f74fcaa29b1b13586fc63a.tar.gz
Portable Interceptor changes
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_interface/interceptors_cs.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interceptors_cs.cpp99
1 files changed, 99 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interceptors_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interceptors_cs.cpp
new file mode 100644
index 00000000000..cb64e83181a
--- /dev/null
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interceptors_cs.cpp
@@ -0,0 +1,99 @@
+//
+// $Id$
+//
+// ============================================================================
+//
+// = LIBRARY
+// TAO IDL
+//
+// = FILENAME
+// interceptors_cs.cpp
+//
+// = DESCRIPTION
+// This provides code generation for interceptor classes for an
+// interface in the client header.
+//
+// = AUTHOR
+// Kirthika Parameswaran <kirthika@cs.wustl.edu>
+//
+// ============================================================================
+
+#include "idl.h"
+#include "idl_extern.h"
+#include "be.h"
+
+#include "be_visitor_interface.h"
+
+ACE_RCSID(be_visitor_interface, interceptors_cs, "$Id$")
+
+
+// ************************************************************
+// interceptor class in header
+// ************************************************************
+
+
+be_visitor_interface_interceptors_cs::be_visitor_interface_interceptors_cs
+(be_visitor_context *ctx)
+ : be_visitor_interface (ctx)
+{
+}
+
+be_visitor_interface_interceptors_cs::~be_visitor_interface_interceptors_cs (void)
+{
+}
+
+int be_visitor_interface_interceptors_cs::visit_interface (be_interface *node)
+{
+
+ TAO_OutStream *os = this->ctx_->stream ();
+
+ be_type *bt;
+
+ // set the right type;
+ if (this->ctx_->alias ())
+ bt = this->ctx_->alias ();
+ else
+ bt = node;
+ // output the class defn
+
+ // generate code for the interface definition by traversing thru the
+ // elements of its scope. We depend on the front-end to have made sure
+ // that only legal syntactic elements appear in our scope.
+
+ os->indent ();
+ *os << "\n#if (TAO_HAS_INTERCEPTORS == 1)" << be_nl;
+
+ // generate code for the interface definition by traversing thru the
+ // elements of its scope. We depend on the front-end to have made sure
+ // that only legal syntactic elements appear in our scope.
+
+ os->indent ();
+ if (this->visit_scope (node) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_interface_ch::"
+ "visit_interface - "
+ "codegen for scope failed\n"), -1);
+ }
+ /*
+ be_visitor_context ctx (*this->ctx_);
+ be_visitor *visitor = 0;
+ // Interceptor related classes.
+ ctx.state (TAO_CodeGen::TAO_OPERATION_INTERCEPTORS_CS);
+ visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor || (node->accept (visitor) == -1))
+ {
+ delete visitor;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "be_visitor_interface_cs::"
+ "visit_interface - "
+ "codegen for interceptor classes failed\n"),
+ -1);
+ }
+ delete visitor;*/
+
+ *os << "#endif /* TAO_HAS_INTERCEPTORS */\n";
+
+ return 0;
+
+}