diff options
author | gokhale <gokhale@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-18 21:32:57 +0000 |
---|---|---|
committer | gokhale <gokhale@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-12-18 21:32:57 +0000 |
commit | 3755f9138bf64e39f0671488c1871036b61750b8 (patch) | |
tree | 0ab83f18abce5c661f58778c9a33bf93044e59d7 /TAO/TAO_IDL/be/be_union_branch.cpp | |
parent | 4a5b8b1a2c6fa3cacd3640bbc75324321ebba7f8 (diff) | |
download | ATCD-3755f9138bf64e39f0671488c1871036b61750b8.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/TAO_IDL/be/be_union_branch.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_union_branch.cpp | 81 |
1 files changed, 37 insertions, 44 deletions
diff --git a/TAO/TAO_IDL/be/be_union_branch.cpp b/TAO/TAO_IDL/be/be_union_branch.cpp index ed47823faf7..241fffab0e1 100644 --- a/TAO/TAO_IDL/be/be_union_branch.cpp +++ b/TAO/TAO_IDL/be/be_union_branch.cpp @@ -51,11 +51,13 @@ be_union_branch::gen_client_header (void) TAO_CodeGen *cg = TAO_CODEGEN::instance (); bt = be_type::narrow_from_decl (this->field_type ()); - s = cg->make_state (); + s = cg->make_state (); if (!s || !bt || (s->gen_code (bt, this) == -1)) { - ACE_ERROR ((LM_ERROR, "be_union_branch: error generating type\n")); - return -1; + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_union_branch::" + "gen_client_header - " + "state based code gen failed\n"), -1); } return 0; } @@ -64,48 +66,22 @@ be_union_branch::gen_client_header (void) int be_union_branch::gen_client_stubs (void) { - TAO_OutStream *cs; // output stream - TAO_NL nl; // end line - - if (!this->cli_stub_gen_) - { - // retrieve a singleton instance of the code generator - TAO_CodeGen *cg = TAO_CODEGEN::instance (); + be_type *bt; // the union_branch type + be_state *s; // state based code gen object - cs = cg->client_stubs (); + // retrieve a singleton instance of the code generator + TAO_CodeGen *cg = TAO_CODEGEN::instance (); - cs->indent (); - // generate a case stmt - if (this->label ()->label_val ()->ec () == AST_Expression::EC_symbol) - { - *cs << "case " << this->label ()->label_val ()->n () << ":\n"; - } - else - { - *cs << "case " << this->label ()->label_val () << ":\n"; - } - cs->incr_indent (); - *cs << "this->" << this->local_name () << "_ = u." << this->local_name () - << "_;" << nl; - *cs << "break;\n"; - cs->decr_indent (0); + bt = be_type::narrow_from_decl (this->field_type ()); + s = cg->make_state (); + if (!s || !bt || (s->gen_code (bt, this) == -1)) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_union_branch::" + "gen_client_stubs - " + "state based code gen failed\n"), -1); } - return 0; -} - -// Generates the server-side header information for the union_branch -int -be_union_branch::gen_server_header (void) -{ - // nothing to be done - return 0; -} -// Generates the server-side skeletons for the union_branch -int -be_union_branch::gen_server_skeletons (void) -{ - // nothing to be done return 0; } @@ -123,13 +99,30 @@ be_union_branch::gen_client_inline (void) s = cg->make_state (); if (!s || !bt || (s->gen_code (bt, this) == -1)) { - ACE_ERROR ((LM_ERROR, - "be_union_branch: error generating impl of access methods\n")); - return -1; + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_union_branch::" + "gen_client_inline - " + "state based code gen failed\n"), -1); } return 0; } +// Generates the server-side header information for the union_branch +int +be_union_branch::gen_server_header (void) +{ + // nothing to be done + return 0; +} + +// Generates the server-side skeletons for the union_branch +int +be_union_branch::gen_server_skeletons (void) +{ + // nothing to be done + return 0; +} + // Generates the server-side inline int be_union_branch::gen_server_inline (void) |