diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-03-23 20:37:27 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-03-23 20:37:27 +0000 |
commit | 1a9c267ac0155e9aca6a76e94de00023765f01de (patch) | |
tree | 35f27cd554f73ca5cc816b4f3acb25398dac422b | |
parent | 4c7af464bdab96d6193838a148b366b0cdca839c (diff) | |
download | ATCD-1a9c267ac0155e9aca6a76e94de00023765f01de.tar.gz |
Fri Mar 23 20:36:31 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* TAO_IDL/be/be_visitor_attr_assign.cpp:
* TAO_IDL/be/be_visitor_attr_return.cpp:
Fixed bugzilla 4009, problem generating the CCM executor when
we have an attribute of type sequence included from another file
-rw-r--r-- | TAO/ChangeLog | 7 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_attr_assign.cpp | 16 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_attr_return.cpp | 14 |
3 files changed, 30 insertions, 7 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 570f3b3d87b..6dfc160384f 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,10 @@ +Fri Mar 23 20:36:31 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_attr_assign.cpp: + * TAO_IDL/be/be_visitor_attr_return.cpp: + Fixed bugzilla 4009, problem generating the CCM executor when + we have an attribute of type sequence included from another file + Fri Mar 23 18:18:30 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl> * tao/AnyTypeCode/Any_SystemException.cpp: diff --git a/TAO/TAO_IDL/be/be_visitor_attr_assign.cpp b/TAO/TAO_IDL/be/be_visitor_attr_assign.cpp index 4845e3572b1..c3003d538dd 100644 --- a/TAO/TAO_IDL/be/be_visitor_attr_assign.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attr_assign.cpp @@ -108,13 +108,21 @@ be_visitor_attr_assign::visit_predefined_type ( /// Unused if anonymous types are not allowed. int -be_visitor_attr_assign::visit_sequence (be_sequence *node) +be_visitor_attr_assign::visit_sequence (be_sequence *) { + be_type *bt = this->ctx_->alias (); + + if (bt == 0) + { + /// Support anonymous types? + return -1; + } + os_ << be_nl - << "::" << node->full_name () << " * _ciao_tmp = 0;" << be_nl + << "::" << bt->full_name () << " * _ciao_tmp = 0;" << be_nl << "ACE_NEW (" << be_idt_nl << "_ciao_tmp," << be_nl - << node->full_name () << " (" << this->attr_name_ + << bt->full_name () << " (" << this->attr_name_ << "));" << be_uidt_nl << be_nl << this->attr_name_string_.c_str () << " = _ciao_tmp;"; @@ -150,7 +158,7 @@ int be_visitor_attr_assign::visit_typedef (be_typedef *node) { this->ctx_->alias (node); - int status = node->primitive_base_type ()->accept (this); + int const status = node->primitive_base_type ()->accept (this); if (status == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_attr_return.cpp b/TAO/TAO_IDL/be/be_visitor_attr_return.cpp index 65c38e768d3..47e817075f9 100644 --- a/TAO/TAO_IDL/be/be_visitor_attr_return.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attr_return.cpp @@ -144,13 +144,21 @@ be_visitor_attr_return::visit_predefined_type ( /// Unused if anonymous types are not allowed. int -be_visitor_attr_return::visit_sequence (be_sequence *node) +be_visitor_attr_return::visit_sequence (be_sequence *) { + be_type *bt = this->ctx_->alias (); + + if (bt == 0) + { + /// Support anonymous types? + return -1; + } + os_ << be_nl - << "::" << node->full_name () << " * retval = 0;" << be_nl + << "::" << bt->full_name () << " * retval = 0;" << be_nl << "ACE_NEW_RETURN (" << be_idt_nl << "retval," << be_nl - << "::" << node->full_name () << " (" << be_idt_nl + << "::" << bt->full_name () << " (" << be_idt_nl << this->attr_name_string_.c_str () << ".in ())," << be_uidt_nl << "0);" << be_uidt_nl << be_nl |