diff options
author | Michi Henning <michi@zeroc.com> | 2005-11-01 03:46:23 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-11-01 03:46:23 +0000 |
commit | 8f1fa572788830afe6dc35891f4aa8843d105630 (patch) | |
tree | 031776e985571dd1361901d99a1339c950a85b12 /cpp/src/Slice/VbUtil.cpp | |
parent | Fixing some staging bugs for demos, debug icebox executable. (diff) | |
download | ice-8f1fa572788830afe6dc35891f4aa8843d105630.tar.bz2 ice-8f1fa572788830afe6dc35891f4aa8843d105630.tar.xz ice-8f1fa572788830afe6dc35891f4aa8843d105630.zip |
Fixed http://www.zeroc.com/vbulletin/showthread.php?t=1612
Diffstat (limited to 'cpp/src/Slice/VbUtil.cpp')
-rwxr-xr-x | cpp/src/Slice/VbUtil.cpp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/cpp/src/Slice/VbUtil.cpp b/cpp/src/Slice/VbUtil.cpp index 19d21ce3580..334249907f6 100755 --- a/cpp/src/Slice/VbUtil.cpp +++ b/cpp/src/Slice/VbUtil.cpp @@ -209,17 +209,29 @@ Slice::VbGenerator::isValueType(const TypePtr& type) break; } } - } - StructPtr s = StructPtr::dynamicCast(type); - if(s) - { - return !s->hasMetaData("clr:class"); - } - if(EnumPtr::dynamicCast(type)) - { - return true; - } - return false; + } + StructPtr s = StructPtr::dynamicCast(type); + if(s) + { + if(s->hasMetaData("clr:class")) + { + return false; + } + DataMemberList dm = s->dataMembers(); + for(DataMemberList::const_iterator i = dm.begin(); i != dm.end(); ++i) + { + if(!isValueType((*i)->type())) + { + return false; + } + } + return true; + } + if(EnumPtr::dynamicCast(type)) + { + return true; + } + return false; } void |