summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-06-20 07:33:02 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-06-20 07:33:02 +0000
commitdd02662ca476b78c0fe131b20854ad953de9805d (patch)
tree2af11857d3f420b17c192509872ca944090df2ae /TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp
parentacb447b0fa8985b7010af7f1f1dd172fcff4f11d (diff)
downloadATCD-dd02662ca476b78c0fe131b20854ad953de9805d.tar.gz
ChangeLogTag: Tue Jun 20 07:04:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp
new file mode 100644
index 00000000000..fe378cf0664
--- /dev/null
+++ b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp
@@ -0,0 +1,63 @@
+//
+// $Id$
+//
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO IDL
+//
+// = FILENAME
+// enum_ch.cpp
+//
+// = DESCRIPTION
+// Visitor generating code for Native in the client header
+//
+// = AUTHOR
+// Johnny Willemsen
+//
+// ============================================================================
+
+#include "be_visitor_typecode/typecode_decl.h"
+
+ACE_RCSID (be_visitor_native,
+ native_ch,
+ "$Id$")
+
+
+// ********************************************************************
+// Visitor implementation for the Native type
+// This one for the client header file
+// ********************************************************************
+
+be_visitor_native_ch::be_visitor_native_ch (be_visitor_context *ctx)
+ : be_visitor_scope (ctx)
+{
+}
+
+be_visitor_native_ch::~be_visitor_native_ch (void)
+{
+}
+
+// Visit the native_ch node and its scope.
+int
+be_visitor_native_ch::visit_native (be_native *node)
+{
+ if (node->cli_hdr_gen () || node->imported ())
+ {
+ return 0;
+ }
+
+ TAO_OutStream *os = this->ctx_->stream ();
+
+ *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
+ << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl;
+
+ const char *node_name = node->full_name ();
+ if (ACE_OS::strcmp (node_name, "PortableServer::ServantLocator::Cookie") == 0)
+ *os << "typedef void *" << node->full_name () << ";" << be_nl;
+
+ node->cli_hdr_gen (true);
+ return 0;
+}
+