summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2010-05-25 10:41:30 -0700
committerMark Spruiell <mes@zeroc.com>2010-05-25 10:41:30 -0700
commitff15aebd76de59b3ac8d34ecccaf3cbe4a5df01b (patch)
tree3fd2921fac9acf7751b390401767bb587dacab89 /cpp/src/Slice/Parser.cpp
parentupdating CHANGES for bug 4723 (diff)
downloadice-ff15aebd76de59b3ac8d34ecccaf3cbe4a5df01b.tar.bz2
ice-ff15aebd76de59b3ac8d34ecccaf3cbe4a5df01b.tar.xz
ice-ff15aebd76de59b3ac8d34ecccaf3cbe4a5df01b.zip
bug 4758 - bogus C++ streaming code for nested types
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rwxr-xr-xcpp/src/Slice/Parser.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index c1e27516176..5711c7b77b1 100755
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -1779,6 +1779,26 @@ Slice::Container::hasAsyncOps() const
return false;
}
+bool
+Slice::Container::hasNonLocalContained(Contained::ContainedType type) const
+{
+ for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p)
+ {
+ if((*p)->containedType() == type)
+ {
+ return true;
+ }
+
+ ContainerPtr container = ContainerPtr::dynamicCast(*p);
+ if(container && container->hasNonLocalContained(type))
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
string
Slice::Container::thisScope() const
{