summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/VbUtil.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2005-11-01 03:46:23 +0000
committerMichi Henning <michi@zeroc.com>2005-11-01 03:46:23 +0000
commit8f1fa572788830afe6dc35891f4aa8843d105630 (patch)
tree031776e985571dd1361901d99a1339c950a85b12 /cpp/src/Slice/VbUtil.cpp
parentFixing some staging bugs for demos, debug icebox executable. (diff)
downloadice-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-xcpp/src/Slice/VbUtil.cpp34
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