summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/PythonUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-09-11 00:53:36 +0000
committerMark Spruiell <mes@zeroc.com>2004-09-11 00:53:36 +0000
commitc8b5966a0be8b28e2145b7c6f42ace33ac1de87a (patch)
treee3a468fa32c56385ef8f5c1990fb9f2ffceea6af /cpp/src/Slice/PythonUtil.cpp
parentFix (diff)
downloadice-c8b5966a0be8b28e2145b7c6f42ace33ac1de87a.tar.bz2
ice-c8b5966a0be8b28e2145b7c6f42ace33ac1de87a.tar.xz
ice-c8b5966a0be8b28e2145b7c6f42ace33ac1de87a.zip
adding AMI support
Diffstat (limited to 'cpp/src/Slice/PythonUtil.cpp')
-rw-r--r--cpp/src/Slice/PythonUtil.cpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 3a1330eeb74..c46cc209f2a 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -302,17 +302,31 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << ", ctx=None):";
_out.inc();
_out << nl << "return _M_" << fixedScoped << "._op_" << (*oli)->name() << ".invoke(self, (" << inParams;
- if(!inParams.empty())
+ if(!inParams.empty() && inParams.find(',') == string::npos)
{
_out << ", ";
}
- _out << "ctx";
- if(inParams.empty())
+ _out << "), ctx)";
+ _out.dec();
+
+ if(p->hasMetaData("ami") || (*oli)->hasMetaData("ami"))
{
- _out << ',';
+ _out << sp << nl << "def " << fixedOpName << "_async(self, _cb";
+ if(!inParams.empty())
+ {
+ _out << ", " << inParams;
+ }
+ _out << ", ctx=None):";
+ _out.inc();
+ _out << nl << "return _M_" << fixedScoped << "._op_" << (*oli)->name() << ".invokeAsync(self, _cb, ("
+ << inParams;
+ if(!inParams.empty() && inParams.find(',') == string::npos)
+ {
+ _out << ", ";
+ }
+ _out << "), ctx)";
+ _out.dec();
}
- _out << "))";
- _out.dec();
}
_out << sp << nl << "def checkedCast(proxy, facet=''):";