summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_root/root_si.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_root/root_si.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root/root_si.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_root/root_si.cpp b/TAO/TAO_IDL/be/be_visitor_root/root_si.cpp
new file mode 100644
index 00000000000..86c0b7e6e71
--- /dev/null
+++ b/TAO/TAO_IDL/be/be_visitor_root/root_si.cpp
@@ -0,0 +1,54 @@
+//
+// $Id$
+//
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO IDL
+//
+// = FILENAME
+// root_si.cpp
+//
+// = DESCRIPTION
+// Visitor generating code for the Root in the server inline file
+//
+// = AUTHOR
+// Aniruddha Gokhale
+//
+// ============================================================================
+
+ACE_RCSID (be_visitor_root,
+ root_si,
+ "$Id$")
+
+// ***********************************************
+// Root visitor for server inline
+// ***********************************************
+
+be_visitor_root_si::be_visitor_root_si (be_visitor_context *ctx)
+ : be_visitor_root (ctx)
+{
+}
+
+be_visitor_root_si::~be_visitor_root_si (void)
+{
+}
+
+int
+be_visitor_root_si::init (void)
+{
+ // first open the file for writing
+ if (tao_cg->start_server_inline (be_global->be_get_server_inline_fname ())
+ == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_root_si::init - "
+ "server inline open failed\n"),
+ -1);
+ }
+
+ // init stream
+ this->ctx_->stream (tao_cg->server_inline ());
+ return 0;
+}