diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-12-02 20:58:58 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-12-02 20:58:58 +0100 |
commit | 7da7bd6dfa7cf1d89afaab1e3e293891d881136b (patch) | |
tree | 4fa39d4784e31f440c147182c798ccda7534ae3a /cpp/src/slice2cs/Gen.cpp | |
parent | Make loading of IceSSL when using unique names easier (diff) | |
download | ice-7da7bd6dfa7cf1d89afaab1e3e293891d881136b.tar.bz2 ice-7da7bd6dfa7cf1d89afaab1e3e293891d881136b.tar.xz ice-7da7bd6dfa7cf1d89afaab1e3e293891d881136b.zip |
More AMI mapping improvements
Diffstat (limited to 'cpp/src/slice2cs/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cs/Gen.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp index 1718b292191..101579c4086 100644 --- a/cpp/src/slice2cs/Gen.cpp +++ b/cpp/src/slice2cs/Gen.cpp @@ -4321,6 +4321,8 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << eb; _out << nl << "return;"; _out << eb; + _out << nl << "if(cb__ != null)"; + _out << sb; _out << nl << "cb__" << spar; if(ret) { @@ -4332,13 +4334,17 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) } _out << epar << ';'; _out << eb; + _out << eb; } else { _out << sp << nl << "private void " << op->name() << "_completed__(" << delType << " cb__)"; _out << sb; + _out << nl << "if(cb__ != null)"; + _out << sb; _out << nl << "cb__();"; _out << eb; + _out << eb; } } @@ -4370,9 +4376,9 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << ".whenCompleted(cb__.response__, cb__.exception__);"; _out << nl << "if(cb__ is Ice.AMISentCallback)"; _out << sb; - _out << nl << "result__.whenSent(cb__.sent__);"; + _out << nl << "result__.whenSent((Ice.AsyncCallback)cb__.sent__);"; _out << eb; - _out << "return result__.sentSynchronously();"; + _out << "return result__.isSentSynchronously();"; _out << eb; _out << sp; @@ -4385,9 +4391,9 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p) _out << ".whenCompleted(cb__.response__, cb__.exception__);"; _out << nl << "if(cb__ is Ice.AMISentCallback)"; _out << sb; - _out << nl << "result__.whenSent(cb__.sent__);"; + _out << nl << "result__.whenSent((Ice.AsyncCallback)cb__.sent__);"; _out << eb; - _out << "return result__.sentSynchronously();"; + _out << "return result__.isSentSynchronously();"; _out << eb; } } |