summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-03-16 21:45:19 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-03-16 21:45:19 +0000
commit74e12df2a90a3fca9fced5095c458a83c7f4623e (patch)
tree11404baba8d0608b778c8d2b0b934946d5a51250
parentd7a6381353131283f9ccb36a67342413e3a04b0e (diff)
downloadATCD-74e12df2a90a3fca9fced5095c458a83c7f4623e.tar.gz
ChangeLogTag: Tue Mar 16 15:35:04 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/array.cpp20
-rw-r--r--TAO/tests/IDL_Test/array.idl8
3 files changed, 39 insertions, 1 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index cab32ca3627..6207d0d6781 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Tue Mar 16 15:35:04 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_array/array.cpp:
+
+ Added check for array of typedef'd (w)string, in which case
+ the slice type must be TAO_(W)String_Manager, instead of the
+ typedef name. Thanks to Thomas Groth <groth.th@nord-com.net>
+ for sending in an example IDL file.
+
+ * tests/IDL_Test/array.idl:
+
+ Added the example IDL above to the test IDL file.
Tue Mar 16 14:01:18 2004 Amogh Kavimandan <amoghk@dre.vanderbilt.edu>
diff --git a/TAO/TAO_IDL/be/be_visitor_array/array.cpp b/TAO/TAO_IDL/be/be_visitor_array/array.cpp
index 02957b62305..3e796a34112 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/array.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/array.cpp
@@ -213,11 +213,29 @@ be_visitor_array::visit_union (be_union *node)
int
be_visitor_array::visit_typedef (be_typedef *node)
{
- int result = this->visit_node (node);
TAO_OutStream *os = this->ctx_->stream ();
AST_Type *pbt = node->primitive_base_type ();
AST_Decl::NodeType nt = pbt->node_type ();
AST_PredefinedType::PredefinedType pt = AST_PredefinedType:: PT_void;
+ int result = 0;
+
+ // We check for these first, because in these cases, we replace the
+ // entire slice type with one of the strings below, instead of using
+ // the node's type name, possibly suffixed with '_var'.
+ if (nt == AST_Decl::NT_string)
+ {
+ *os << "TAO_String_Manager";
+
+ return 0;
+ }
+ else if (nt == AST_Decl::NT_wstring)
+ {
+ *os << "TAO_WString_Manager";
+
+ return 0;
+ }
+
+ result = this->visit_node (node);
if (nt == AST_Decl::NT_pre_defined)
{
diff --git a/TAO/tests/IDL_Test/array.idl b/TAO/tests/IDL_Test/array.idl
index 70f466db3a3..aa940776ec9 100644
--- a/TAO/tests/IDL_Test/array.idl
+++ b/TAO/tests/IDL_Test/array.idl
@@ -72,4 +72,12 @@ module ABCModule
typedef octet oa1[22];
typedef octet oa2[22];
+// This should generate unique _var and _forany types, but
+// also generate TAO_String_Manager as the element type for both.
+module string_array
+{
+ typedef string ArrayOfString[15];
+ typedef string MyString;
+ typedef MyString ArrayOfMyString[15];
+};