summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/VbUtil.cpp
diff options
context:
space:
mode:
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