Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / TAO_IDL / be / be_visitor_enum / enum_cs.cpp
blobe06e3e6f88f6290fd6e09b00033325467a84c4cf
2 //=============================================================================
3 /**
4 * @file enum_cs.cpp
6 * Visitor generating code for Enums in the client stubs
8 * @author Aniruddha Gokhale
9 */
10 //=============================================================================
12 #include "enum.h"
13 #include "be_visitor_typecode/enum_typecode.h"
15 // ********************************************************************
16 // Visitor implementation for the Enum type
17 // This one for the client stubs file
18 // ********************************************************************
20 be_visitor_enum_cs::be_visitor_enum_cs (be_visitor_context *ctx)
21 : be_visitor_scope (ctx)
25 // visit the Enum_cs node and its scope
26 int
27 be_visitor_enum_cs::visit_enum (be_enum *node)
29 if (node->cli_stub_gen ()
30 || node->imported ())
32 return 0;
35 if (be_global->tc_support ())
37 be_visitor_context ctx (*this->ctx_);
38 // ctx.sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE);
39 TAO::be_visitor_enum_typecode visitor (&ctx);
41 if (visitor.visit_enum (node) == -1)
43 ACE_ERROR_RETURN ((LM_ERROR,
44 "(%N:%l) be_visitor_enum_cs::"
45 "visit_enum - "
46 "TypeCode definition failed\n"),
47 -1);
51 node->cli_stub_gen (true);
52 return 0;