2 //=============================================================================
6 * Visitor generating code for Root in the CIAO template servant source
10 //=============================================================================
14 be_visitor_root_svts::be_visitor_root_svts (be_visitor_context
*ctx
)
15 : be_visitor_root (ctx
)
19 be_visitor_root_svts::~be_visitor_root_svts ()
24 be_visitor_root_svts::visit_root (be_root
*node
)
26 if (this->init () == -1)
28 ACE_ERROR_RETURN ((LM_ERROR
,
29 ACE_TEXT ("be_visitor_root_svts::init - ")
30 ACE_TEXT ("failed to initialize\n")),
34 if (this->visit_scope (node
) == -1)
36 ACE_ERROR_RETURN ((LM_ERROR
,
37 ACE_TEXT ("be_visitor_root_svts::visit_root - ")
38 ACE_TEXT ("codegen for scope failed\n")),
42 (void) tao_cg
->end_ciao_svnt_template_source ();
48 be_visitor_root_svts::init ()
50 // First open the client-side header file for writing.
52 tao_cg
->start_ciao_svnt_template_source (
53 be_global
->be_get_ciao_tmpl_svnt_src_fname ());
57 ACE_ERROR_RETURN ((LM_ERROR
,
58 ACE_TEXT ("be_visitor_root_svts::init - ")
59 ACE_TEXT ("Error opening CIAO servant ")
60 ACE_TEXT ("source file\n")),
64 // Initialize the stream.
65 this->ctx_
->stream (tao_cg
->ciao_svnt_template_source ());