diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-31 17:34:56 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-31 17:34:56 +0000 |
commit | 941741da484ba50c4577fc53e9be6eea300fa2a5 (patch) | |
tree | 6ed27dc6a4b35eca1e746e6fc13ba844b6d390f6 /TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp | |
parent | 0e20a37f9509ca5f382c0f7bc8306de6e3949fed (diff) | |
download | ATCD-941741da484ba50c4577fc53e9be6eea300fa2a5.tar.gz |
ChangeLogTag: Mon Dec 31 11:01:29 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp index 6ee52bcc6f9..584f1777f9d 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp @@ -49,6 +49,7 @@ be_visitor_valuetype_ci::visit_valuetype (be_valuetype *node) if (node->cli_inline_gen () || node->imported ()) return 0; + //@@ What is that? // need to access it in visit_field () if (node->opt_accessor ()) this->opt_accessor_ = 1; @@ -74,37 +75,40 @@ be_visitor_valuetype_ci::visit_valuetype (be_valuetype *node) << "return \"" << node->repoID () << "\";" << be_uidt_nl << "}\n\n"; - // generate the ifdefined macro for the _var type - os->gen_ifdef_macro (node->flat_name (), "_var"); - if (node->gen_var_impl () == -1) + // generate inline methods for elements of our scope + if (this->visit_scope (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ci::" "visit_valuetype - " - "codegen for _var failed\n"), -1); + "codegen for scope failed\n"), -1); } - os->gen_endif (); - // generate the ifdefined macro for the _out type - os->gen_ifdef_macro (node->flat_name (), "_out"); - if (node->gen_out_impl () == -1) + // Generate the _init -related code. + be_visitor_context ctx (*this->ctx_); + ctx.state (TAO_CodeGen::TAO_VALUETYPE_INIT_CI); + be_visitor *visitor = tao_cg->make_visitor (&ctx); + + if (!visitor) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ci::" "visit_valuetype - " - "codegen for _out failed\n"), -1); + "NULL visitor.\n" + ), -1); } - os->gen_endif (); - - // generate inline methods for elements of our scope - if (this->visit_scope (node) == -1) + + if (visitor->visit_valuetype(node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ci::" "visit_valuetype - " - "codegen for scope failed\n"), -1); + "failed to generate _init construct.\n" + ), -1); } + delete visitor; + return 0; } @@ -119,6 +123,7 @@ be_visitor_valuetype_ci::visit_field (be_field *node) new be_visitor_valuetype_field_cs (ctx); visitor->in_obv_space_ = 0; visitor->setenclosings ("ACE_INLINE "); + if (visitor->visit_field (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -127,7 +132,9 @@ be_visitor_valuetype_ci::visit_field (be_field *node) "visit_field failed\n" ), -1); } + delete visitor; } + return 0; } |