summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
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)