2 //=============================================================================
6 * Visitor generating code for the Root in the server skeletons file
8 * @author Aniruddha Gokhale
10 //=============================================================================
14 be_visitor_root_ss::be_visitor_root_ss (be_visitor_context
*ctx
)
15 : be_visitor_root (ctx
)
19 be_visitor_root_ss::~be_visitor_root_ss (void)
24 be_visitor_root_ss::visit_root (be_root
*node
)
26 if (this->init () == -1)
28 ACE_ERROR_RETURN ((LM_ERROR
,
29 ACE_TEXT ("be_visitor_root_ss::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_ss::visit_root - ")
38 ACE_TEXT ("codegen for scope failed\n")),
42 if (be_global
->gen_tie_classes ())
44 (void) tao_cg
->end_server_template_skeletons ();
47 (void) tao_cg
->end_server_skeletons ();
53 be_visitor_root_ss::init (void)
55 /// First open the server-side file for writing
57 tao_cg
->start_server_skeletons (
58 be_global
->be_get_server_skeleton_fname ());
62 ACE_ERROR_RETURN ((LM_ERROR
,
63 ACE_TEXT ("be_visitor_root_ss::init - ")
64 ACE_TEXT ("Error opening server header file\n")),
68 if (be_global
->gen_tie_classes ())
71 tao_cg
->start_server_template_skeletons (
72 be_global
->be_get_server_template_skeleton_fname ());
76 ACE_ERROR_RETURN ((LM_ERROR
,
77 ACE_TEXT ("be_visitor_root_ss::init - ")
78 ACE_TEXT ("Error opening server ")
79 ACE_TEXT ("template skeleton file\n")),
85 this->ctx_
->stream (tao_cg
->server_skeletons ());