Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / TAO_IDL / be / be_visitor_interface / interface_ci.cpp
blob10db08a89e377f49c78917a391d115a86f519e2c
2 //=============================================================================
3 /**
4 * @file interface_ci.cpp
6 * Visitor generating code for Interfaces in the client inline file
8 * @author Aniruddha Gokhale
9 */
10 //=============================================================================
12 #include "interface.h"
14 be_visitor_interface_ci::be_visitor_interface_ci (be_visitor_context *ctx)
15 : be_visitor_interface (ctx)
19 be_visitor_interface_ci::~be_visitor_interface_ci ()
23 int
24 be_visitor_interface_ci::visit_interface (be_interface *node)
26 if (node->imported ())
28 return 0;
31 // Generate inline methods for elements of our scope.
32 // This will always be done here for any non-imported node,
33 // whether the _var and _out code has been generated already
34 // at a forward declaration or not.
35 if (this->visit_scope (node) == -1)
37 ACE_ERROR_RETURN ((LM_ERROR,
38 "(%N:%l) be_visitor_interface_ci::"
39 "visit_interface - "
40 "codegen for scope failed\n"), -1);
43 // Nothing to generate for a local interface except from it scope.
44 if (node->is_local ())
46 node->cli_inline_gen (true);
47 return 0;
50 // A forward declared interface may have set this flag.
51 if (node->cli_inline_gen ())
53 return 0;
56 TAO_OutStream *os = this->ctx_->stream ();
58 TAO_INSERT_COMMENT (os);
60 if (node->is_abstract ())
62 *os << be_nl_2
63 << "ACE_INLINE" << be_nl
64 << node->name () << "::" << node->local_name ()
65 << " ()" << be_nl
66 << "{}" << be_nl_2;
68 *os << "ACE_INLINE" << be_nl
69 << node->name () << "::" << node->local_name ()
70 << " (const " << node->local_name () << " &rhs)" << be_idt_nl
71 << ": ::CORBA::AbstractBase (rhs)" << be_uidt_nl
72 << "{}";
75 // Generate the constructor from stub and servant.
76 node->gen_stub_ctor (os);
78 if (!node->is_local () && !node->is_abstract ())
80 *os << be_nl_2
81 << "ACE_INLINE" << be_nl;
82 *os << node->name () << "::"
83 << node->local_name () << " ("
84 << be_idt << be_idt_nl
85 << "::IOP::IOR *ior," << be_nl
86 << "TAO_ORB_Core *oc)" << be_uidt_nl;
87 *os << ": ::CORBA::Object (ior, oc)";
89 *os << be_uidt_nl
90 << "{" << be_nl
91 << "}" ;
94 node->cli_inline_gen (true);
95 return 0;
98 int
99 be_visitor_interface_ci::visit_component (be_component *node)
101 return this->visit_interface (node);
105 be_visitor_interface_ci::visit_connector (be_connector *node)
107 return this->visit_interface (node);