diff options
author | Adam Mitz <mitza@objectcomputing.com> | 2021-04-27 15:39:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-27 15:39:38 -0500 |
commit | e12779d807b00fdc1b69a224dd92ff58d5e20906 (patch) | |
tree | 66c6c2fc04b370949b6f1dd8f70b84f9b654d329 | |
parent | ac8caeed1f3db9239e84ccc79f5cf3a1f952a6d7 (diff) | |
parent | 2446b519893f6bebc1da64891752c3d718d00c7d (diff) | |
download | ATCD-e12779d807b00fdc1b69a224dd92ff58d5e20906.tar.gz |
Merge pull request #1481 from iguessthislldo/igtd/dcps-data-seq
Support C++ Keywords in `DCPS_DATA_SEQUENCE_TYPE`
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp | 21 |
1 files changed, 3 insertions, 18 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 dcd96d21466..a3bb95963e2 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -100,27 +100,12 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) if (idl_global->dcps_sequence_type_defined (node->full_name ())) { - // generate the sequence declaration as if it was native. This - // to satisfy DDS - - // strip the "Seq" ending to get the sample's name - const char * node_name = node->full_name (); - const size_t max_name_length = 2000; - if (ACE_OS::strlen (node_name) >= max_name_length) - { - return -1; - } - char sample_name[max_name_length]; - ACE_OS::strncpy (sample_name, - node_name, - ACE_OS::strlen (node_name) - 3); - sample_name[ACE_OS::strlen (node_name) - 3] = '\0'; - + // Special Implementation for OpenDDS *os << be_nl_2 << "typedef ::TAO::DCPS::ZeroCopyDataSeq< " - << sample_name + << node->base_type ()->full_name () << ", DCPS_ZERO_COPY_SEQ_DEFAULT_SIZE> " - << node->local_name () + << node->original_local_name () << ";" << be_nl; } else |