2 //=============================================================================
6 * Visitor generating code for operations of the TIE class in the header
9 * @author Aniruddha Gokhale
11 //=============================================================================
13 #include "operation.h"
15 be_visitor_operation_tie_sh::be_visitor_operation_tie_sh (
16 be_visitor_context
*ctx
)
17 : be_visitor_scope (ctx
)
21 be_visitor_operation_tie_sh::~be_visitor_operation_tie_sh ()
26 be_visitor_operation_tie_sh::visit_operation (be_operation
*node
)
28 /// These implied IDL operations are not to be processed on
29 /// the skeleton side.
30 if (node
->is_sendc_ami ())
35 TAO_OutStream
*os
= this->ctx_
->stream ();
36 this->ctx_
->node (node
);
38 // STEP I: generate the return type.
39 be_type
*bt
= dynamic_cast<be_type
*> (node
->return_type ());
43 ACE_ERROR_RETURN ((LM_ERROR
,
44 "(%N:%l) be_visitor_operation_tie_sh::"
50 TAO_INSERT_COMMENT (os
);
52 be_visitor_context
ctx (*this->ctx_
);
53 be_visitor_operation_rettype
oro_visitor (&ctx
);
55 if (bt
->accept (&oro_visitor
) == -1)
57 ACE_ERROR_RETURN ((LM_ERROR
,
58 "(%N:%l) be_visitor_operation_tie_sh::"
60 "codegen for return type failed\n"),
64 // STEP 2: generate the operation name.
65 *os
<< " " << this->ctx_
->port_prefix ().c_str ()
66 << node
->local_name ();
68 // STEP 3: generate the argument list with the appropriate mapping. For these
69 // we grab a visitor that generates the parameter listing
71 // We use this state here as a flag to leave out the param names in the
72 // arglist, to avoid a possible clash with the TIE class template
74 ctx
.state (TAO_CodeGen::TAO_TIE_OPERATION_ARGLIST_SH
);
75 be_visitor_operation_arglist
oa_visitor (&ctx
);
77 if (node
->accept (&oa_visitor
) == -1)
79 ACE_ERROR_RETURN ((LM_ERROR
,
80 "(%N:%l) be_visitor_operation_tie_sh::"
82 "codegen for argument list failed\n"),