diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-02 00:55:49 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-02 00:55:49 +0000 |
commit | efb7ea05036a37764f4e9f7e785fa85ad7a568f5 (patch) | |
tree | eb6ecb7cf4d59332885cdd93afa3bbc77ea332e5 /TAO/TAO_IDL/be/be_visitor_sequence | |
parent | 5ff1ef66f0696b55e0374fffe207bd842d3e335a (diff) | |
download | ATCD-efb7ea05036a37764f4e9f7e785fa85ad7a568f5.tar.gz |
ChangeLogTag: Thu Mar 1 18:51:45 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_sequence')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp | 47 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp | 41 |
2 files changed, 49 insertions, 39 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp index 3e5ce556459..cc2ce275d93 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -474,33 +474,38 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) os->gen_endif (); // Endif macro. - // Generate the ifdefined macro for the var type. - os->gen_ifdef_macro (node->flat_name (), "_var"); - - // Generate the var and out types. - if (this->gen_var_defn (node) == -1) + // No _var or _out class for an anonymous (non-typedef'd) sequence. + if (this->ctx_->tdef () != 0) { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_sequence_ch::" - "visit_sequence - " - "codegen for _var failed\n"), -1); - } + // Generate the ifdefined macro for the var type. + os->gen_ifdef_macro (node->flat_name (), "_var"); - os->gen_endif (); + // Generate the var and out types. + if (this->gen_var_defn (node) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_sequence_ch::" + "visit_sequence - " + "codegen for _var failed\n"), -1); + } - // Generate the ifdefined macro for the _out type. - os->gen_ifdef_macro (node->flat_name (), "_out"); + os->gen_endif (); - if (this->gen_out_defn (node) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_sequence_ch::" - "visit_sequence - " - "codegen for _out failed\n"), - -1); + // Generate the ifdefined macro for the _out type. + os->gen_ifdef_macro (node->flat_name (), "_out"); + + if (this->gen_out_defn (node) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_sequence_ch::" + "visit_sequence - " + "codegen for _out failed\n"), + -1); + } + + os->gen_endif (); } - os->gen_endif (); node->cli_hdr_gen (1); return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp index 003ce0e444f..151610e5c37 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp @@ -64,28 +64,33 @@ be_visitor_sequence_ci::visit_sequence (be_sequence *node) // End of instantiation. - // Generate the ifdefined macro for the sequence type. - os->gen_ifdef_macro (node->flat_name ()); - - // All we do is generate the _var and _out implementations. - if (this->gen_var_impl (node) == -1) + // No _var or _out class for an anonymous (non-typedef'd) sequence. + if (this->ctx_->tdef () != 0) { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_sequence_ci::" - "visit_sequence - " - "codegen for _var failed\n"), -1); - } + // Generate the ifdefined macro for the sequence type. + os->gen_ifdef_macro (node->flat_name ()); - if (this->gen_out_impl (node) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_sequence_ci::" - "visit_sequence - " - "codegen for _out failed\n"), -1); + // All we do is generate the _var and _out implementations. + if (this->gen_var_impl (node) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_sequence_ci::" + "visit_sequence - " + "codegen for _var failed\n"), -1); + } + + if (this->gen_out_impl (node) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_sequence_ci::" + "visit_sequence - " + "codegen for _out failed\n"), -1); + } + + // Generate the endif macro for the sequence type. + os->gen_endif (); } - // Generate the endif macro for the sequence type. - os->gen_endif (); node->cli_inline_gen (1); return 0; |