diff options
author | Bernard Normier <bernard@zeroc.com> | 2012-10-11 14:44:58 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2012-10-11 14:44:58 -0400 |
commit | 027e0fe8d3d1a6c4cf2f6ba2e80016c102943ebe (patch) | |
tree | 5a17059ea764321a0b6e43f1083dcd6c7db363f1 /cpp/src/Slice/Parser.cpp | |
parent | ICE-4829 - Certificate failure on W2003 (diff) | |
download | ice-027e0fe8d3d1a6c4cf2f6ba2e80016c102943ebe.tar.bz2 ice-027e0fe8d3d1a6c4cf2f6ba2e80016c102943ebe.tar.xz ice-027e0fe8d3d1a6c4cf2f6ba2e80016c102943ebe.zip |
Partial fix for ICE-4869: C++ stream read/write for structs (and structs-as-class)
is now generated as templates.
Removed most slice2cpp --stream uses (but not all)
Also fixed various build failures on Solaris.
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rwxr-xr-x | cpp/src/Slice/Parser.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 5f5a4d187fa..b96e2f1360c 100755 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -1573,6 +1573,40 @@ Slice::Container::hasNonLocalClassDefs() const } bool +Slice::Container::hasLocalClassDefsWithAsync() const +{ + for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) + { + ClassDefPtr cl = ClassDefPtr::dynamicCast(*p); + if(cl && cl->isLocal()) + { + if(cl->hasMetaData("async")) + { + return true; + } + + OperationList ol = cl->operations(); + for(OperationList::const_iterator q = ol.begin(); q != ol.end(); ++q) + { + cerr << (*q)->name() << endl; + if((*q)->hasMetaData("async")) + { + return true; + } + } + } + + ContainerPtr container = ContainerPtr::dynamicCast(*p); + if(container && container->hasLocalClassDefsWithAsync()) + { + return true; + } + } + + return false; +} + +bool Slice::Container::hasNonLocalSequences() const { for(ContainedList::const_iterator p = _contents.begin(); p != _contents.end(); ++p) |