2 //=============================================================================
4 * @file component_svth.cpp
6 * Visitor generating code for Components in the servant header.
10 //=============================================================================
12 #include "component.h"
14 be_visitor_component_svth::be_visitor_component_svth (be_visitor_context
*ctx
)
15 : be_visitor_component (ctx
),
16 os_ (*ctx
->stream ()),
17 export_macro_ (be_global
->svnt_export_macro ())
19 /// All existing CIAO examples set the servant export values in the CIDL
20 /// compiler to equal the IDL compiler's skel export values. Below is a
21 /// partial effort to decouple them, should be completely decoupled
22 /// sometime. See comment in codegen.cpp, line 1173.
23 if (export_macro_
== "")
25 export_macro_
= be_global
->skel_export_macro ();
29 be_visitor_component_svth::~be_visitor_component_svth ()
34 be_visitor_component_svth::visit_component (be_component
*node
)
36 if (node
->imported ())
41 /// Fills in the node's has_* members, for use in minimizing
45 /// Use 'CIAO_' + component's flat name.
47 << "namespace CIAO_" << node
->flat_name ()
51 // Generate the context class declaration.
52 be_visitor_context_svth
context_visitor (this->ctx_
);
54 if (context_visitor
.visit_component (node
) == -1)
56 ACE_ERROR_RETURN ((LM_ERROR
,
57 ACE_TEXT ("be_visitor_component_svth::")
58 ACE_TEXT ("visit_component - ")
59 ACE_TEXT ("context visitor failed\n")),
62 // // Generate the servant class declaration.
63 // be_visitor_servant_svh servant_visitor (this->ctx_);
65 // if (servant_visitor.visit_component (node) == -1)
67 // ACE_ERROR_RETURN ((LM_ERROR,
68 // ACE_TEXT ("be_visitor_component_svth::")
69 // ACE_TEXT ("visit_component - ")
70 // ACE_TEXT ("servant visitor failed\n")),
81 be_visitor_component_svth::visit_connector (be_connector
*node
)
83 return this->visit_component (node
);