summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp
new file mode 100644
index 00000000000..66bb1bd3952
--- /dev/null
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp
@@ -0,0 +1,42 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file objref_typecode.cpp
+ *
+ * $Id$
+ *
+ * Object reference TypeCode generation visitor.
+ *
+ * @author Ossama Othman <ossama@dre.vanderbilt.edu>
+ */
+//=============================================================================
+
+
+TAO::be_visitor_objref_typecode::be_visitor_objref_typecode (
+ be_visitor_context * ctx)
+ : be_visitor_typecode_defn (ctx)
+{
+}
+
+int
+TAO::be_visitor_objref_typecode::visit_interface (be_interface * node)
+{
+ TAO_OutStream & os = *this->ctx_->stream ();
+
+ os << be_nl << be_nl
+ << "// TAO_IDL - Generated from" << be_nl
+ << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl;
+
+ // Generate the TypeCode instantiation.
+ os
+ << "static TAO::TypeCode::Objref<char const *," << be_nl
+ << " TAO::Null_RefCount_Policy> const"
+ << be_idt_nl
+ << "_tao_tc_" << node->flat_name () << " (" << be_idt_nl
+ << "\"" << node->repoID () << "\"," << be_nl
+ << "\"" << node->original_local_name () << "\");" << be_uidt_nl
+ << be_uidt_nl;
+
+ return this->gen_typecode_ptr (node);
+}