From 027e0fe8d3d1a6c4cf2f6ba2e80016c102943ebe Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Thu, 11 Oct 2012 14:44:58 -0400 Subject: 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. --- cpp/src/Slice/Parser.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'cpp/src/Slice/Parser.cpp') 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 @@ -1572,6 +1572,40 @@ Slice::Container::hasNonLocalClassDefs() const return false; } +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 { -- cgit v1.2.3