diff options
author | Jose <jose@zeroc.com> | 2015-12-15 18:35:14 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-12-15 18:35:14 +0100 |
commit | de0939c485861ad124f64e213883c74571eefa2b (patch) | |
tree | c6dc163ddcee5aa0d878eb2463b57fc6a32a5f47 /cpp/src/Ice/Initialize.cpp | |
parent | Removed iOS workaround from udp test (diff) | |
download | ice-de0939c485861ad124f64e213883c74571eefa2b.tar.bz2 ice-de0939c485861ad124f64e213883c74571eefa2b.tar.xz ice-de0939c485861ad124f64e213883c74571eefa2b.zip |
C++11 mapping: fixes to InitializationData
Diffstat (limited to 'cpp/src/Ice/Initialize.cpp')
-rw-r--r-- | cpp/src/Ice/Initialize.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index ebc2026d990..28cc59d3df0 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -140,9 +140,23 @@ Ice::createProperties(int& argc, char* argv[], const PropertiesPtr& defaults) return properties; } +#ifdef ICE_CPP11_MAPPING +Ice::ThreadHookPlugin::ThreadHookPlugin(const CommunicatorPtr& communicator, + function<void()> threadStart, + function<void()> threadStop) +{ + if(communicator == nullptr) + { + throw PluginInitializationException(__FILE__, __LINE__, "Communicator cannot be null"); + } + + IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); + instance->setThreadHook(move(threadStart), move(threadStop)); +} +#else Ice::ThreadHookPlugin::ThreadHookPlugin(const CommunicatorPtr& communicator, const ThreadNotificationPtr& threadHook) { - if(communicator == ICE_NULLPTR) + if(communicator == 0) { throw PluginInitializationException(__FILE__, __LINE__, "Communicator cannot be null"); } @@ -150,7 +164,7 @@ Ice::ThreadHookPlugin::ThreadHookPlugin(const CommunicatorPtr& communicator, con IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); instance->setThreadHook(threadHook); } - +#endif void Ice::ThreadHookPlugin::initialize() { |