summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2012-10-11 14:44:58 -0400
committerBernard Normier <bernard@zeroc.com>2012-10-11 14:44:58 -0400
commit027e0fe8d3d1a6c4cf2f6ba2e80016c102943ebe (patch)
tree5a17059ea764321a0b6e43f1083dcd6c7db363f1 /cpp/src/Slice/Parser.cpp
parentICE-4829 - Certificate failure on W2003 (diff)
downloadice-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-xcpp/src/Slice/Parser.cpp34
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)