2 //=============================================================================
6 * Visitor generating code for Module in the server header
8 * @author Aniruddha Gokhale
10 //=============================================================================
14 be_visitor_module_sh::be_visitor_module_sh (be_visitor_context
*ctx
)
15 : be_visitor_module (ctx
)
19 be_visitor_module_sh::~be_visitor_module_sh (void)
24 be_visitor_module_sh::visit_module (be_module
*node
)
26 // Not generated and not imported.
27 if (node
->srv_hdr_gen () || node
->imported ())
32 TAO_OutStream
*os
= this->ctx_
->stream ();
34 TAO_INSERT_COMMENT (os
);
36 // Generate the skeleton class name.
38 // Now generate the class definition. The prefix POA_ is prepended to our
39 // name only if we are the outermost module.
42 if (!node
->is_nested ())
44 // We are outermost module.
45 *os
<< "POA_" << node
->local_name () << be_nl
;
49 // We are inside another module.
50 *os
<< node
->local_name () << be_nl
;
53 *os
<< "{" << be_idt_nl
;
55 if (this->visit_scope (node
) == -1)
57 ACE_ERROR_RETURN ((LM_ERROR
,
58 "(%N:%l) be_visitor_module_sh::"
60 "codegen for scope failed\n"),
64 *os
<< be_uidt_nl
<< be_nl
;
65 TAO_INSERT_COMMENT (os
);