2 //=============================================================================
4 * @file be_visitor_decl.cpp
6 * Visitor for the base be_decl node. This serves to maintain the current
7 * state (context) of code generation for the derived visitor.
9 * @author Aniruddha Gokhale
11 //=============================================================================
13 #include "be_visitor_decl.h"
14 #include "be_visitor_sequence.h"
15 #include "be_visitor_context.h"
16 #include "be_typedef.h"
18 #include "ace/Log_Msg.h"
20 be_visitor_decl::be_visitor_decl (be_visitor_context
*ctx
)
26 be_visitor_decl::~be_visitor_decl ()
31 be_visitor_decl::ctx ()
37 be_visitor_decl::gen_anonymous_base_type (be_type
*bt
,
38 TAO_CodeGen::CG_STATE cg_state
)
40 be_typedef
*tdef
= dynamic_cast<be_typedef
*> (bt
);
44 be_visitor_context
ctx (*this->ctx_
);
47 // In case our container was typedef'd.
54 case TAO_CodeGen::TAO_ROOT_CH
:
56 be_visitor_sequence_ch
visitor (&ctx
);
57 status
= bt
->accept (&visitor
);
60 case TAO_CodeGen::TAO_ROOT_CI
:
64 case TAO_CodeGen::TAO_ROOT_CS
:
66 be_visitor_sequence_cs
visitor (&ctx
);
67 status
= bt
->accept (&visitor
);
70 case TAO_CodeGen::TAO_ROOT_CDR_OP_CS
:
72 be_visitor_sequence_cdr_op_cs
visitor (&ctx
);
73 status
= bt
->accept (&visitor
);
77 ACE_ERROR_RETURN ((LM_ERROR
,
78 "(%N:%l) be_visitor_decl::"
79 "gen_anonymous_base_type - "
80 "bad context state\n"),
86 ACE_ERROR_RETURN ((LM_ERROR
,
87 "(%N:%l) be_visitor_decl::"
88 "gen_anonymous_base_type - "
89 "anonymous base type codegen failed\n"),