diff options
author | Jose <jose@zeroc.com> | 2015-12-09 23:09:20 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-12-09 23:09:20 +0100 |
commit | a00673a2c1d9634102f91b7c6ebdd453d55a708f (patch) | |
tree | 2097f43ff5a1516b353ed0e88cc7b4174a518a17 /cpp/src/IceDiscovery | |
parent | Windows build fixes (diff) | |
download | ice-a00673a2c1d9634102f91b7c6ebdd453d55a708f.tar.bz2 ice-a00673a2c1d9634102f91b7c6ebdd453d55a708f.tar.xz ice-a00673a2c1d9634102f91b7c6ebdd453d55a708f.zip |
C++11 mapping server side input parameter fixes
Diffstat (limited to 'cpp/src/IceDiscovery')
-rw-r--r-- | cpp/src/IceDiscovery/LocatorI.cpp | 28 | ||||
-rw-r--r-- | cpp/src/IceDiscovery/LocatorI.h | 27 | ||||
-rw-r--r-- | cpp/src/IceDiscovery/LookupI.cpp | 34 | ||||
-rw-r--r-- | cpp/src/IceDiscovery/LookupI.h | 24 |
4 files changed, 73 insertions, 40 deletions
diff --git a/cpp/src/IceDiscovery/LocatorI.cpp b/cpp/src/IceDiscovery/LocatorI.cpp index fe7b6122115..cc7fbc70ef2 100644 --- a/cpp/src/IceDiscovery/LocatorI.cpp +++ b/cpp/src/IceDiscovery/LocatorI.cpp @@ -26,10 +26,10 @@ LocatorRegistryI::LocatorRegistryI(const Ice::CommunicatorPtr& com) : #ifdef ICE_CPP11_MAPPING void -LocatorRegistryI::setAdapterDirectProxy_async(const string& adapterId, - const shared_ptr<ObjectPrx>& proxy, +LocatorRegistryI::setAdapterDirectProxy_async(string adapterId, + shared_ptr<ObjectPrx> proxy, function<void ()> response, - function<void (const exception_ptr&)>, + function<void (exception_ptr)>, const Ice::Current&) #else void @@ -57,11 +57,11 @@ LocatorRegistryI::setAdapterDirectProxy_async(const AMD_LocatorRegistry_setAdapt #ifdef ICE_CPP11_MAPPING void -LocatorRegistryI::setReplicatedAdapterDirectProxy_async(const string& adapterId, - const string& replicaGroupId, - const shared_ptr<ObjectPrx>& proxy, +LocatorRegistryI::setReplicatedAdapterDirectProxy_async(string adapterId, + string replicaGroupId, + shared_ptr<ObjectPrx> proxy, function<void ()> response, - function<void (const exception_ptr&)>, + function<void (exception_ptr)>, const Ice::Current&) #else void @@ -106,10 +106,10 @@ LocatorRegistryI::setReplicatedAdapterDirectProxy_async( #ifdef ICE_CPP11_MAPPING void -LocatorRegistryI::setServerProcessProxy_async(const string&, - const shared_ptr<ProcessPrx>&, +LocatorRegistryI::setServerProcessProxy_async(string, + shared_ptr<ProcessPrx>, function<void ()> response, - function<void (const exception_ptr&)>, + function<void (exception_ptr)>, const Ice::Current&) { response(); @@ -226,18 +226,18 @@ LocatorI::LocatorI(const LookupIPtr& lookup, const LocatorRegistryPrxPtr& regist #ifdef ICE_CPP11_MAPPING void -LocatorI::findObjectById_async(const Ice::Identity& id, +LocatorI::findObjectById_async(Ice::Identity id, function<void (const shared_ptr<ObjectPrx>&)> response, - function<void (const exception_ptr&)>, + function<void (exception_ptr)>, const Ice::Current&) const { _lookup->findObject(response, id); } void -LocatorI::findAdapterById_async(const std::string& adapterId, +LocatorI::findAdapterById_async(string adapterId, function<void (const shared_ptr<ObjectPrx>&)> response, - function<void (const exception_ptr&)>, + function<void (exception_ptr)>, const Ice::Current&) const { _lookup->findAdapter(response, adapterId); diff --git a/cpp/src/IceDiscovery/LocatorI.h b/cpp/src/IceDiscovery/LocatorI.h index 9bc375b6495..bf09b88a665 100644 --- a/cpp/src/IceDiscovery/LocatorI.h +++ b/cpp/src/IceDiscovery/LocatorI.h @@ -26,24 +26,25 @@ public: #ifdef ICE_CPP11_MAPPING virtual void - setAdapterDirectProxy_async(const std::string&, - const std::shared_ptr<Ice::ObjectPrx>&, + setAdapterDirectProxy_async(std::string, + std::shared_ptr<Ice::ObjectPrx>, std::function<void ()>, - std::function<void (const std::exception_ptr&)>, + std::function<void (std::exception_ptr)>, const Ice::Current&); virtual void - setReplicatedAdapterDirectProxy_async(const std::string&, const std::string&, - const std::shared_ptr<Ice::ObjectPrx>&, + setReplicatedAdapterDirectProxy_async(std::string, + std::string, + std::shared_ptr<Ice::ObjectPrx>, std::function<void ()>, - std::function<void (const std::exception_ptr&)>, + std::function<void (std::exception_ptr)>, const Ice::Current&); virtual void - setServerProcessProxy_async(const std::string&, - const std::shared_ptr<Ice::ProcessPrx>&, + setServerProcessProxy_async(std::string, + std::shared_ptr<Ice::ProcessPrx>, std::function<void ()>, - std::function<void (const std::exception_ptr&)>, + std::function<void (std::exception_ptr)>, const Ice::Current&); #else virtual void @@ -81,15 +82,15 @@ public: #ifdef ICE_CPP11_MAPPING virtual void - findObjectById_async(const Ice::Identity&, + findObjectById_async(Ice::Identity, std::function<void (const std::shared_ptr<Ice::ObjectPrx>&)>, - std::function<void (const std::exception_ptr&)>, + std::function<void (std::exception_ptr)>, const Ice::Current&) const; virtual void - findAdapterById_async(const std::string&, + findAdapterById_async(std::string, std::function<void (const std::shared_ptr<Ice::ObjectPrx>&)>, - std::function<void (const std::exception_ptr&)>, + std::function<void (std::exception_ptr)>, const Ice::Current&) const; #else virtual void diff --git a/cpp/src/IceDiscovery/LookupI.cpp b/cpp/src/IceDiscovery/LookupI.cpp index d44a97f287a..d7e9ef7b1fa 100644 --- a/cpp/src/IceDiscovery/LookupI.cpp +++ b/cpp/src/IceDiscovery/LookupI.cpp @@ -179,8 +179,13 @@ LookupI::setLookupReply(const LookupReplyPrxPtr& lookupReply) } void -LookupI::findObjectById(const string& domainId, const Ice::Identity& id, const IceDiscovery::LookupReplyPrxPtr& reply, +#ifdef ICE_CPP11_MAPPING +LookupI::findObjectById(string domainId, Ice::Identity id, shared_ptr<IceDiscovery::LookupReplyPrx> reply, + const Ice::Current&) +#else +LookupI::findObjectById(const string& domainId, const Ice::Identity& id, const IceDiscovery::LookupReplyPrx& reply, const Ice::Current&) +#endif { if(domainId != _domainId) { @@ -209,8 +214,13 @@ LookupI::findObjectById(const string& domainId, const Ice::Identity& id, const I } void -LookupI::findAdapterById(const string& domainId, const std::string& adapterId, - const IceDiscovery::LookupReplyPrxPtr& reply, const Ice::Current&) +#ifdef ICE_CPP11_MAPPING +LookupI::findAdapterById(string domainId, string adapterId, shared_ptr<IceDiscovery::LookupReplyPrx> reply, + const Ice::Current&) +#else +LookupI::findAdapterById(const string& domainId, const string& adapterId, const IceDiscovery::LookupReplyPrxPtr& reply, + const Ice::Current&) +#endif { if(domainId != _domainId) { @@ -441,16 +451,28 @@ LookupReplyI::LookupReplyI(const LookupIPtr& lookup) : _lookup(lookup) { } +#ifdef ICE_CPP11_MAPPING void -LookupReplyI::foundObjectById(const Ice::Identity& id, const Ice::ObjectPrxPtr& proxy, const Ice::Current&) +LookupReplyI::foundObjectById(Identity id, shared_ptr<ObjectPrx> proxy, const Current&) { _lookup->foundObject(id, proxy); } void -LookupReplyI::foundAdapterById(const std::string& adapterId, const Ice::ObjectPrxPtr& proxy, bool isReplicaGroup, - const Ice::Current&) +LookupReplyI::foundAdapterById(string adapterId, shared_ptr<ObjectPrx> proxy, bool isReplicaGroup, const Current&) { _lookup->foundAdapter(adapterId, proxy, isReplicaGroup); } +#else +void +LookupReplyI::foundObjectById(const Identity& id, const ObjectPrxPtr& proxy, const Current&) +{ + _lookup->foundObject(id, proxy); +} +void +LookupReplyI::foundAdapterById(const string& adapterId, const ObjectPrxPtr& proxy, bool isReplicaGroup, const Current&) +{ + _lookup->foundAdapter(adapterId, proxy, isReplicaGroup); +} +#endif diff --git a/cpp/src/IceDiscovery/LookupI.h b/cpp/src/IceDiscovery/LookupI.h index ad242f0d6d0..b54875ff0f2 100644 --- a/cpp/src/IceDiscovery/LookupI.h +++ b/cpp/src/IceDiscovery/LookupI.h @@ -216,22 +216,27 @@ public: void setLookupReply(const LookupReplyPrxPtr&); - virtual void findObjectById(const std::string&, const Ice::Identity&, const IceDiscovery::LookupReplyPrxPtr&, +#ifdef ICE_CPP11_MAPPING + virtual void findObjectById(std::string, + Ice::Identity, + ::std::shared_ptr<IceDiscovery::LookupReplyPrx>, const Ice::Current&); - virtual void findAdapterById(const std::string&, const std::string&, const IceDiscovery::LookupReplyPrxPtr&, + virtual void findAdapterById(std::string, std::string, ::std::shared_ptr<IceDiscovery::LookupReplyPrx>, const Ice::Current&); - -#ifdef ICE_CPP11_MAPPING void findObject(std::function<void (const std::shared_ptr<Ice::ObjectPrx>&)>, const Ice::Identity&); void findAdapter(std::function<void (const std::shared_ptr<Ice::ObjectPrx>&)>, const std::string&); #else + virtual void findObjectById(const std::string&, const Ice::Identity&, const IceDiscovery::LookupReplyPrx&, + const Ice::Current&); + virtual void findAdapterById(const std::string&, const std::string, ::std::shared_ptr<IceDiscovery::LookupReplyPrx>, + const Ice::Current&); void findObject(const Ice::AMD_Locator_findObjectByIdPtr&, const Ice::Identity&); void findAdapter(const Ice::AMD_Locator_findAdapterByIdPtr&, const std::string&); #endif void foundObject(const Ice::Identity&, const Ice::ObjectPrxPtr&); void foundAdapter(const std::string&, const Ice::ObjectPrxPtr&, bool); - + void adapterRequestTimedOut(const AdapterRequestPtr&); void objectRequestTimedOut(const ObjectRequestPtr&); @@ -270,8 +275,13 @@ public: LookupReplyI(const LookupIPtr&); - virtual void foundObjectById(const Ice::Identity&, const Ice::ObjectPrxPtr&, const Ice::Current&); - virtual void foundAdapterById(const std::string&, const Ice::ObjectPrxPtr&, bool, const Ice::Current&); +#ifdef ICE_CPP11_MAPPING + virtual void foundObjectById(Ice::Identity, std::shared_ptr<Ice::ObjectPrx>, const Ice::Current&); + virtual void foundAdapterById(std::string, std::shared_ptr<Ice::ObjectPrx>, bool, const Ice::Current&); +#else + virtual void foundObjectById(const Ice::Identity&, const Ice::ObjectPrx&, const Ice::Current&); + virtual void foundAdapterById(const std::string&, const Ice::ObjectPrx&, bool, const Ice::Current&); +#endif private: |