diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp index fa2aebe35da..cc3a5b0470e 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/direct_collocated_sh.cpp @@ -19,37 +19,38 @@ // // ============================================================================ -#include "idl.h" -#include "idl_extern.h" -#include "be.h" - -#include "be_visitor_interface.h" - -ACE_RCSID(be_visitor_interface, direct_collocated_sh, "$Id$") +ACE_RCSID (be_visitor_interface, + direct_collocated_sh, + "$Id$") // ************************************************************ // direct_collocated class in header // ************************************************************ -be_visitor_interface_direct_collocated_sh::be_visitor_interface_direct_collocated_sh -(be_visitor_context *ctx) +be_visitor_interface_direct_collocated_sh:: +be_visitor_interface_direct_collocated_sh (be_visitor_context *ctx) : be_visitor_interface (ctx) { } -be_visitor_interface_direct_collocated_sh::~be_visitor_interface_direct_collocated_sh (void) +be_visitor_interface_direct_collocated_sh:: +~be_visitor_interface_direct_collocated_sh (void) { } -int be_visitor_interface_direct_collocated_sh::visit_interface (be_interface *node) +int be_visitor_interface_direct_collocated_sh::visit_interface ( + be_interface *node + ) { TAO_OutStream *os = this->ctx_->stream (); - os->gen_ifdef_macro (node->flat_name (), "_direct_collocated"); + os->gen_ifdef_macro (node->flat_name (), + "_direct_collocated"); - // output the class defn + // Output the class definition. os->indent (); + *os << "class " << be_global->skel_export_macro () << " " << node->local_coll_name (be_interface::DIRECT); @@ -65,13 +66,17 @@ int be_visitor_interface_direct_collocated_sh::visit_interface (be_interface *no be_interface* parent = be_interface::narrow_from_decl (node->inherits()[i]); *os << be_nl << ", public virtual " - << be_interface::relative_name (parent->full_coll_name (be_interface::DIRECT), - node->full_coll_name (be_interface::DIRECT)); + << be_interface::relative_name ( + parent->full_coll_name (be_interface::DIRECT), + node->full_coll_name (be_interface::DIRECT) + ); } } + *os << be_uidt << be_uidt_nl << "{" << be_nl << "public:\n"; + os->incr_indent (); *os << node->local_coll_name (be_interface::DIRECT) << " (\n"; @@ -91,10 +96,12 @@ int be_visitor_interface_direct_collocated_sh::visit_interface (be_interface *no << " servant," << be_nl; *os << "TAO_Stub *stub\n"; + os->decr_indent (); + *os << ");\n"; - os->decr_indent (0); + os->decr_indent (0); os->indent (); *os << "virtual CORBA::Boolean _is_a" << be_idt @@ -133,18 +140,22 @@ int be_visitor_interface_direct_collocated_sh::visit_interface (be_interface *no os->decr_indent (); *os << be_nl << "private:\n"; + os->incr_indent (); + if (!node->is_nested ()) { // The skeleton name is the outermost, we need to printout the // POA_ prefix that goes with it. *os << "POA_"; } + *os << node->local_name () << "_ptr servant_;\n"; + os->decr_indent (); + *os << "};\n\n"; os->gen_endif (); - return 0; } |