Remove redundant void from tao_idl
[ACE_TAO.git] / TAO / TAO_IDL / be / be_visitor_module / module_ch.cpp
blob4b3fae86718069cf019d5d5c3ce764627c9daada
2 //=============================================================================
3 /**
4 * @file module_ch.cpp
6 * Visitor generating code for Module in the client header
8 * @author Aniruddha Gokhale
9 */
10 //=============================================================================
12 #include "module.h"
14 be_visitor_module_ch::be_visitor_module_ch (be_visitor_context *ctx)
15 : be_visitor_module (ctx)
19 be_visitor_module_ch::~be_visitor_module_ch ()
23 int
24 be_visitor_module_ch::visit_module (be_module *node)
26 if (node->cli_hdr_gen () || node->imported ())
28 return 0;
31 TAO_OutStream *os = this->ctx_->stream ();
32 TAO_OutStream *aos = 0;
34 TAO_INSERT_COMMENT (os);
36 *os << "namespace " << node->local_name () << be_nl
37 << "{" << be_idt;
39 if (be_global->gen_anyop_files ())
41 aos = tao_cg->anyop_header ();
43 TAO_INSERT_COMMENT (aos);
45 *aos << "namespace " << node->local_name () << be_nl
46 << "{" << be_idt;
49 // Generate code for the module definition by traversing thru the
50 // elements of its scope. We depend on the front-end to have made sure
51 // that only legal syntactic elements appear in our scope.
52 if (this->visit_scope (node) == -1)
54 ACE_ERROR_RETURN ((LM_ERROR,
55 "(%N:%l) be_visitor_module_ch::"
56 "visit_module - "
57 "codegen for scope failed\n"),
58 -1);
61 *os << be_uidt_nl << be_nl;
62 TAO_INSERT_COMMENT (os);
64 *os << be_nl
65 << "} // module " << node->name ();
67 if (be_global->gen_anyop_files ())
69 *aos << be_uidt_nl << be_nl;
70 TAO_INSERT_COMMENT (aos);
72 *aos << be_nl
73 << "} // module " << node->name () << be_nl;
76 return 0;