2 //=============================================================================
4 * @file component_svts.cpp
6 * Visitor generating code for Components in the templated servant source.
10 //=============================================================================
12 #include "component.h"
14 be_visitor_component_svts::be_visitor_component_svts (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_svts::~be_visitor_component_svts ()
34 be_visitor_component_svts::visit_component (be_component
*node
)
36 if (node
->imported ())
41 /// Use 'CIAO_' + component's flat name.
43 << "namespace CIAO_" << node
->flat_name ()
47 be_visitor_context_svts
context_visitor (this->ctx_
);
49 if (context_visitor
.visit_component (node
) == -1)
51 ACE_ERROR_RETURN ((LM_ERROR
,
52 ACE_TEXT ("be_visitor_component_svts::")
53 ACE_TEXT ("visit_component - ")
54 ACE_TEXT ("context visitor failed\n")),
58 // be_visitor_servant_svs servant_visitor (this->ctx_);
60 // if (servant_visitor.visit_component (node) == -1)
62 // ACE_ERROR_RETURN ((LM_ERROR,
63 // ACE_TEXT ("be_visitor_component_svts::")
64 // ACE_TEXT ("visit_component - ")
65 // ACE_TEXT ("servant visitor failed\n")),
76 be_visitor_component_svts::visit_connector (be_connector
*node
)
78 return this->visit_component (node
);