diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-02-03 10:42:29 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-02-03 10:42:29 +0100 |
commit | 18a6720fcc3ece576f5fb26283e239cda2bebadd (patch) | |
tree | a7d9de0acab9e092943fb182fa880b2c4b950db6 /cpp/include/Ice/IncomingAsync.h | |
parent | ICE-6861 - Java stream API changes (diff) | |
download | ice-18a6720fcc3ece576f5fb26283e239cda2bebadd.tar.bz2 ice-18a6720fcc3ece576f5fb26283e239cda2bebadd.tar.xz ice-18a6720fcc3ece576f5fb26283e239cda2bebadd.zip |
Refactored invocation code to better suite new C++11 mapping
Diffstat (limited to 'cpp/include/Ice/IncomingAsync.h')
-rw-r--r-- | cpp/include/Ice/IncomingAsync.h | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/cpp/include/Ice/IncomingAsync.h b/cpp/include/Ice/IncomingAsync.h index 9221c1c12a2..52c5ab2b0c1 100644 --- a/cpp/include/Ice/IncomingAsync.h +++ b/cpp/include/Ice/IncomingAsync.h @@ -42,10 +42,25 @@ class ICE_API IncomingAsync : public IncomingBase, public virtual Ice::AMDCallback #endif { +#ifdef ICE_CPP11_MAPPING +public: + + // + // The constructor is public but it shouldn't be used directly, use create() instead. + // + IncomingAsync(Incoming&); + + static IncomingAsyncPtr create(Incoming&); // Adopts the argument. It must not be used afterwards. + +#else + +protected: + + IncomingAsync(Incoming&); +#endif + public: - - void __deactivate(Incoming&); virtual void ice_exception(const ::std::exception&); @@ -57,15 +72,6 @@ public: bool __validateResponse(bool); -#ifdef ICE_CPP11_MAPPING - static IncomingAsyncPtr create(Incoming&); // Adopts the argument. It must not be used afterwards. - -protected: - - IncomingAsync(Incoming&); // Adopts the argument. It must not be used afterwards. -#else - IncomingAsync(Incoming&); // Adopts the argument. It must not be used afterwards. -#endif private: // @@ -93,7 +99,7 @@ namespace Ice class ICE_API AMD_Object_ice_invoke : public virtual Ice::AMDCallback { public: - + virtual void ice_response(bool, const std::vector<Ice::Byte>&) = 0; virtual void ice_response(bool, const std::pair<const Ice::Byte*, const Ice::Byte*>&) = 0; }; @@ -109,9 +115,9 @@ namespace Ice class ICE_API AMD_Object_ice_invoke : public ::Ice::AMD_Object_ice_invoke, public IceInternal::IncomingAsync { public: - + AMD_Object_ice_invoke(IceInternal::Incoming&); - + virtual void ice_response(bool, const std::vector< ::Ice::Byte>&); virtual void ice_response(bool, const std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&); }; |