summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 502d20677be..1c3eb315032 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -1650,6 +1650,27 @@ Slice::Container::hasNonLocalExceptions() const
}
bool
+Slice::Container::hasStructs() const
+{
+ for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p)
+ {
+ StructPtr q = StructPtr::dynamicCast(*p);
+ if(q)
+ {
+ return true;
+ }
+
+ ContainerPtr container = ContainerPtr::dynamicCast(*p);
+ if(container && container->hasStructs())
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool
Slice::Container::hasExceptions() const
{
for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p)