Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / TAO_IDL / be / be_visitor_root / root_ih.cpp
blob79153d5c5f5490c75afd886743f678f1684b8c3a
2 //=============================================================================
3 /**
4 * @file root_ih.cpp
6 * Visitor generating code for Root in the server implementation header
8 * @author Yamuna Krishnamurthy (yamuna@cs.wustl.edu)
9 */
10 //=============================================================================
12 #include "root.h"
14 be_visitor_root_ih::be_visitor_root_ih (be_visitor_context *ctx)
15 : be_visitor_root (ctx)
19 be_visitor_root_ih::~be_visitor_root_ih ()
23 int
24 be_visitor_root_ih::visit_root (be_root *node)
26 if (this->init () == -1)
28 ACE_ERROR_RETURN ((LM_ERROR,
29 ACE_TEXT ("be_visitor_root_ih::init - ")
30 ACE_TEXT ("failed to initialize\n")),
31 -1);
34 if (this->visit_scope (node) == -1)
36 ACE_ERROR_RETURN ((LM_ERROR,
37 ACE_TEXT ("be_visitor_root_ih::visit_root - ")
38 ACE_TEXT ("codegen for scope failed\n")),
39 -1);
42 (void) tao_cg->end_implementation_header (
43 be_global->be_get_implementation_hdr_fname (false));
45 return 0;
48 int
49 be_visitor_root_ih::init ()
51 /// First open the implementation header file for writing.
52 int status =
53 tao_cg->start_implementation_header (
54 be_global->be_get_implementation_hdr_fname ());
56 if (status == -1)
58 ACE_ERROR_RETURN ((LM_ERROR,
59 ACE_TEXT ("be_visitor_root_ih::init - ")
60 ACE_TEXT ("Error opening impl header file\n")),
61 -1);
64 /// Initialize the stream.
65 this->ctx_->stream (tao_cg->implementation_header ());
66 return 0;