summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-03-26 01:59:15 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-03-26 01:59:15 +0000
commit6fee4ab23b03e85039a8f355aea12d1b7f25dbef (patch)
tree07474a398fcaf58070674b9323c888723587bfe9 /TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
parentf3cd7c62b57ae8334a6c28f95c1bc3001826627a (diff)
downloadATCD-6fee4ab23b03e85039a8f355aea12d1b7f25dbef.tar.gz
*** empty log message ***
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
index 87da74c4b47..940648047cb 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
@@ -38,16 +38,24 @@ TAO::be_visitor_struct_typecode::visit_structure (AST_Structure * node)
+ node->flat_name ());
// Generate array containing struct field characteristics.
- os << "static TAO::TypeCode::Struct_Field<char const *> const "
- << fields_name.c_str ()
- << "[] =" << be_idt_nl
- << "{" << be_idt_nl;
+ os << "static TAO::TypeCode::Struct_Field<char const *> "
+ << fields_name.c_str ();
- if (this->visit_members (node) != 0)
- return -1;
+ if (count == 0)
+ {
+ os << " * const = 0;" << be_nl;
+ }
+ else
+ {
+ os << "[] =" << be_idt_nl
+ << "{" << be_idt_nl;
- os << be_uidt_nl
- << "};" << be_uidt_nl << be_nl;
+ if (this->visit_members (node) != 0)
+ return -1;
+
+ os << be_uidt_nl
+ << "};" << be_uidt_nl;
+ }
// Generate the TypeCode instantiation.
os