diff options
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 2a4464349c4..fc8d797efea 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -935,6 +935,33 @@ Slice::Container::hasProxies() } bool +Slice::Container::hasNonLocals() +{ + for (ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) + { + ConstructedPtr constructed = ConstructedPtr::dynamicCast(*p); + if (constructed && constructed->isLocal()) + { + return true; + } + + ExceptionPtr exception = ExceptionPtr::dynamicCast(*p); + if (exception && exception->isLocal()) + { + return true; + } + + ContainerPtr container = ContainerPtr::dynamicCast(*p); + if (container && container->hasNonLocals()) + { + return true; + } + } + + return false; +} + +bool Slice::Container::hasClassDecls() { for (ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) |