summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp
new file mode 100644
index 00000000000..4b90947687d
--- /dev/null
+++ b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp
@@ -0,0 +1,57 @@
+//
+// $Id$
+//
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO IDL
+//
+// = FILENAME
+// root_ch.cpp
+//
+// = DESCRIPTION
+// Visitor generating code for Root in the client header
+//
+// = AUTHOR
+// Aniruddha Gokhale
+//
+// ============================================================================
+
+#include "idl.h"
+#include "idl_extern.h"
+#include "be.h"
+
+#include "be_visitor_root.h"
+
+
+// ********************************
+// Root visitor for client header
+// ********************************
+
+be_visitor_root_ch::be_visitor_root_ch (be_visitor_context *ctx)
+ : be_visitor_root (ctx)
+{
+}
+
+be_visitor_root_ch::~be_visitor_root_ch (void)
+{
+}
+
+int
+be_visitor_root_ch::init (void)
+{
+ // first open the client-side header file for writing
+ if (tao_cg->start_client_header (idl_global->be_get_client_hdr_fname ())
+ == -1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%N:%l) be_visitor_root_ch::init - "
+ "Error opening client header file\n"));
+ return -1;
+ }
+
+ // init the stream
+ this->ctx_->stream (tao_cg->client_header ());
+ return 0;
+}