diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-18 00:34:19 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-18 00:34:19 +0000 |
commit | 0a3834639fa9ee3524a83d7719bd7c27ddb3a657 (patch) | |
tree | 1180dcc92c6a4a3a4af8f968b8f0e4b340484f28 /TAO/TAO_IDL/be/be_visitor_sequence | |
parent | 424f881eed729924025fa8dc7dc20ec2c34a92b9 (diff) | |
download | ATCD-0a3834639fa9ee3524a83d7719bd7c27ddb3a657.tar.gz |
Chnages necessary to handle skipped scope repeated name example for all
data types that presented a problem.
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_sequence')
13 files changed, 114 insertions, 87 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp index a83e46e0959..ca121c5a737 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp @@ -146,7 +146,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) *os << "ACE_INLINE" << be_nl << full_class_name << "::" << class_name << " (void)" << be_idt_nl << " : TAO_Bounded_Base_Sequence (" << node->max_size () - << ", " << full_class_name << "::allocbuf (" << node->max_size () << "))" << be_uidt_nl + << ", " << class_name << "::allocbuf (" << node->max_size () << "))" << be_uidt_nl << "{" << be_nl << "}" << be_nl << be_nl; @@ -167,7 +167,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) // constructor *os << "ACE_INLINE" << be_nl << full_class_name << "::" << class_name << " (const " - << full_class_name << " &rhs)" << be_nl + << class_name << " &rhs)" << be_nl << "// Copy constructor." << be_idt_nl << ": TAO_Bounded_Base_Sequence (rhs)" << be_uidt_nl << "{" << be_idt_nl @@ -193,7 +193,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) // assignment operator *os << "ACE_INLINE " << full_class_name << " &" << be_nl << full_class_name << "::operator= (const " - << full_class_name << " &rhs)" << be_nl + << class_name << " &rhs)" << be_nl << "// Assignment from another Bounded sequence." << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl @@ -213,18 +213,21 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) pt->accept (visitor); *os << "::_nil ();" << be_uidt_nl << "}" << be_nl - << "// No need to reallocate the buffer since it is always of size" << be_nl + << "// No need to reallocate the buffer since it is always of size" + << be_nl << "// " << node->max_size () << "" << be_nl << "#if 0" << be_idt_nl << "if (this->maximum_ < rhs.maximum_)" << be_nl << "{" << be_idt_nl - << full_class_name << "::freebuf (tmp);" << be_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl + << class_name << "::freebuf (tmp);" << be_nl + << "this->buffer_ = " << class_name + << "::allocbuf (rhs.maximum_);" << be_uidt_nl << "}" << be_uidt_nl << "#endif /* 0 */" << be_uidt_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl + << "this->buffer_ = " << class_name + << "::allocbuf (rhs.maximum_);" << be_uidt_nl << be_nl << "TAO_Bounded_Base_Sequence::operator= (rhs);" << be_nl << be_nl; @@ -302,7 +305,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) << "// We retain ownership." << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl + << "result = " << class_name << "::allocbuf (this->maximum_);" << be_nl << "this->buffer_ = result;" << be_uidt_nl << "}" << be_nl << "else" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp index 3e21c77dc46..f09fb8b74fe 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_cs.cpp @@ -95,7 +95,7 @@ be_visitor_sequence_cs::gen_bounded_obj_sequence (be_sequence *node) << "{" << be_idt_nl << "// For this class memory is never reallocated so the implementation" << be_nl << "// is *really* simple." << be_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (length);" << be_uidt_nl + << "this->buffer_ = " << class_name << "::allocbuf (length);" << be_uidt_nl << "}" << be_nl << be_nl; @@ -109,7 +109,7 @@ be_visitor_sequence_cs::gen_bounded_obj_sequence (be_sequence *node) *os <<" **tmp = ACE_reinterpret_cast ("; pt->accept (visitor); *os << " **, this->buffer_);" << be_nl - << full_class_name << "::freebuf (tmp);" << be_nl + << class_name << "::freebuf (tmp);" << be_nl << "this->buffer_ = 0;" << be_uidt_nl << "}" << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp index e890fc9c336..1521a91dceb 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp @@ -18,10 +18,7 @@ // // ============================================================================ -//#include "idl.h" -//#include "idl_extern.h" #include "be.h" - #include "be_visitor_sequence.h" ACE_RCSID(be_visitor_sequence, gen_bounded_sequence_ci, "$Id$") @@ -150,7 +147,7 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node) << full_class_name << "::" << class_name << " (void)" << be_nl << "// Default constructor." << be_nl << " : TAO_Bounded_Base_Sequence (" << node->max_size () - << ", 0, " << full_class_name << "::allocbuf (" << node->max_size () + << ", 0, " << class_name << "::allocbuf (" << node->max_size () << "), 0)" << be_nl << "{" << be_nl << "}" << be_nl @@ -171,14 +168,14 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node) // constructor *os << "ACE_INLINE" << be_nl << full_class_name << "::" << class_name - << " (const " << full_class_name << " &rhs)" << be_nl + << " (const " << class_name << " &rhs)" << be_nl << "// Copy constructor." << be_idt_nl << ": TAO_Bounded_Base_Sequence (rhs)" << be_uidt_nl << "{" << be_idt_nl << "if (rhs.buffer_ != 0)" << be_nl << "{" << be_idt_nl; pt->accept(visitor); - *os <<" *tmp1 = " << full_class_name << "::allocbuf (" << node->max_size () + *os <<" *tmp1 = " << class_name << "::allocbuf (" << node->max_size () << ");" << be_nl << be_nl; pt->accept(visitor); @@ -210,7 +207,7 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node) // operator= *os << "ACE_INLINE " << full_class_name << " &" << be_nl - << full_class_name << "::operator= (const " << full_class_name << " &rhs)" << be_nl + << full_class_name << "::operator= (const " << class_name << " &rhs)" << be_nl << "// Assignment operator. " << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl @@ -220,7 +217,7 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node) << "{" << be_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (rhs.maximum_);" << be_nl + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_nl << be_nl <<"TAO_Bounded_Base_Sequence::operator= (rhs);" << be_nl << be_nl; @@ -293,7 +290,7 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node) << "// We retain ownership." << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl + << "result = " << class_name << "::allocbuf (this->maximum_);" << be_nl << "this->buffer_ = result;" << be_uidt_nl << "}" << be_nl << "else" << be_nl @@ -350,7 +347,7 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node) *os <<"* tmp = ACE_reinterpret_cast("; pt->accept (visitor); *os << "* ACE_CAST_CONST, this->buffer_);" << be_nl - << full_class_name << "::freebuf (tmp);" << be_uidt_nl + << class_name << "::freebuf (tmp);" << be_uidt_nl << "}" << be_nl << "this->buffer_ = data;" << be_nl << "this->release_ = release;" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp index 87fc3a3c877..e2e1d9ed36a 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_cs.cpp @@ -108,7 +108,7 @@ be_visitor_sequence_cs::gen_bounded_sequence (be_sequence *node) << "// allocate a buffer of the requested length. The buffer is allocated for the" << be_nl << "// right type" << be_nl << "{" << be_idt_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (" + << "this->buffer_ = " << class_name << "::allocbuf (" << node->max_size () << ");" << be_uidt_nl << "}" << be_nl << be_nl; @@ -124,7 +124,7 @@ be_visitor_sequence_cs::gen_bounded_sequence (be_sequence *node) *os <<" *tmp = ACE_reinterpret_cast ("; pt->accept (visitor); *os << " *, this->buffer_);" << be_nl - << full_class_name << "::freebuf (tmp);" << be_nl + << class_name << "::freebuf (tmp);" << be_nl << "this->buffer_ = 0;" << be_uidt_nl << "}" << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp index e1f888f6802..8e8f2c139bf 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp @@ -111,7 +111,7 @@ be_visitor_sequence_ci::gen_bounded_str_sequence (be_sequence *node) *os << "ACE_INLINE" << be_nl << full_class_name << "::" << class_name << " (void)" << be_nl << " : TAO_Bounded_Base_Sequence (" << node->max_size () - << ", " << full_class_name << "::allocbuf(" << node->max_size () << "))" << be_nl + << ", " << class_name << "::allocbuf(" << node->max_size () << "))" << be_nl << "{" << be_nl << "}" << be_nl << be_nl; @@ -128,12 +128,13 @@ be_visitor_sequence_ci::gen_bounded_str_sequence (be_sequence *node) // constructor *os << "ACE_INLINE" << be_nl - << full_class_name << "::" << class_name << " (const " << full_class_name << " &rhs)" << be_idt_nl + << full_class_name << "::" << class_name << " (const " + << class_name << " &rhs)" << be_idt_nl << ": TAO_Bounded_Base_Sequence (rhs)" << be_uidt_nl << "{" << be_idt_nl << "if (rhs.buffer_ != 0)" << be_nl << "{" << be_idt_nl - << "char **tmp1 = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl + << "char **tmp1 = " << class_name << "::allocbuf (this->maximum_);" << be_nl << "char ** const tmp2 = ACE_reinterpret_cast (char ** ACE_CAST_CONST, rhs.buffer_);" << be_nl << be_nl << "for (CORBA::ULong i=0; i < rhs.length_; i++)" << be_idt_nl @@ -150,7 +151,8 @@ be_visitor_sequence_ci::gen_bounded_str_sequence (be_sequence *node) // operator= *os << "ACE_INLINE " << full_class_name << "& " << be_nl - << full_class_name << "::operator= (const " << full_class_name << " &rhs)" << be_nl + << full_class_name << "::operator= (const " + << class_name << " &rhs)" << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl << "return *this;" << be_uidt_nl @@ -166,7 +168,7 @@ be_visitor_sequence_ci::gen_bounded_str_sequence (be_sequence *node) << "}" << be_uidt_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << be_nl << "TAO_Bounded_Base_Sequence::operator= (rhs);" << be_nl << be_nl @@ -200,7 +202,7 @@ be_visitor_sequence_ci::gen_bounded_str_sequence (be_sequence *node) << "// We retain ownership. " << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl + << "result = " << class_name << "::allocbuf (this->maximum_);" << be_nl << "this->buffer_ = result;" << be_uidt_nl << "}" << be_nl << "else" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp index 4bd9bcf9feb..c299eade4a8 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp @@ -77,11 +77,13 @@ be_visitor_sequence_cs::gen_bounded_str_sequence (be_sequence *node) // allocate_buffer *os << "void" << be_nl - << full_class_name << "::_allocate_buffer (CORBA::ULong /* length */)" << be_nl + << full_class_name << "::_allocate_buffer (CORBA::ULong /* length */)" + << be_nl << "{" << be_idt_nl - << "// For this class memory is never reallocated so the implementation" << be_nl + << "// For this class memory is never reallocated so the implementation" + << be_nl << "// is *really* simple." << be_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (" + << "this->buffer_ = " << class_name << "::allocbuf (" << node->max_size () << ");" << be_uidt_nl << "}" << be_nl << be_nl; @@ -92,8 +94,9 @@ be_visitor_sequence_cs::gen_bounded_str_sequence (be_sequence *node) << "{" << be_idt_nl << "if (this->buffer_ == 0 || this->release_ == 0)" << be_idt_nl << "return;" << be_uidt_nl - << "char **tmp = ACE_reinterpret_cast (char **, this->buffer_);" << be_nl - << full_class_name << "::freebuf (tmp);" << be_nl + << "char **tmp = ACE_reinterpret_cast (char **, this->buffer_);" + << be_nl + << class_name << "::freebuf (tmp);" << be_nl << "this->buffer_ = 0;" << be_uidt_nl << "}" << be_nl << be_nl; 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 054ee65220c..849fe615e4f 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 @@ -107,7 +107,8 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) *os << "ACE_INLINE" << be_nl << full_class_name << "::" << class_name << " (void)" << be_nl << " : TAO_Bounded_Base_Sequence (" << node->max_size () - << ", " << full_class_name << "::allocbuf(" << node->max_size () << "))" << be_nl + << ", " << class_name << "::allocbuf(" + << node->max_size () << "))" << be_nl << "{" << be_nl << "}" << be_nl << be_nl; @@ -117,20 +118,25 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << full_class_name << "::" << class_name << " (CORBA::ULong length," << be_idt_nl << "CORBA::WChar* *value," << be_nl << "CORBA::Boolean release)" << be_uidt_nl - << " : TAO_Bounded_Base_Sequence (" << node->max_size () << ", length, value, release)" << be_nl + << " : TAO_Bounded_Base_Sequence (" << node->max_size () + << ", length, value, release)" << be_nl << "{" << be_nl << "}" << be_nl << be_nl; // constructor *os << "ACE_INLINE" << be_nl - << full_class_name << "::" << class_name << " (const " << full_class_name << " &rhs)" << be_idt_nl + << full_class_name << "::" << class_name << " (const " + << class_name << " &rhs)" << be_idt_nl << ": TAO_Bounded_Base_Sequence (rhs)" << be_uidt_nl << "{" << be_idt_nl << "if (rhs.buffer_ != 0)" << be_nl << "{" << be_idt_nl - << "CORBA::WChar **tmp1 = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl - << "CORBA::WChar ** const tmp2 = ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_);" << be_nl + << "CORBA::WChar **tmp1 = " << class_name + << "::allocbuf (this->maximum_);" << be_nl + << "CORBA::WChar ** const tmp2 =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_);" + << be_uidt_nl << be_nl << "for (CORBA::ULong i=0; i < rhs.length_; i++)" << be_idt_nl << "tmp1[i] = CORBA::wstring_dup (tmp2[i]);" << be_uidt_nl @@ -146,14 +152,17 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) // operator= *os << "ACE_INLINE " << full_class_name << "& " << be_nl - << full_class_name << "::operator= (const " << full_class_name << " &rhs)" << be_nl + << full_class_name << "::operator= (const " << class_name + << " &rhs)" << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl << "return *this;" << be_uidt_nl << be_nl << "if (this->release_)" << be_nl << "{ " << be_idt_nl - << "CORBA::WChar **tmp = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_nl + << "CORBA::WChar **tmp =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << be_uidt_nl << be_nl << "for (CORBA::ULong i = 0; i < this->length_; ++i)" << be_nl << "{" << be_idt_nl @@ -162,12 +171,17 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << "}" << be_uidt_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl + << "this->buffer_ = " << class_name + << "::allocbuf (rhs.maximum_);" << be_uidt_nl << be_nl << "TAO_Bounded_Base_Sequence::operator= (rhs);" << be_nl << be_nl - << "CORBA::WChar **tmp1 = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_nl - << "CORBA::WChar ** const tmp2 = ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_);" << be_nl + << "CORBA::WChar **tmp1 =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << be_uidt_nl + << "CORBA::WChar ** const tmp2 =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_);" + << be_uidt_nl << be_nl << "for (CORBA::ULong i = 0; i < rhs.length_; i++)" << be_idt_nl << "tmp1[i] = CORBA::wstring_dup (tmp2[i]);" << be_uidt_nl @@ -196,12 +210,14 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << "// We retain ownership. " << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl + << "result = " << class_name << "::allocbuf (this->maximum_);" + << be_nl << "this->buffer_ = result;" << be_uidt_nl << "}" << be_nl << "else" << be_nl << "{" << be_idt_nl - << "result = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_uidt_nl + << "result = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << be_uidt_nl << "}" << be_uidt_nl << "}" << be_nl << "else // if (orphan == 1)" << be_nl @@ -210,7 +226,8 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << "{" << be_idt_nl << "// We set state back to default and relinquish" << be_nl << "// ownership." << be_nl - << "result = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_nl + << "result = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << be_nl << "this->maximum_ = 0;" << be_nl << "this->length_ = 0;" << be_nl << "this->buffer_ = 0;" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_cs.cpp index 0439bf4c37c..5c7091f6c39 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_cs.cpp @@ -73,11 +73,13 @@ be_visitor_sequence_cs::gen_bounded_wstr_sequence (be_sequence *node) // allocate_buffer *os << "void" << be_nl - << full_class_name << "::_allocate_buffer (CORBA::ULong /* length */)" << be_nl + << full_class_name << "::_allocate_buffer (CORBA::ULong /* length */)" + << be_nl << "{" << be_idt_nl - << "// For this class memory is never reallocated so the implementation" << be_nl + << "// For this class memory is never reallocated so the implementation" + << be_nl << "// is *really* simple." << be_nl - << "this->buffer_ = " << full_class_name << "::allocbuf (" + << "this->buffer_ = " << class_name << "::allocbuf (" << node->max_size () << ");" << be_uidt_nl << "}" << be_nl << be_nl; @@ -88,8 +90,10 @@ be_visitor_sequence_cs::gen_bounded_wstr_sequence (be_sequence *node) << "{" << be_idt_nl << "if (this->buffer_ == 0 || this->release_ == 0)" << be_idt_nl << "return;" << be_uidt_nl - << "CORBA::WChar **tmp = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_nl - << full_class_name << "::freebuf (tmp);" << be_nl + << "CORBA::WChar **tmp =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << be_uidt_nl + << class_name << "::freebuf (tmp);" << be_nl << "this->buffer_ = 0;" << be_uidt_nl << "}" << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp index 0bee65b46a5..0dc6240d9aa 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp @@ -142,7 +142,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) *os << "ACE_INLINE" << be_nl << full_class_name << "::" << class_name << " (CORBA::ULong maximum)" << be_idt_nl << ": TAO_Unbounded_Base_Sequence (maximum, " - << full_class_name << "::allocbuf (maximum))" << be_uidt_nl + << class_name << "::allocbuf (maximum))" << be_uidt_nl << "{" << be_nl << "}" << be_nl << be_nl; @@ -162,13 +162,13 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) // constructor *os << "ACE_INLINE" << be_nl << full_class_name << "::" << class_name << "(const " - << full_class_name << " &rhs)" << be_idt_nl + << class_name << " &rhs)" << be_idt_nl << ": TAO_Unbounded_Base_Sequence (rhs)" << be_uidt_nl << "{" << be_idt_nl << "if (rhs.buffer_ != 0)" << be_nl << "{" << be_idt_nl; pt->accept(visitor); - *os <<" **tmp1 = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl; + *os <<" **tmp1 = " << class_name << "::allocbuf (this->maximum_);" << be_nl; pt->accept(visitor); *os <<" ** const tmp2 = ACE_reinterpret_cast ("; pt->accept (visitor); @@ -189,7 +189,8 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) // operator= *os << "ACE_INLINE " << full_class_name << " &" << be_nl - << full_class_name << "::operator= (const " << full_class_name << " &rhs)" << be_nl + << full_class_name << "::operator= (const " + << class_name << " &rhs)" << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl << "return *this;" << be_uidt_nl @@ -210,13 +211,13 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) << "}" << be_nl << "if (this->maximum_ < rhs.maximum_)" << be_nl << "{" << be_idt_nl - << full_class_name << "::freebuf (tmp);" << be_nl - << "this->buffer_ = " << full_class_name + << class_name << "::freebuf (tmp);" << be_nl + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << "}" << be_uidt_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << full_class_name + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << be_nl << "TAO_Unbounded_Base_Sequence::operator= (rhs);" << be_nl @@ -294,7 +295,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) << "// We retain ownership." << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl + << "result = " << class_name << "::allocbuf (this->maximum_);" << be_nl << "this->buffer_ = result;" << be_uidt_nl << "}" << be_nl << "else" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp index 7ced25811f3..f704db23efb 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_cs.cpp @@ -94,7 +94,7 @@ be_visitor_sequence_cs::gen_unbounded_obj_sequence (be_sequence *node) << "{" << be_idt_nl; pt->accept(visitor); *os <<" **tmp = 0;" << be_nl - << "tmp = " << full_class_name << "::allocbuf (length);" << be_nl + << "tmp = " << class_name << "::allocbuf (length);" << be_nl << be_nl << "if (this->buffer_ != 0)" << be_nl << "{" << be_idt_nl; @@ -133,7 +133,7 @@ be_visitor_sequence_cs::gen_unbounded_obj_sequence (be_sequence *node) pt->accept (visitor); *os << "::_nil ();" << be_uidt_nl << "}" << be_nl - << full_class_name << "::freebuf (tmp);" << be_nl + << class_name << "::freebuf (tmp);" << be_nl << "this->buffer_ = 0;" << be_uidt_nl << "}" << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp index 30ef66e5c5b..375c3eb9587 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp @@ -153,7 +153,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) << full_class_name << "::" << class_name << " (CORBA::ULong maximum) " << "// Constructor using a maximum length value." << be_idt_nl << ": TAO_Unbounded_Base_Sequence (maximum, " - << full_class_name << "::allocbuf (maximum))" + << class_name << "::allocbuf (maximum))" << be_uidt_nl << "{" << be_nl << "}" << be_nl @@ -174,14 +174,14 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) // constructor *os << "ACE_INLINE" << be_nl << full_class_name << "::" << class_name << " (const " - << full_class_name << " &rhs)" << be_nl + << class_name << " &rhs)" << be_nl << "// Copy constructor." << be_idt_nl; *os << ": TAO_Unbounded_Base_Sequence (rhs)" << be_uidt_nl << "{" << be_idt_nl << "if (rhs.buffer_ != 0)" << be_nl << "{" << be_idt_nl; pt->accept(visitor); - *os <<" *tmp1 = " << full_class_name << "::allocbuf (this->maximum_);" << be_nl; + *os <<" *tmp1 = " << class_name << "::allocbuf (this->maximum_);" << be_nl; pt->accept(visitor); *os << " * const tmp2 = ACE_reinterpret_cast ("; pt->accept (visitor); @@ -211,7 +211,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) // operator = *os << "ACE_INLINE " << full_class_name << " &" << be_nl - << full_class_name << "::operator= (const " << full_class_name << " &rhs)" << be_nl + << full_class_name << "::operator= (const " << class_name << " &rhs)" << be_nl << "// Assignment operator." << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl @@ -226,13 +226,13 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) *os <<" *tmp = ACE_reinterpret_cast ("; pt->accept (visitor); *os << " *, this->buffer_);" << be_nl - << full_class_name << "::freebuf (tmp);" << be_nl - << "this->buffer_ = " << full_class_name + << class_name << "::freebuf (tmp);" << be_nl + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << "}" << be_uidt_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << full_class_name + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << be_nl << "TAO_Unbounded_Base_Sequence::operator= (rhs);" << be_nl @@ -311,7 +311,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) << "// We retain ownership." << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << full_class_name << "::allocbuf (this->length_);" << be_nl + << "result = " << class_name << "::allocbuf (this->length_);" << be_nl << "this->buffer_ = result;" << be_uidt_nl << "}" << be_nl << "else" << be_nl @@ -368,7 +368,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) *os <<" *tmp = ACE_reinterpret_cast("; pt->accept (visitor); *os << "*,this->buffer_);" << be_nl - << full_class_name << "::freebuf (tmp);" << be_uidt_nl + << class_name << "::freebuf (tmp);" << be_uidt_nl << "}" << be_nl << "this->buffer_ = data;" << be_nl << "this->release_ = release;" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp index ab24fdc35b4..88ccc7713dd 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_cs.cpp @@ -109,7 +109,7 @@ be_visitor_sequence_cs::gen_unbounded_sequence (be_sequence *node) << "{" << be_idt_nl; pt->accept (visitor); *os << "* tmp = 0;" << be_nl - << "tmp = " << full_class_name << "::allocbuf (length);" << be_nl + << "tmp = " << class_name << "::allocbuf (length);" << be_nl << be_nl << "if (this->buffer_ != 0)" << be_nl << "{" << be_idt_nl; @@ -132,7 +132,7 @@ be_visitor_sequence_cs::gen_unbounded_sequence (be_sequence *node) *os << be_nl << "if (this->release_)" << be_idt_nl - << full_class_name << "::freebuf (old);" << be_uidt_nl << be_uidt_nl + << class_name << "::freebuf (old);" << be_uidt_nl << be_uidt_nl << "}" << be_nl << "this->buffer_ = tmp;" << be_uidt_nl << "}" << be_nl @@ -150,7 +150,7 @@ be_visitor_sequence_cs::gen_unbounded_sequence (be_sequence *node) pt->accept (visitor); *os << " *,this->buffer_);" << be_nl << be_nl - << full_class_name << "::freebuf (tmp);" << be_nl + << class_name << "::freebuf (tmp);" << be_nl << "this->buffer_ = 0;" << be_uidt_nl << "} " << be_nl << be_nl; 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 74890611d05..d93c330597c 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp @@ -226,8 +226,8 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) // constr from a _ptr os->indent (); *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (" << ACE_GLOBAL_COLONS - << node->name () << " *p)" << be_nl; + *os << fname << "::" << lname << " (" << node->local_name () + << " *p)" << be_nl; *os << " : ptr_ (p)" << be_nl; *os << "{}\n\n"; @@ -274,8 +274,8 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) // assignment operator from a pointer os->indent (); *os << "ACE_INLINE " << fname << " &" << be_nl; - *os << fname << "::operator= (" << ACE_GLOBAL_COLONS - << node->name () << " *p)" << be_nl; + *os << fname << "::operator= (" << node->local_name () + << " *p)" << be_nl; *os << "{\n"; os->incr_indent (); *os << "delete this->ptr_;" << be_nl; @@ -518,8 +518,8 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) // constr from a pointer os->indent (); *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (" << ACE_GLOBAL_COLONS - << node->name () << " *&p)" << be_nl; + *os << fname << "::" << lname << " (" << node->local_name () + << " *&p)" << be_nl; *os << " : ptr_ (p)" << be_nl; *os << "{\n"; os->incr_indent (); @@ -530,8 +530,8 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) // constructor from _var & os->indent (); *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (" << ACE_GLOBAL_COLONS - << node->name () << "_var &p) // constructor from _var" << be_nl; + *os << fname << "::" << lname << " (" << node->local_name () + << "_var &p) // constructor from _var" << be_nl; *os << " : ptr_ (p.out ())" << be_nl; *os << "{\n"; os->incr_indent (); @@ -545,8 +545,8 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) *os << "ACE_INLINE" << be_nl; *os << fname << "::" << lname << " (const ::" << fname << " &p) // copy constructor" << be_nl; - *os << " : ptr_ (ACE_const_cast (" << ACE_GLOBAL_COLONS - << fname << "&, p).ptr_)" << be_nl; + *os << " : ptr_ (ACE_const_cast (" << lname + << "&, p).ptr_)" << be_nl; *os << "{}\n\n"; // assignment operator from _out & @@ -556,8 +556,8 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) " &p)" << be_nl; *os << "{\n"; os->incr_indent (); - *os << "this->ptr_ = ACE_const_cast (" << ACE_GLOBAL_COLONS - << fname << "&, p).ptr_;" << be_nl; + *os << "this->ptr_ = ACE_const_cast (" << lname + << "&, p).ptr_;" << be_nl; *os << "return *this;\n"; os->decr_indent (); *os << "}\n\n"; @@ -567,8 +567,8 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) // assignment operator from pointer os->indent (); *os << "ACE_INLINE ::" << fname << " &" << be_nl; - *os << fname << "::operator= (" << ACE_GLOBAL_COLONS - << node->name () << " *p)" << be_nl; + *os << fname << "::operator= (" << node->local_name () + << " *p)" << be_nl; *os << "{\n"; os->incr_indent (); *os << "this->ptr_ = p;" << be_nl; |