diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp index 164e72ff3c3..a8d0e7de912 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp @@ -18,60 +18,49 @@ // // ============================================================================ -#include "be.h" - +#include "be.h" #include "be_visitor_sequence.h" +ACE_RCSID (be_visitor_sequence, + gen_bounded_wstr_sequence_ci, + "$Id$") int be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) { TAO_OutStream *os = this->ctx_->stream (); - be_type *bt; - - // retrieve the base type since we may need to do some code - // generation for the base type. - bt = be_type::narrow_from_decl (node->base_type ()); - if (!bt) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_sequence_ci::" - "visit_sequence - " - "Bad element type\n"), -1); - } - const char * class_name = node->instance_name (); static char full_class_name [NAMEBUFSIZE]; - ACE_OS::memset (full_class_name, '\0', NAMEBUFSIZE); + ACE_OS::memset (full_class_name, + '\0', + NAMEBUFSIZE); if (node->is_nested ()) { - ACE_OS::sprintf (full_class_name, "%s::%s", - be_scope::narrow_from_scope (node->defined_in ())->decl ()->full_name (), + be_decl *tmp = + be_scope::narrow_from_scope (node->defined_in ())->decl (); + + ACE_OS::sprintf (full_class_name, + "%s::%s", + tmp->full_name (), class_name); } else { - ACE_OS::sprintf (full_class_name, "%s", + ACE_OS::sprintf (full_class_name, + "%s", class_name); } + *os << be_nl << "// TAO_IDL - Generated from " + << __FILE__ << ":" << __LINE__ << be_nl << be_nl; - // get the visitor for the type of the sequence - be_visitor_context ctx (*this->ctx_); - ctx.state (TAO_CodeGen::TAO_SEQUENCE_BASE_CI); - be_visitor *visitor = tao_cg->make_visitor (&ctx); - - // !! branching in either compile time template instantiation - // or manual template instatiation os->gen_ifdef_AHETI(); - os->gen_ifdef_macro (class_name); - os->indent (); - // first generate the static methods since they are used by others. Since + // First generate the static methods since they are used by others. Since // they are inlined, their definition needs to come before their use else // some compilers (e.g., g++) produce lots of warnings. @@ -251,7 +240,5 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) // generate #endif for AHETI os->gen_endif_AHETI(); - - delete visitor; return 0; } |