diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-02-24 19:14:21 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-02-24 19:14:21 +0000 |
commit | 405d7bb787443b4219b5279d1374143d4b0c881b (patch) | |
tree | f771b923de9b8dd961c9fb55e454c7f762abdb78 /TAO/TAO_IDL/be/be_visitor_arg_traits.cpp | |
parent | 66c0039ea4c123a942f587fc12eaec869dacc0b8 (diff) | |
download | ATCD-405d7bb787443b4219b5279d1374143d4b0c881b.tar.gz |
ChangeLogTag:Thu Feb 24 11:12:12 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_arg_traits.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_arg_traits.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp index c0e1546e9b3..9fa75c92e3c 100644 --- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp @@ -382,10 +382,22 @@ be_visitor_arg_traits::visit_attribute (be_attribute *node) // the same operation, so we use the argument's flat name to // declare an empty struct, and use that struct as the template // parameter for Arg_Traits<>. - *os << be_nl << be_nl - << "struct " << node->flat_name () << " {};" - << be_nl << be_nl - << "template<>" << be_nl + + *os << be_nl; + + idl_bool const skel = + (this->ctx_->state () == TAO_CodeGen::TAO_ROOT_SS); + + // Avoid generating a duplicate structure in the skeleton when + // generating Arg_Traits<> for ThruPOA and direct collocation code. + if (!skel + || (skel && ACE_OS::strlen (this->S_) != 0)) + { + *os << "struct " << node->flat_name () << " {};" + << be_nl << be_nl; + } + + *os << "template<>" << be_nl << "class " << be_global->stub_export_macro () << " " << this->S_ << "Arg_Traits<" << node->flat_name () << ">" << be_idt_nl |