diff options
Diffstat (limited to 'cpp/src/Ice/Proxy.cpp')
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 354 |
1 files changed, 0 insertions, 354 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index 009ebdb314a..4417227565e 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -563,73 +563,6 @@ IceInternal::checkedCastImpl(const ObjectPrxPtr& b, const string& f, const strin return ICE_NULLPTR; } -#ifdef ICE_CPP11_COMPILER - -IceInternal::Cpp11FnCallbackNC::Cpp11FnCallbackNC(const ::std::function<void (const ::Ice::Exception&)>& excb, - const ::std::function<void (bool)>& sentcb) : - _exception(excb), - _sent(sentcb) -{ -} - -IceInternal::CallbackBasePtr -IceInternal::Cpp11FnCallbackNC::verify(const ::Ice::LocalObjectPtr&) -{ - return this; -} - -void -IceInternal::Cpp11FnCallbackNC::sent(const ::Ice::AsyncResultPtr& result) const -{ - if(_sent != nullptr) - { - _sent(result->sentSynchronously()); - } -} - -bool -IceInternal::Cpp11FnCallbackNC::hasSentCallback() const -{ - return _sent != nullptr; -} - -void -IceInternal::Cpp11FnCallbackNC::exception(const ::Ice::AsyncResultPtr&, const ::Ice::Exception& ex) const -{ - if(_exception != nullptr) - { - _exception(ex); - } -} - -IceInternal::Cpp11FnOnewayCallbackNC::Cpp11FnOnewayCallbackNC(const ::std::function<void ()>& cb, - const ::std::function<void (const ::Ice::Exception&)>& excb, - const ::std::function<void (bool)>& sentcb) : - Cpp11FnCallbackNC(excb, sentcb), - _cb(cb) -{ - CallbackBase::checkCallback(true, cb || excb != nullptr); -} - -void -IceInternal::Cpp11FnOnewayCallbackNC::completed(const ::Ice::AsyncResultPtr& result) const -{ - try - { - result->getProxy()->__end(result, result->getOperation()); - } - catch(const ::Ice::Exception& ex) - { - Cpp11FnCallbackNC::exception(result, ex); - return; - } - if(_cb != nullptr) - { - _cb(); - } -} -#endif - bool IceProxy::Ice::Object::operator==(const Object& r) const { @@ -704,293 +637,6 @@ IceProxy::Ice::Object::__begin_ice_isA(const string& typeId, return __result; } -#ifdef ICE_CPP11_COMPILER - -Ice::AsyncResultPtr -IceProxy::Ice::Object::begin_ice_isA(const ::std::string& typeId, - const ::Ice::Context& ctx, - const ::IceInternal::Function<void (bool)>& response, - const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, - const ::IceInternal::Function<void (bool)>& sent) -{ - class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC - { - public: - - Cpp11CB(const ::std::function<void (bool)>& responseFunc, - const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, - const ::std::function<void (bool)>& sentFunc) : - ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc), - _response(responseFunc) - { - CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr); - } - - virtual void completed(const ::Ice::AsyncResultPtr& __result) const - { - ::Ice::ObjectPrx __proxy = ::Ice::ObjectPrx::uncheckedCast(__result->getProxy()); - bool __ret; - try - { - __ret = __proxy->end_ice_isA(__result); - } - catch(const ::Ice::Exception& ex) - { - Cpp11FnCallbackNC::exception(__result, ex); - return; - } - if(_response != nullptr) - { - _response(__ret); - } - } - - private: - - ::std::function<void (bool)> _response; - }; - - return __begin_ice_isA(typeId, ctx, new Cpp11CB(response, exception, sent), 0); -} - -Ice::AsyncResultPtr -IceProxy::Ice::Object::begin_ice_id(const ::Ice::Context& ctx, - const ::IceInternal::Function<void (const ::std::string&)>& response, - const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, - const ::IceInternal::Function<void (bool)>& sent) -{ - class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC - { - public: - - Cpp11CB(const ::std::function<void (const ::std::string&)>& responseFunc, - const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, - const ::std::function<void (bool)>& sentFunc) : - ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc), - _response(responseFunc) - { - CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr); - } - - virtual void completed(const ::Ice::AsyncResultPtr& __result) const - { - ::Ice::ObjectPrx __proxy = ::Ice::ObjectPrx::uncheckedCast(__result->getProxy()); - ::std::string __ret; - try - { - __ret = __proxy->end_ice_id(__result); - } - catch(const ::Ice::Exception& ex) - { - Cpp11FnCallbackNC::exception(__result, ex); - return; - } - if(_response != nullptr) - { - _response(__ret); - } - } - - private: - - ::std::function<void (const ::std::string&)> _response; - }; - return __begin_ice_id(ctx, new Cpp11CB(response, exception, sent), 0); -} - -Ice::AsyncResultPtr -IceProxy::Ice::Object::begin_ice_ids( - const ::Ice::Context& ctx, - const ::IceInternal::Function<void (const ::std::vector< ::std::string>&)>& response, - const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, - const ::IceInternal::Function<void (bool)>& sent) -{ - class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC - { - public: - - Cpp11CB(const ::std::function<void (const ::std::vector< ::std::string>&)>& responseFunc, - const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, - const ::std::function<void (bool)>& sentFunc) : - ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc), - _response(responseFunc) - { - CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr); - } - - virtual void completed(const ::Ice::AsyncResultPtr& __result) const - { - ::Ice::ObjectPrx __proxy = ::Ice::ObjectPrx::uncheckedCast(__result->getProxy()); - ::std::vector< ::std::string> __ret; - try - { - __ret = __proxy->end_ice_ids(__result); - } - catch(const ::Ice::Exception& ex) - { - Cpp11FnCallbackNC::exception(__result, ex); - return; - } - if(_response != nullptr) - { - _response(__ret); - } - } - - private: - - ::std::function<void (const ::std::vector< ::std::string>&)> _response; - }; - return __begin_ice_ids(ctx, new Cpp11CB(response, exception, sent), 0); -} - -Ice::AsyncResultPtr -IceProxy::Ice::Object::begin_ice_invoke( - const ::std::string& operation, - ::Ice::OperationMode mode, - const ::std::vector< ::Ice::Byte>& inParams, - const ::Ice::Context& ctx, - const ::IceInternal::Function<void (bool, const ::std::vector< ::Ice::Byte>&)>& response, - const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, - const ::IceInternal::Function<void (bool)>& sent) -{ - class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC - { - public: - - Cpp11CB(const ::std::function<void (bool, const ::std::vector< ::Ice::Byte>&)>& responseFunc, - const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, - const ::std::function<void (bool)>& sentFunc) : - ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc), - _response(responseFunc) - { - CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr); - } - - virtual void completed(const ::Ice::AsyncResultPtr& __result) const - { - ::Ice::ObjectPrx __proxy = ::Ice::ObjectPrx::uncheckedCast(__result->getProxy()); - bool __ret; - ::std::vector< ::Ice::Byte> p1; - try - { - __ret = __proxy->end_ice_invoke(p1, __result); - } - catch(const ::Ice::Exception& ex) - { - Cpp11FnCallbackNC::exception(__result, ex); - return; - } - if(_response != nullptr) - { - _response(__ret, p1); - } - } - - private: - - ::std::function<void (bool, const ::std::vector< ::Ice::Byte>&)> _response; - }; - - return __begin_ice_invoke(operation, mode, inParams, ctx, new Cpp11CB(response, exception, sent), 0); -} - -Ice::AsyncResultPtr -IceProxy::Ice::Object::begin_ice_invoke( - const ::std::string& operation, - ::Ice::OperationMode mode, - const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>& inParams, - const ::Ice::Context& ctx, - const ::IceInternal::Function<void (bool, const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&)>& response, - const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception, - const ::IceInternal::Function<void (bool)>& sent) -{ - class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC - { - public: - - Cpp11CB(const ::std::function<void (bool, const ::std::pair<const ::Ice::Byte*, - const ::Ice::Byte*>&)>& responseFunc, - const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc, - const ::std::function<void (bool)>& sentFunc) : - ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, sentFunc), - _response(responseFunc) - { - CallbackBase::checkCallback(true, _response || _exception != nullptr); - } - - virtual void completed(const ::Ice::AsyncResultPtr& __result) const - { - bool __ret; - ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*> p1; - try - { - __ret = __result->getProxy()->___end_ice_invoke(p1, __result); - } - catch(const ::Ice::Exception& ex) - { - Cpp11FnCallbackNC::exception(__result, ex); - return; - } - if(_response != nullptr) - { - _response(__ret, p1); - } - } - - private: - - ::std::function<void (bool, const ::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&)> _response; - }; - return __begin_ice_invoke(operation, mode, inParams, ctx, new Cpp11CB(response, exception, sent), 0); -} - -Ice::AsyncResultPtr -IceProxy::Ice::Object::begin_ice_getConnection( - const ::IceInternal::Function<void (const ::Ice::ConnectionPtr&)>& response, - const ::IceInternal::Function<void (const ::Ice::Exception&)>& exception) -{ - class Cpp11CB : public ::IceInternal::Cpp11FnCallbackNC - { - public: - - Cpp11CB(const ::std::function<void (const ::Ice::ConnectionPtr&)>& responseFunc, - const ::std::function<void (const ::Ice::Exception&)>& exceptionFunc) : - ::IceInternal::Cpp11FnCallbackNC(exceptionFunc, nullptr), - _response(responseFunc) - { - CallbackBase::checkCallback(true, responseFunc || exceptionFunc != nullptr); - } - - virtual void completed(const ::Ice::AsyncResultPtr& __result) const - { - ::Ice::ObjectPrx __proxy = ::Ice::ObjectPrx::uncheckedCast(__result->getProxy()); - ::Ice::ConnectionPtr __ret; - try - { - __ret = __proxy->end_ice_getConnection(__result); - } - catch(const ::Ice::Exception& ex) - { - Cpp11FnCallbackNC::exception(__result, ex); - return; - } - if(_response != nullptr) - { - _response(__ret); - } - } - - private: - - ::std::function<void (const ::Ice::ConnectionPtr&)> _response; - }; - return begin_ice_getConnectionInternal(new Cpp11CB(response, exception), 0); -} - -#endif - - bool IceProxy::Ice::Object::end_ice_isA(const AsyncResultPtr& __result) { |