summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_native
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
commit0e49389337be86641451a5c36c24bf742fe97523 (patch)
tree197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/TAO_IDL/be/be_visitor_native
parent8008dd09ccf88d4edef237a184a698cac42f2952 (diff)
downloadATCD-0e49389337be86641451a5c36c24bf742fe97523.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_native')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp65
1 files changed, 65 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..b92c9828434
--- /dev/null
+++ b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp
@@ -0,0 +1,65 @@
+//
+// $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 *Cookie;" << be_nl;
+ else if (ACE_OS::strcmp (node_name, "CORBA::VoidData") == 0)
+ *os << "typedef void *VoidData;" << be_nl;
+
+ node->cli_hdr_gen (true);
+ return 0;
+}
+