summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2016-06-08 15:30:30 -0400
committerJoe George <joe@zeroc.com>2016-06-08 15:30:30 -0400
commite5a8741b6af4bff17d3db4a3f37c26c4f21194c4 (patch)
treedfeb2fb83d200b8a411cd65b7de3db928a418ce4 /cpp/src/Slice/Parser.cpp
parentReplaced some ScopeArrays by vector or wstring (diff)
downloadice-e5a8741b6af4bff17d3db4a3f37c26c4f21194c4.tar.bz2
ice-e5a8741b6af4bff17d3db4a3f37c26c4f21194c4.tar.xz
ice-e5a8741b6af4bff17d3db4a3f37c26c4f21194c4.zip
ICE-6982 and ICE-6946
- Refactord C++ class/exception stream generated code - Changed return type of Obejct::ice_id() to std::string for C++11
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 68728049a89..8dce5096a56 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -1649,7 +1649,26 @@ Slice::Container::hasNonLocalExceptions() const
return false;
}
+bool
+Slice::Container::hasExceptions() const
+{
+ for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p)
+ {
+ ExceptionPtr q = ExceptionPtr::dynamicCast(*p);
+ if(q)
+ {
+ return true;
+ }
+ ContainerPtr container = ContainerPtr::dynamicCast(*p);
+ if(container && container->hasExceptions())
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
bool
Slice::Container::hasClassDecls() const