diff options
Diffstat (limited to 'cpp')
134 files changed, 375 insertions, 378 deletions
diff --git a/cpp/src/Glacier2/Blobject.cpp b/cpp/src/Glacier2/Blobject.cpp index 1f58da34ffb..4b822469c81 100644 --- a/cpp/src/Glacier2/Blobject.cpp +++ b/cpp/src/Glacier2/Blobject.cpp @@ -261,7 +261,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd } if(_reverseConnection) { - out << "\nidentity = " << _instance->communicator()->identityToString(proxy->ice_getIdentity()); + out << "\nidentity = " << identityToString(proxy->ice_getIdentity()); } else { @@ -310,7 +310,7 @@ Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amd out << "routing override"; if(_reverseConnection) { - out << "\nidentity = " << _instance->communicator()->identityToString(proxy->ice_getIdentity()); + out << "\nidentity = " << identityToString(proxy->ice_getIdentity()); } else { diff --git a/cpp/src/Glacier2/ClientBlobject.cpp b/cpp/src/Glacier2/ClientBlobject.cpp index d7aef4ae401..f10c3d614b8 100644 --- a/cpp/src/Glacier2/ClientBlobject.cpp +++ b/cpp/src/Glacier2/ClientBlobject.cpp @@ -120,7 +120,7 @@ Glacier2::ClientBlobject::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& { Trace out(_instance->logger(), "Glacier2"); out << "rejecting request: " << rejectedFilters << "\n"; - out << "identity: " << _instance->communicator()->identityToString(current.id); + out << "identity: " << identityToString(current.id); } ObjectNotExistException ex(__FILE__, __LINE__); diff --git a/cpp/src/Glacier2/FilterManager.cpp b/cpp/src/Glacier2/FilterManager.cpp index a384a072a04..95c52f9633a 100644 --- a/cpp/src/Glacier2/FilterManager.cpp +++ b/cpp/src/Glacier2/FilterManager.cpp @@ -61,7 +61,7 @@ stringToSeq(const CommunicatorPtr& comm, const string& str, vector<Identity>& se // // TODO: should this be an unmatched quote error? // - seq.push_back(comm->stringToIdentity(str.substr(current))); + seq.push_back(stringToIdentity(str.substr(current))); break; } @@ -76,7 +76,7 @@ stringToSeq(const CommunicatorPtr& comm, const string& str, vector<Identity>& se if(markString) { ++current; - seq.push_back(comm->stringToIdentity(str.substr(current, end-current))); + seq.push_back(stringToIdentity(str.substr(current, end-current))); break; } else @@ -95,7 +95,7 @@ stringToSeq(const CommunicatorPtr& comm, const string& str, vector<Identity>& se { end = str.find_first_of(ws, current); string::size_type len = (end == string::npos) ? string::npos : end - current; - seq.push_back(comm->stringToIdentity(str.substr(current, len))); + seq.push_back(stringToIdentity(str.substr(current, len))); break; } } diff --git a/cpp/src/Glacier2/RouterI.cpp b/cpp/src/Glacier2/RouterI.cpp index e6fa92b78e2..c1935786ce0 100644 --- a/cpp/src/Glacier2/RouterI.cpp +++ b/cpp/src/Glacier2/RouterI.cpp @@ -40,7 +40,7 @@ Glacier2::RouterI::RouterI(const InstancePtr& instance, const ConnectionPtr& con if(_instance->properties()->getPropertyAsInt("Glacier2.ReturnClientProxy") > 0) { const_cast<Ice::ObjectPrx&>(_clientProxy) = - _instance->clientObjectAdapter()->createProxy(_instance->communicator()->stringToIdentity("dummy")); + _instance->clientObjectAdapter()->createProxy(stringToIdentity("dummy")); } if(_instance->serverObjectAdapter()) diff --git a/cpp/src/Glacier2/SessionRouterI.cpp b/cpp/src/Glacier2/SessionRouterI.cpp index 4d46d210726..f259ea49cde 100644 --- a/cpp/src/Glacier2/SessionRouterI.cpp +++ b/cpp/src/Glacier2/SessionRouterI.cpp @@ -1,4 +1,3 @@ - // ********************************************************************** // // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved. @@ -1151,7 +1150,7 @@ SessionRouterI::getRouterImpl(const ConnectionPtr& connection, const Ice::Identi { Trace out(_instance->logger(), "Glacier2"); out << "rejecting request. no session is associated with the connection.\n"; - out << "identity: " << _instance->communicator()->identityToString(id); + out << "identity: " << identityToString(id); } connection->close(true); throw ObjectNotExistException(__FILE__, __LINE__); diff --git a/cpp/src/Glacier2Lib/NullPermissionsVerifier.cpp b/cpp/src/Glacier2Lib/NullPermissionsVerifier.cpp index abc76a3b6e8..31d33ad00a4 100644 --- a/cpp/src/Glacier2Lib/NullPermissionsVerifier.cpp +++ b/cpp/src/Glacier2Lib/NullPermissionsVerifier.cpp @@ -111,12 +111,12 @@ Init::checkPermissionVerifier(const string& val) // check if it's actually a stringified identity // (with typically missing " " because the category contains a space) - if(val == _communicator->identityToString(_nullPVId)) + if(val == identityToString(_nullPVId)) { createObjects(); return _adapter->createProxy(_nullPVId)->ice_toString(); // Return valid proxy to rewrite the property } - else if(val == _communicator->identityToString(_nullSSLPVId)) + else if(val == identityToString(_nullSSLPVId)) { createObjects(); return _adapter->createProxy(_nullSSLPVId)->ice_toString(); // Return valid proxy to rewrite the property diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp index 0f816647a11..64ff4f91e07 100644 --- a/cpp/src/Ice/InstrumentationI.cpp +++ b/cpp/src/Ice/InstrumentationI.cpp @@ -334,7 +334,7 @@ public: string getIdentity() const { - return _current.adapter->getCommunicator()->identityToString(_current.id); + return identityToString(_current.id); } private: @@ -443,7 +443,7 @@ public: catch(const Exception&) { // Either a fixed proxy or the communicator is destroyed. - os << _proxy->ice_getCommunicator()->identityToString(_proxy->ice_getIdentity()); + os << identityToString(_proxy->ice_getIdentity()); os << " [" << _operation << ']'; } } @@ -474,7 +474,7 @@ public: { if(_proxy) { - return _proxy->ice_getCommunicator()->identityToString(_proxy->ice_getIdentity()); + return identityToString(_proxy->ice_getIdentity()); } else { diff --git a/cpp/src/IceBox/Admin.cpp b/cpp/src/IceBox/Admin.cpp index c7c76bac161..bf7fa5d5a05 100644 --- a/cpp/src/IceBox/Admin.cpp +++ b/cpp/src/IceBox/Admin.cpp @@ -116,7 +116,7 @@ Client::run(int argc, char* argv[]) return EXIT_FAILURE; } - managerProxy = "\"" + communicator()->identityToString(managerIdentity) + "\" :" + managerEndpoints; + managerProxy = "\"" + identityToString(managerIdentity) + "\" :" + managerEndpoints; } else { @@ -127,7 +127,7 @@ Client::run(int argc, char* argv[]) return EXIT_FAILURE; } - managerProxy = "\"" + communicator()->identityToString(managerIdentity) + "\" @" + managerAdapterId; + managerProxy = "\"" + identityToString(managerIdentity) + "\" @" + managerAdapterId; } base = communicator()->stringToProxy(managerProxy); diff --git a/cpp/src/IceDiscovery/PluginI.cpp b/cpp/src/IceDiscovery/PluginI.cpp index 615e0eeec96..975d50976ff 100644 --- a/cpp/src/IceDiscovery/PluginI.cpp +++ b/cpp/src/IceDiscovery/PluginI.cpp @@ -154,7 +154,7 @@ PluginI::initialize() // Add lookup and lookup reply Ice objects // _lookup = ICE_MAKE_SHARED(LookupI, locatorRegistry, ICE_UNCHECKED_CAST(LookupPrx, lookupPrx), properties); - _multicastAdapter->add(_lookup, _communicator->stringToIdentity("IceDiscovery/Lookup")); + _multicastAdapter->add(_lookup, Ice::stringToIdentity("IceDiscovery/Lookup")); Ice::ObjectPrxPtr lookupReply = _replyAdapter->addWithUUID(ICE_MAKE_SHARED(LookupReplyI, _lookup))->ice_datagram(); _lookup->setLookupReply(ICE_UNCHECKED_CAST(LookupReplyPrx, lookupReply)); diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index edfb98f03a7..0e5f6a1f8be 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -688,7 +688,7 @@ AdminI::updateObject(const Ice::ObjectPrx& proxy, const ::Ice::Current&) if(id.category == _database->getInstanceName()) { DeploymentException ex; - ex.reason = "updating object `" + _database->getCommunicator()->identityToString(id) + "' is not allowed:\n"; + ex.reason = "updating object `" + identityToString(id) + "' is not allowed:\n"; ex.reason += "objects with identity category `" + id.category + "' are managed by IceGrid"; throw ex; } @@ -709,7 +709,7 @@ AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const if(id.category == _database->getInstanceName()) { DeploymentException ex; - ex.reason = "adding object `" + _database->getCommunicator()->identityToString(id) + "' is not allowed:\n"; + ex.reason = "adding object `" + identityToString(id) + "' is not allowed:\n"; ex.reason += "objects with identity category `" + id.category + "' are managed by IceGrid"; throw ex; } @@ -727,7 +727,7 @@ AdminI::removeObject(const Ice::Identity& id, const Ice::Current&) if(id.category == _database->getInstanceName()) { DeploymentException ex; - ex.reason = "removing object `" + _database->getCommunicator()->identityToString(id) + "' is not allowed:\n"; + ex.reason = "removing object `" + identityToString(id) + "' is not allowed:\n"; ex.reason += "objects with identity category `" + id.category + "' are managed by IceGrid"; throw ex; } diff --git a/cpp/src/IceGrid/AllocatableObjectCache.cpp b/cpp/src/IceGrid/AllocatableObjectCache.cpp index 3a9799e1eac..ae3294bb51c 100644 --- a/cpp/src/IceGrid/AllocatableObjectCache.cpp +++ b/cpp/src/IceGrid/AllocatableObjectCache.cpp @@ -134,7 +134,7 @@ AllocatableObjectCache::add(const ObjectInfo& info, const AllocatablePtr& parent if(getImpl(id)) { Ice::Error out(_communicator->getLogger()); - out << "can't add duplicate allocatable object `" << _communicator->identityToString(id) << "'"; + out << "can't add duplicate allocatable object `" << identityToString(id) << "'"; return; } @@ -151,7 +151,7 @@ AllocatableObjectCache::add(const ObjectInfo& info, const AllocatablePtr& parent if(_traceLevels && _traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "added allocatable object `" << _communicator->identityToString(id) << "'"; + out << "added allocatable object `" << identityToString(id) << "'"; } } @@ -177,7 +177,7 @@ AllocatableObjectCache::remove(const Ice::Identity& id) if(!entry) { Ice::Error out(_communicator->getLogger()); - out << "can't remove unknown object `" << _communicator->identityToString(id) << "'"; + out << "can't remove unknown object `" << identityToString(id) << "'"; } removeImpl(id); @@ -191,7 +191,7 @@ AllocatableObjectCache::remove(const Ice::Identity& id) if(_traceLevels && _traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "removed allocatable object `" << _communicator->identityToString(id) << "'"; + out << "removed allocatable object `" << identityToString(id) << "'"; } } diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 2087bb3359e..1876182b942 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -449,7 +449,7 @@ Client::run(StringSeq& originalArgs) ObjectAdapterPtr adapter = communicator()->createObjectAdapterWithEndpoints("FileParser", "tcp -h localhost"); adapter->activate(); - ObjectPrx proxy = adapter->add(new FileParserI, communicator()->stringToIdentity("FileParser")); + ObjectPrx proxy = adapter->add(new FileParserI, stringToIdentity("FileParser")); cout << proxy << endl; communicator()->waitForShutdown(); diff --git a/cpp/src/IceGrid/Database.cpp b/cpp/src/IceGrid/Database.cpp index b51c056048b..694d59c073d 100644 --- a/cpp/src/IceGrid/Database.cpp +++ b/cpp/src/IceGrid/Database.cpp @@ -1483,7 +1483,7 @@ Database::addObject(const ObjectInfo& info) if(_traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "added object `" << _communicator->identityToString(id) << "' (serial = `" << dbSerial << "')"; + out << "added object `" << identityToString(id) << "' (serial = `" << dbSerial << "')"; } } _objectObserverTopic->waitForSyncedSubscribers(serial); @@ -1539,7 +1539,7 @@ Database::addOrUpdateObject(const ObjectInfo& info, Ice::Long dbSerial) if(_traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << (!update ? "added" : "updated") << " object `" << _communicator->identityToString(id) << "' (serial = `" << dbSerial << "')"; + out << (!update ? "added" : "updated") << " object `" << identityToString(id) << "' (serial = `" << dbSerial << "')"; } } _objectObserverTopic->waitForSyncedSubscribers(serial); @@ -1556,7 +1556,7 @@ Database::removeObject(const Ice::Identity& id, Ice::Long dbSerial) if(_objectCache.has(id)) { DeploymentException ex; - ex.reason = "removing object `" + _communicator->identityToString(id) + "' is not allowed:\n"; + ex.reason = "removing object `" + identityToString(id) + "' is not allowed:\n"; ex.reason += "the object was added with the application descriptor `"; ex.reason += _objectCache.get(id)->getApplication(); ex.reason += "'"; @@ -1590,7 +1590,7 @@ Database::removeObject(const Ice::Identity& id, Ice::Long dbSerial) if(_traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "removed object `" << _communicator->identityToString(id) << "' (serial = `" << dbSerial << "')"; + out << "removed object `" << identityToString(id) << "' (serial = `" << dbSerial << "')"; } } _objectObserverTopic->waitForSyncedSubscribers(serial); @@ -1609,7 +1609,7 @@ Database::updateObject(const Ice::ObjectPrx& proxy) if(_objectCache.has(id)) { DeploymentException ex; - ex.reason = "updating object `" + _communicator->identityToString(id) + "' is not allowed:\n"; + ex.reason = "updating object `" + identityToString(id) + "' is not allowed:\n"; ex.reason += "the object was added with the application descriptor `"; ex.reason += _objectCache.get(id)->getApplication(); ex.reason += "'"; @@ -1644,7 +1644,7 @@ Database::updateObject(const Ice::ObjectPrx& proxy) if(_traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "updated object `" << _communicator->identityToString(id) << "' (serial = `" << dbSerial << "')"; + out << "updated object `" << identityToString(id) << "' (serial = `" << dbSerial << "')"; } } _objectObserverTopic->waitForSyncedSubscribers(serial); @@ -1833,7 +1833,7 @@ Database::getAllObjectInfos(const string& expression) ObjectsMapROCursor cursor(_objects, txn); while(cursor.get(id, info, MDB_NEXT)) { - if(expression.empty() || IceUtilInternal::match(_communicator->identityToString(id), expression, true)) + if(expression.empty() || IceUtilInternal::match(identityToString(id), expression, true)) { infos.push_back(info); } @@ -2089,7 +2089,7 @@ Database::checkObjectForAddition(const Ice::Identity& objectId, if(found) { DeploymentException ex; - ex.reason = "object `" + _communicator->identityToString(objectId) + "' is already registered"; + ex.reason = "object `" + identityToString(objectId) + "' is already registered"; throw ex; } } @@ -2761,7 +2761,7 @@ Database::addObject(const IceDB::ReadWriteTxn& txn, const ObjectInfo& info, bool catch(const IceDB::KeyTooLongException& ex) { throw DeploymentException("object identity `" + - _communicator->identityToString(info.proxy->ice_getIdentity()) + identityToString(info.proxy->ice_getIdentity()) + "' is too long: " + ex.what()); } try diff --git a/cpp/src/IceGrid/DescriptorBuilder.cpp b/cpp/src/IceGrid/DescriptorBuilder.cpp index ab6def85669..217cba7e7d6 100644 --- a/cpp/src/IceGrid/DescriptorBuilder.cpp +++ b/cpp/src/IceGrid/DescriptorBuilder.cpp @@ -10,6 +10,7 @@ #include <Ice/Communicator.h> #include <Ice/LoggerUtil.h> #include <Ice/LocalException.h> +#include <Ice/Initialize.h> #include <IceGrid/DescriptorBuilder.h> #include <IceGrid/Util.h> @@ -318,7 +319,7 @@ ApplicationDescriptorBuilder::addObject(const XmlAttributesHelper& attrs) { ObjectDescriptor object; object.type = attrs("type", ""); - object.id = _communicator->stringToIdentity(attrs("identity")); + object.id = Ice::stringToIdentity(attrs("identity")); object.proxyOptions = attrs("proxy-options", ""); if(attrs.contains("property")) { @@ -697,7 +698,7 @@ CommunicatorDescriptorBuilder::addObject(const XmlAttributesHelper& attrs) { ObjectDescriptor object; object.type = attrs("type", ""); - object.id = _communicator->stringToIdentity(attrs("identity")); + object.id = Ice::stringToIdentity(attrs("identity")); object.proxyOptions = attrs("proxy-options", ""); if(attrs.contains("property")) { @@ -711,7 +712,7 @@ CommunicatorDescriptorBuilder::addAllocatable(const XmlAttributesHelper& attrs) { ObjectDescriptor object; object.type = attrs("type", ""); - object.id = _communicator->stringToIdentity(attrs("identity")); + object.id = Ice::stringToIdentity(attrs("identity")); object.proxyOptions = attrs("proxy-options", ""); if(attrs.contains("property")) { diff --git a/cpp/src/IceGrid/DescriptorHelper.cpp b/cpp/src/IceGrid/DescriptorHelper.cpp index bd0d57cb333..7e1a531dbb5 100644 --- a/cpp/src/IceGrid/DescriptorHelper.cpp +++ b/cpp/src/IceGrid/DescriptorHelper.cpp @@ -650,11 +650,11 @@ Ice::Identity Resolver::operator()(const Ice::Identity& value, const string& name) const { assert(_communicator); - string str = asId(_communicator->identityToString(value), name, false); - Ice::Identity id = _communicator->stringToIdentity(str); + string str = asId(identityToString(value), name, false); + Ice::Identity id = Ice::stringToIdentity(str); if(id.name.empty()) { - exception("invalid object identity `" + _communicator->identityToString(value) + "': name empty"); + exception("invalid object identity `" + identityToString(value) + "': name empty"); } return id; } @@ -1387,7 +1387,7 @@ CommunicatorHelper::printObjectAdapter(const Ice::CommunicatorPtr& communicator, { out << nl << "well-known object"; out << sb; - out << nl << "identity = `" << communicator->identityToString(p->id) << "' "; + out << nl << "identity = `" << identityToString(p->id) << "' "; if(!p->type.empty()) { out << nl << "type = `" << p->type << "'"; @@ -1402,7 +1402,7 @@ CommunicatorHelper::printObjectAdapter(const Ice::CommunicatorPtr& communicator, { out << nl << "allocatable"; out << sb; - out << nl << "identity = `" << communicator->identityToString(p->id) << "' "; + out << nl << "identity = `" << identityToString(p->id) << "' "; if(!p->type.empty()) { out << nl << "type = `" << p->type << "'"; @@ -2825,7 +2825,7 @@ ApplicationHelper::ApplicationHelper(const Ice::CommunicatorPtr& communicator, { if(objectIds.count(*o) > 1) { - resolve.exception("duplicate object `" + _communicator->identityToString(*o) + "'"); + resolve.exception("duplicate object `" + identityToString(*o) + "'"); } } } diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index b835c65be04..63b7a20a755 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -470,7 +470,7 @@ NodeService::startImpl(int argc, char* argv[], int& status) // for the server and server adapter. It also takes care of installing the // evictors and object factories necessary to store these objects. // - Identity id = communicator()->stringToIdentity(instanceName + "/Node-" + name); + Identity id = stringToIdentity(instanceName + "/Node-" + name); NodePrx nodeProxy = NodePrx::uncheckedCast(_adapter->createProxy(id)); _node = new NodeI(_adapter, *_sessions, _activator, _timer, traceLevels, nodeProxy, name, mapper, instanceName); _adapter->add(_node, nodeProxy->ice_getIdentity()); diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp index a39b69ae487..1ca7a9645d6 100644 --- a/cpp/src/IceGrid/LocatorI.cpp +++ b/cpp/src/IceGrid/LocatorI.cpp @@ -198,7 +198,7 @@ public: return; } - _amdCB->ice_response(proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy"))); + _amdCB->ice_response(proxy->ice_identity(Ice::stringToIdentity("dummy"))); } virtual void @@ -390,7 +390,7 @@ public: return; } - _proxies[id] = proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy")); + _proxies[id] = proxy->ice_identity(Ice::stringToIdentity("dummy")); // // If we received all the required proxies, it's time to send the @@ -548,14 +548,14 @@ public: if(_count > 1) { - Ice::ObjectPrx p = proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy")); + Ice::ObjectPrx p = proxy->ice_identity(Ice::stringToIdentity("dummy")); LocatorI::RequestPtr request = new ReplicaGroupRequest(_amdCB, _locator, _id, _encoding, _adapters, _count, p); request->execute(); } else { - _amdCB->ice_response(proxy->ice_identity(_locator->getCommunicator()->stringToIdentity("dummy"))); + _amdCB->ice_response(proxy->ice_identity(Ice::stringToIdentity("dummy"))); } _adapters.clear(); } diff --git a/cpp/src/IceGrid/ObjectCache.cpp b/cpp/src/IceGrid/ObjectCache.cpp index 12e210c62ad..9d7138e7050 100644 --- a/cpp/src/IceGrid/ObjectCache.cpp +++ b/cpp/src/IceGrid/ObjectCache.cpp @@ -82,7 +82,7 @@ ObjectCache::add(const ObjectInfo& info, const string& application) if(getImpl(id)) { Ice::Error out(_communicator->getLogger()); - out << "can't add duplicate object `" << _communicator->identityToString(id) << "'"; + out << "can't add duplicate object `" << identityToString(id) << "'"; return; } @@ -99,8 +99,8 @@ ObjectCache::add(const ObjectInfo& info, const string& application) if(_traceLevels && _traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "added object `" << _communicator->identityToString(id) << "'"; - } + out << "added object `" << identityToString(id) << "'"; + } } ObjectEntryPtr @@ -123,7 +123,7 @@ ObjectCache::remove(const Ice::Identity& id) if(!entry) { Ice::Error out(_communicator->getLogger()); - out << "can't remove unknown object `" << _communicator->identityToString(id) << "'"; + out << "can't remove unknown object `" << identityToString(id) << "'"; return; } removeImpl(id); @@ -131,15 +131,15 @@ ObjectCache::remove(const Ice::Identity& id) map<string, TypeEntry>::iterator p = _types.find(entry->getType()); assert(p != _types.end()); if(p->second.remove(entry)) - { + { _types.erase(p); } if(_traceLevels && _traceLevels->object > 0) { Ice::Trace out(_traceLevels->logger, _traceLevels->objectCat); - out << "removed object `" << _communicator->identityToString(id) << "'"; - } + out << "removed object `" << identityToString(id) << "'"; + } } Ice::ObjectProxySeq @@ -167,7 +167,7 @@ ObjectCache::getAll(const string& expression) ObjectInfoSeq infos; for(map<Ice::Identity, ObjectEntryPtr>::const_iterator p = _entries.begin(); p != _entries.end(); ++p) { - if(expression.empty() || IceUtilInternal::match(_communicator->identityToString(p->first), expression, true)) + if(expression.empty() || IceUtilInternal::match(identityToString(p->first), expression, true)) { infos.push_back(p->second->getObjectInfo()); } @@ -229,4 +229,3 @@ ObjectEntry::canRemove() { return true; } - diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index 01c80978f1c..db58e8f242a 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -2100,7 +2100,7 @@ Parser::removeObject(const list<string>& args) try { - _admin->removeObject(_communicator->stringToIdentity((*(args.begin())))); + _admin->removeObject(stringToIdentity((*(args.begin())))); } catch(const Ice::Exception& ex) { @@ -2148,7 +2148,7 @@ Parser::describeObject(const list<string>& args) string arg = *(args.begin()); if(arg.find('*') == string::npos) { - ObjectInfo info = _admin->getObjectInfo(_communicator->stringToIdentity(arg)); + ObjectInfo info = _admin->getObjectInfo(stringToIdentity(arg)); cout << "proxy = `" << _communicator->proxyToString(info.proxy) << "'" << endl; cout << "type = `" << info.type << "'" << endl; return; @@ -2198,7 +2198,7 @@ Parser::listObject(const list<string>& args) for(ObjectInfoSeq::const_iterator p = objects.begin(); p != objects.end(); ++p) { - cout << _communicator->identityToString(p->proxy->ice_getIdentity()) << endl; + cout << identityToString(p->proxy->ice_getIdentity()) << endl; } } catch(const Ice::Exception& ex) @@ -2957,11 +2957,11 @@ Parser::exception(const Ice::Exception& ex) } catch(const ObjectNotRegisteredException& ex) { - error("couldn't find object `" + _communicator->identityToString(ex.id) + "'"); + error("couldn't find object `" + identityToString(ex.id) + "'"); } catch(const ObjectExistsException& ex) { - error("object `" + _communicator->identityToString(ex.id) + "' already exists"); + error("object `" + identityToString(ex.id) + "' already exists"); } catch(const DeploymentException& ex) { diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index d246b26dd9c..8ca6830132a 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -589,7 +589,7 @@ RegistryI::startImpl() // // Add the locator finder object to the client adapter. // - _clientAdapter->add(new FinderI(_wellKnownObjects), _communicator->stringToIdentity("Ice/LocatorFinder")); + _clientAdapter->add(new FinderI(_wellKnownObjects), stringToIdentity("Ice/LocatorFinder")); // // Setup the discovery object adapter and also add it the lookup @@ -624,7 +624,7 @@ RegistryI::startImpl() try { - Ice::Identity lookupId = _communicator->stringToIdentity("IceLocatorDiscovery/Lookup"); + Ice::Identity lookupId = stringToIdentity("IceLocatorDiscovery/Lookup"); discoveryAdapter = _communicator->createObjectAdapter("IceGrid.Registry.Discovery"); discoveryAdapter->add(new LookupI(_instanceName, _wellKnownObjects), lookupId); } diff --git a/cpp/src/IceGrid/ReplicaSessionManager.cpp b/cpp/src/IceGrid/ReplicaSessionManager.cpp index 96a3fd4261f..77c324aea27 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.cpp +++ b/cpp/src/IceGrid/ReplicaSessionManager.cpp @@ -177,7 +177,7 @@ public: { ostringstream os; os << ex << ":\n"; - os << "id: " << info.proxy->ice_getCommunicator()->identityToString(info.proxy->ice_getIdentity()); + os << "id: " << identityToString(info.proxy->ice_getIdentity()); failure = os.str(); } receivedUpdate(ObjectObserverTopicName, serial, failure); @@ -196,7 +196,7 @@ public: { ostringstream os; os << ex << ":\n"; - os << "id: " << info.proxy->ice_getCommunicator()->identityToString(info.proxy->ice_getIdentity()); + os << "id: " << identityToString(info.proxy->ice_getIdentity()); failure = os.str(); } catch(const DeploymentException& ex) diff --git a/cpp/src/IceGrid/Util.cpp b/cpp/src/IceGrid/Util.cpp index 1553c8be228..de544ef43b1 100644 --- a/cpp/src/IceGrid/Util.cpp +++ b/cpp/src/IceGrid/Util.cpp @@ -207,7 +207,7 @@ IceGrid::toObjectInfo(const Ice::CommunicatorPtr& communicator, const ObjectDesc ObjectInfo info; info.type = obj.type; ostringstream proxyStr; - proxyStr << "\"" << communicator->identityToString(obj.id) << "\""; + proxyStr << "\"" << identityToString(obj.id) << "\""; if(!obj.proxyOptions.empty()) { proxyStr << ' ' << obj.proxyOptions; @@ -220,7 +220,7 @@ IceGrid::toObjectInfo(const Ice::CommunicatorPtr& communicator, const ObjectDesc catch(const Ice::ProxyParseException&) { ostringstream fallbackProxyStr; - fallbackProxyStr << "\"" << communicator->identityToString(obj.id) << "\"" << " @ " << adapterId; + fallbackProxyStr << "\"" << identityToString(obj.id) << "\"" << " @ " << adapterId; info.proxy = communicator->stringToProxy(fallbackProxyStr.str()); } return info; diff --git a/cpp/src/IceStorm/IceStormDB.cpp b/cpp/src/IceStorm/IceStormDB.cpp index b3a927c719e..9a3c81022e3 100644 --- a/cpp/src/IceStorm/IceStormDB.cpp +++ b/cpp/src/IceStorm/IceStormDB.cpp @@ -231,8 +231,8 @@ Client::run(int argc, char* argv[]) { if(debug) { - cout << " KEY = TOPIC(" << communicator()->identityToString(q->first.topic) - << ") ID(" << communicator()->identityToString(q->first.id) << ")" <<endl; + cout << " KEY = TOPIC(" << identityToString(q->first.topic) + << ") ID(" << identityToString(q->first.id) << ")" <<endl; } subscriberMap.put(txn, q->first, q->second); } @@ -286,8 +286,8 @@ Client::run(int argc, char* argv[]) { if(debug) { - cout << " KEY = TOPIC(" << communicator()->identityToString(key.topic) - << ") ID(" << communicator()->identityToString(key.id) << ")" <<endl; + cout << " KEY = TOPIC(" << identityToString(key.topic) + << ") ID(" << identityToString(key.id) << ")" <<endl; } data.subscribers.insert(std::make_pair(key, record)); } diff --git a/cpp/src/IceStorm/InstrumentationI.cpp b/cpp/src/IceStorm/InstrumentationI.cpp index 017a5196fd3..ad3495429c9 100644 --- a/cpp/src/IceStorm/InstrumentationI.cpp +++ b/cpp/src/IceStorm/InstrumentationI.cpp @@ -174,7 +174,7 @@ public: } catch(const ::Ice::FixedProxyException&) { - _id = _proxy->ice_getCommunicator()->identityToString(_proxy->ice_getIdentity()); + _id = identityToString(_proxy->ice_getIdentity()); } } return _id; @@ -206,7 +206,7 @@ public: string getIdentity() const { - return _proxy->ice_getCommunicator()->identityToString(_proxy->ice_getIdentity()); + return identityToString(_proxy->ice_getIdentity()); } private: diff --git a/cpp/src/IceStorm/Parser.cpp b/cpp/src/IceStorm/Parser.cpp index fc00848fe65..6f802b11569 100644 --- a/cpp/src/IceStorm/Parser.cpp +++ b/cpp/src/IceStorm/Parser.cpp @@ -364,7 +364,7 @@ Parser::subscribers(const list<string>& args) IdentitySeq subscribers = topic->getSubscribers(); for(IdentitySeq::const_iterator j = subscribers.begin(); j != subscribers.end(); ++j) { - cout << "\t" << _communicator->identityToString(*j) << endl; + cout << "\t" << identityToString(*j) << endl; } } } @@ -379,7 +379,7 @@ Parser::current(const list<string>& args) { if(args.empty()) { - cout << _communicator->identityToString(_defaultManager->ice_getIdentity()) << endl; + cout << identityToString(_defaultManager->ice_getIdentity()) << endl; return; } else if(args.size() > 1) @@ -618,7 +618,7 @@ Parser::parse(const std::string& commands, bool debug) TopicManagerPrx Parser::findManagerById(const string& full, string& arg) const { - Ice::Identity id = _communicator->stringToIdentity(full); + Ice::Identity id = stringToIdentity(full); arg = id.name; if(id.category.empty()) { diff --git a/cpp/src/IceStorm/Service.cpp b/cpp/src/IceStorm/Service.cpp index de1393e554e..9d925c9bff1 100644 --- a/cpp/src/IceStorm/Service.cpp +++ b/cpp/src/IceStorm/Service.cpp @@ -403,7 +403,7 @@ ServiceI::start( } topicAdapter->add(new FinderI(TopicManagerPrx::uncheckedCast(topicAdapter->createProxy(topicManagerId))), - communicator->stringToIdentity("IceStorm/Finder")); + stringToIdentity("IceStorm/Finder")); topicAdapter->activate(); publishAdapter->activate(); diff --git a/cpp/src/IceStorm/Subscriber.cpp b/cpp/src/IceStorm/Subscriber.cpp index 4b53be621e1..a4b89d09e1b 100644 --- a/cpp/src/IceStorm/Subscriber.cpp +++ b/cpp/src/IceStorm/Subscriber.cpp @@ -546,7 +546,7 @@ Subscriber::create( Ice::Identity perId; perId.category = instance->instanceName(); perId.name = "topic." + rec.topicName + ".publish." + - instance->communicator()->identityToString(rec.obj->ice_getIdentity()); + identityToString(rec.obj->ice_getIdentity()); Ice::ObjectPrx proxy = instance->publishAdapter()->add(per, perId); TraceLevelsPtr traceLevels = instance->traceLevels(); SubscriberPtr subscriber; @@ -798,7 +798,7 @@ Subscriber::error(bool dec, const Ice::Exception& e) if(_currentRetry == 0) { Ice::Warning warn(traceLevels->logger); - warn << traceLevels->subscriberCat << ":" << _instance->communicator()->identityToString(_rec.id); + warn << traceLevels->subscriberCat << ":" << identityToString(_rec.id); if(traceLevels->subscriber > 1) { warn << " endpoints: " << IceStormInternal::describeEndpoints(_rec.obj); @@ -811,7 +811,7 @@ Subscriber::error(bool dec, const Ice::Exception& e) if(traceLevels->subscriber > 0) { Ice::Trace out(traceLevels->logger, traceLevels->subscriberCat); - out << _instance->communicator()->identityToString(_rec.id); + out << identityToString(_rec.id); if(traceLevels->subscriber > 1) { out << " endpoints: " << IceStormInternal::describeEndpoints(_rec.obj); @@ -839,7 +839,7 @@ Subscriber::error(bool dec, const Ice::Exception& e) if(traceLevels->subscriber > 0) { Ice::Trace out(traceLevels->logger, traceLevels->subscriberCat); - out << _instance->communicator()->identityToString(_rec.id); + out << identityToString(_rec.id); if(traceLevels->subscriber > 1) { out << " endpoints: " << IceStormInternal::describeEndpoints(_rec.obj); diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp index acea59e5c15..3a9c3d65a79 100644 --- a/cpp/src/IceStorm/TopicI.cpp +++ b/cpp/src/IceStorm/TopicI.cpp @@ -399,7 +399,7 @@ TopicImpl::TopicImpl( if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << " recreate " << _instance->communicator()->identityToString(id); + out << _name << " recreate " << identityToString(id); if(traceLevels->topic > 1) { out << " endpoints: " << IceStormInternal::describeEndpoints(p->obj); @@ -418,7 +418,7 @@ TopicImpl::TopicImpl( catch(const Ice::Exception& ex) { Ice::Warning out(traceLevels->logger); - out << _name << " recreate " << _instance->communicator()->identityToString(id); + out << _name << " recreate " << identityToString(id); if(traceLevels->topic > 1) { out << " endpoints: " << IceStormInternal::describeEndpoints(p->obj); @@ -491,7 +491,7 @@ trace(Ice::Trace& out, const PersistentInstancePtr& instance, const vector<Subsc { out << ","; } - out << instance->communicator()->identityToString((*p)->id()); + out << identityToString((*p)->id()); } out << "]"; } @@ -516,7 +516,7 @@ TopicImpl::subscribeAndGetPublisher(const QoS& qos, const Ice::ObjectPrx& obj) if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << ": subscribeAndGetPublisher: " << _instance->communicator()->identityToString(id); + out << _name << ": subscribeAndGetPublisher: " << identityToString(id); if(traceLevels->topic > 1) { @@ -600,7 +600,7 @@ TopicImpl::unsubscribe(const Ice::ObjectPrx& subscriber) if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << ": unsubscribe: " << _instance->communicator()->identityToString(id); + out << _name << ": unsubscribe: " << identityToString(id); if(traceLevels->topic > 1) { @@ -637,7 +637,7 @@ TopicImpl::link(const TopicPrx& topic, Ice::Int cost) if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << ": link " << _instance->communicator()->identityToString(topic->ice_getIdentity()) + out << _name << ": link " << identityToString(topic->ice_getIdentity()) << " cost " << cost; } @@ -722,7 +722,7 @@ TopicImpl::unlink(const TopicPrx& topic) if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << " unlink " << _instance->communicator()->identityToString(id); + out << _name << " unlink " << identityToString(id); } Ice::IdentitySeq ids; @@ -746,7 +746,7 @@ TopicImpl::reap(const Ice::IdentitySeq& ids) { out << ","; } - out << _instance->communicator()->identityToString(*p); + out << identityToString(*p); } } @@ -1045,7 +1045,7 @@ TopicImpl::observerAddSubscriber(const LogUpdate& llu, const SubscriberRecord& r if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << ": add replica observer: " << _instance->communicator()->identityToString(record.id); + out << _name << ": add replica observer: " << identityToString(record.id); if(traceLevels->topic > 1) { @@ -1072,7 +1072,7 @@ TopicImpl::observerAddSubscriber(const LogUpdate& llu, const SubscriberRecord& r if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _instance->communicator()->identityToString(record.id) << ": already subscribed"; + out << identityToString(record.id) << ": already subscribed"; } return; } @@ -1116,7 +1116,7 @@ TopicImpl::observerRemoveSubscriber(const LogUpdate& llu, const Ice::IdentitySeq { out << ","; } - out << _instance->communicator()->identityToString(*id); + out << identityToString(*id); } out << " llu: " << llu.generation << "/" << llu.iteration; } diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index 5c4ad1c6cbc..15696d70abc 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -421,14 +421,14 @@ TopicManagerImpl::observerInit(const LogUpdate& llu, const TopicContentSeq& cont out << "init"; for(TopicContentSeq::const_iterator p = content.begin(); p != content.end(); ++p) { - out << " topic: " << _instance->communicator()->identityToString(p->id) << " subscribers: "; + out << " topic: " << identityToString(p->id) << " subscribers: "; for(SubscriberRecordSeq::const_iterator q = p->records.begin(); q != p->records.end(); ++q) { if(q != p->records.begin()) { out << ","; } - out << _instance->communicator()->identityToString(q->id); + out << identityToString(q->id); if(traceLevels->topicMgr > 1) { out << " endpoints: " << IceStormInternal::describeEndpoints(q->obj); @@ -803,7 +803,7 @@ TopicManagerImpl::installTopic(const string& name, const Ice::Identity& id, bool if(create) { out << "creating new topic \"" << name << "\". id: " - << _instance->communicator()->identityToString(id) + << identityToString(id) << " subscribers: "; for(SubscriberRecordSeq::const_iterator q = subscribers.begin(); q != subscribers.end(); ++q) { @@ -813,7 +813,7 @@ TopicManagerImpl::installTopic(const string& name, const Ice::Identity& id, bool } if(traceLevels->topicMgr > 1) { - out << _instance->communicator()->identityToString(q->id) + out << identityToString(q->id) << " endpoints: " << IceStormInternal::describeEndpoints(q->obj); } } @@ -821,7 +821,7 @@ TopicManagerImpl::installTopic(const string& name, const Ice::Identity& id, bool else { out << "loading topic \"" << name << "\" from database. id: " - << _instance->communicator()->identityToString(id) + << identityToString(id) << " subscribers: "; for(SubscriberRecordSeq::const_iterator q = subscribers.begin(); q != subscribers.end(); ++q) { @@ -831,7 +831,7 @@ TopicManagerImpl::installTopic(const string& name, const Ice::Identity& id, bool } if(traceLevels->topicMgr > 1) { - out << _instance->communicator()->identityToString(q->id) + out << identityToString(q->id) << " endpoints: " << IceStormInternal::describeEndpoints(q->obj); } } diff --git a/cpp/src/IceStorm/TransientTopicI.cpp b/cpp/src/IceStorm/TransientTopicI.cpp index 062db7014fb..f11688d1a10 100644 --- a/cpp/src/IceStorm/TransientTopicI.cpp +++ b/cpp/src/IceStorm/TransientTopicI.cpp @@ -178,7 +178,7 @@ TransientTopicImpl::subscribe(const QoS& origQoS, const Ice::ObjectPrx& obj, con if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << ": subscribe: " << _instance->communicator()->identityToString(id); + out << _name << ": subscribe: " << identityToString(id); if(traceLevels->topic > 1) { @@ -280,7 +280,7 @@ TransientTopicImpl::subscribeAndGetPublisher(const QoS& qos, const Ice::ObjectPr if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << ": subscribeAndGetPublisher: " << _instance->communicator()->identityToString(id); + out << _name << ": subscribeAndGetPublisher: " << identityToString(id); if(traceLevels->topic > 1) { @@ -338,7 +338,7 @@ TransientTopicImpl::unsubscribe(const Ice::ObjectPrx& subscriber, const Ice::Cur if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << ": unsubscribe: " << _instance->communicator()->identityToString(id); + out << _name << ": unsubscribe: " << identityToString(id); if(traceLevels->topic > 1) { out << " endpoints: " << IceStormInternal::describeEndpoints(subscriber); @@ -374,7 +374,7 @@ TransientTopicImpl::link(const TopicPrx& topic, Ice::Int cost, const Ice::Curren if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << ": link " << _instance->communicator()->identityToString(topic->ice_getIdentity()) + out << _name << ": link " << identityToString(topic->ice_getIdentity()) << " cost " << cost; } @@ -434,7 +434,7 @@ TransientTopicImpl::unlink(const TopicPrx& topic, const Ice::Current&) if(traceLevels->topic > 0) { Ice::Trace out(traceLevels->logger, traceLevels->topicCat); - out << _name << " unlink " << _instance->communicator()->identityToString(id); + out << _name << " unlink " << identityToString(id); } // Remove the subscriber from the subscribers list. Note diff --git a/cpp/src/IceStorm/TransientTopicManagerI.cpp b/cpp/src/IceStorm/TransientTopicManagerI.cpp index 8c45a471f19..5bd8449fd66 100644 --- a/cpp/src/IceStorm/TransientTopicManagerI.cpp +++ b/cpp/src/IceStorm/TransientTopicManagerI.cpp @@ -55,7 +55,7 @@ TransientTopicManagerImpl::create(const string& name, const Ice::Current&) { Ice::Trace out(traceLevels->logger, traceLevels->topicMgrCat); out << "creating new topic \"" << name << "\". id: " - << _instance->communicator()->identityToString(id); + << identityToString(id); } // diff --git a/cpp/src/icegriddb/IceGridDB.cpp b/cpp/src/icegriddb/IceGridDB.cpp index 8426d773d63..42b61f1ab92 100644 --- a/cpp/src/icegriddb/IceGridDB.cpp +++ b/cpp/src/icegriddb/IceGridDB.cpp @@ -372,7 +372,7 @@ Client::run(int argc, char* argv[]) { if(debug) { - cout << " NAME = " << communicator()->identityToString(p->proxy->ice_getIdentity()) << endl; + cout << " NAME = " << identityToString(p->proxy->ice_getIdentity()) << endl; } objs.put(txn, p->proxy->ice_getIdentity(), *p); } @@ -390,7 +390,7 @@ Client::run(int argc, char* argv[]) { if(debug) { - cout << " NAME = " << communicator()->identityToString(p->proxy->ice_getIdentity()) << endl; + cout << " NAME = " << identityToString(p->proxy->ice_getIdentity()) << endl; } internalObjs.put(txn, p->proxy->ice_getIdentity(), *p); } @@ -483,7 +483,7 @@ Client::run(int argc, char* argv[]) { if(debug) { - cout << " IDENTITY = " << communicator()->identityToString(id) << endl; + cout << " IDENTITY = " << identityToString(id) << endl; } data.objects.push_back(object); } @@ -503,7 +503,7 @@ Client::run(int argc, char* argv[]) { if(debug) { - cout << " IDENTITY = " << communicator()->identityToString(id) << endl; + cout << " IDENTITY = " << identityToString(id) << endl; } data.internalObjects.push_back(object); } diff --git a/cpp/test/Glacier2/dynamicFiltering/Server.cpp b/cpp/test/Glacier2/dynamicFiltering/Server.cpp index a4c45965b22..82fc03b1598 100644 --- a/cpp/test/Glacier2/dynamicFiltering/Server.cpp +++ b/cpp/test/Glacier2/dynamicFiltering/Server.cpp @@ -57,7 +57,7 @@ public: _adapter(adapter) { _registryPrx = LocatorRegistryPrx::uncheckedCast(adapter->add(new ServerLocatorRegistry, - _adapter->getCommunicator()->stringToIdentity("registry"))); + Ice::stringToIdentity("registry"))); } virtual void @@ -69,7 +69,7 @@ public: virtual void findAdapterById_async(const AMD_Locator_findAdapterByIdPtr& cb, const string&, const Current&) const { - cb->ice_response(_adapter->createDirectProxy(_adapter->getCommunicator()->stringToIdentity("dummy"))); + cb->ice_response(_adapter->createDirectProxy(stringToIdentity("dummy"))); } virtual LocatorRegistryPrx @@ -146,12 +146,12 @@ SessionControlServer::run(int, char*[]) communicator()->getProperties()->setProperty("TestControllerAdapter.Endpoints", "tcp -p 12013"); ObjectAdapterPtr controllerAdapter = communicator()->createObjectAdapter("TestControllerAdapter"); TestControllerIPtr controller = new TestControllerI; - controllerAdapter->add(controller, communicator()->stringToIdentity("testController")); + controllerAdapter->add(controller, Ice::stringToIdentity("testController")); controllerAdapter->activate(); communicator()->getProperties()->setProperty("SessionControlAdapter.Endpoints", "tcp -p 12010"); ObjectAdapterPtr adapter = communicator()->createObjectAdapter("SessionControlAdapter"); - adapter->add(new SessionManagerI(controller), communicator()->stringToIdentity("SessionManager")); + adapter->add(new SessionManagerI(controller), Ice::stringToIdentity("SessionManager")); adapter->activate(); BackendPtr backend = new BackendI; @@ -161,7 +161,7 @@ SessionControlServer::run(int, char*[]) backendAdapter->activate(); Ice::LocatorPtr locator = new ServerLocatorI(backend, backendAdapter); - backendAdapter->add(locator, communicator()->stringToIdentity("locator")); + backendAdapter->add(locator, Ice::stringToIdentity("locator")); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Glacier2/override/Server.cpp b/cpp/test/Glacier2/override/Server.cpp index 9fe3f80a47b..e7317bf1108 100644 --- a/cpp/test/Glacier2/override/Server.cpp +++ b/cpp/test/Glacier2/override/Server.cpp @@ -44,7 +44,7 @@ CallbackServer::run(int, char**) { communicator()->getProperties()->setProperty("CallbackAdapter.Endpoints", "tcp -p 12010"); ObjectAdapterPtr adapter = communicator()->createObjectAdapter("CallbackAdapter"); - adapter->add(new CallbackI(), communicator()->stringToIdentity("c/callback")); + adapter->add(new CallbackI(), Ice::stringToIdentity("c/callback")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Glacier2/router/Client.cpp b/cpp/test/Glacier2/router/Client.cpp index 1987e693dbc..937a114e053 100644 --- a/cpp/test/Glacier2/router/Client.cpp +++ b/cpp/test/Glacier2/router/Client.cpp @@ -712,7 +712,7 @@ CallbackClient::run(int argc, char* argv[]) Context context; context["_fwd"] = "t"; CallbackPrx otherCategoryTwoway = CallbackPrx::uncheckedCast( - twoway->ice_identity(communicator()->stringToIdentity("c2/callback"))); + twoway->ice_identity(stringToIdentity("c2/callback"))); otherCategoryTwoway->initiateCallback(twowayR, context); callbackReceiverImpl->callbackOK(); cout << "ok" << endl; @@ -725,7 +725,7 @@ CallbackClient::run(int argc, char* argv[]) try { CallbackPrx otherCategoryTwoway = CallbackPrx::uncheckedCast( - twoway->ice_identity(communicator()->stringToIdentity("c3/callback"))); + twoway->ice_identity(stringToIdentity("c3/callback"))); otherCategoryTwoway->initiateCallback(twowayR, context); test(false); } @@ -740,7 +740,7 @@ CallbackClient::run(int argc, char* argv[]) Context context; context["_fwd"] = "t"; CallbackPrx otherCategoryTwoway = CallbackPrx::uncheckedCast( - twoway->ice_identity(communicator()->stringToIdentity("_userid/callback"))); + twoway->ice_identity(stringToIdentity("_userid/callback"))); otherCategoryTwoway->initiateCallback(twowayR, context); callbackReceiverImpl->callbackOK(); cout << "ok" << endl; diff --git a/cpp/test/Glacier2/router/Server.cpp b/cpp/test/Glacier2/router/Server.cpp index 494c97c14c3..f07ce8fc713 100644 --- a/cpp/test/Glacier2/router/Server.cpp +++ b/cpp/test/Glacier2/router/Server.cpp @@ -43,10 +43,10 @@ CallbackServer::run(int, char**) { communicator()->getProperties()->setProperty("CallbackAdapter.Endpoints", "tcp -p 12010"); ObjectAdapterPtr adapter = communicator()->createObjectAdapter("CallbackAdapter"); - adapter->add(new CallbackI(), communicator()->stringToIdentity("c1/callback")); // The test allows "c1" as category. - adapter->add(new CallbackI(), communicator()->stringToIdentity("c2/callback")); // The test allows "c2" as category. - adapter->add(new CallbackI(), communicator()->stringToIdentity("c3/callback")); // The test rejects "c3" as category. - adapter->add(new CallbackI(), communicator()->stringToIdentity("_userid/callback")); // The test allows the prefixed userid. + adapter->add(new CallbackI(), Ice::stringToIdentity("c1/callback")); // The test allows "c1" as category. + adapter->add(new CallbackI(), Ice::stringToIdentity("c2/callback")); // The test allows "c2" as category. + adapter->add(new CallbackI(), Ice::stringToIdentity("c3/callback")); // The test rejects "c3" as category. + adapter->add(new CallbackI(), Ice::stringToIdentity("_userid/callback")); // The test allows the prefixed userid. adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Glacier2/sessionControl/Server.cpp b/cpp/test/Glacier2/sessionControl/Server.cpp index cd24c48eb51..cffa77ec01a 100644 --- a/cpp/test/Glacier2/sessionControl/Server.cpp +++ b/cpp/test/Glacier2/sessionControl/Server.cpp @@ -38,7 +38,7 @@ SessionControlServer::run(int, char**) { communicator()->getProperties()->setProperty("SessionControlAdapter.Endpoints", "tcp -p 12010"); ObjectAdapterPtr adapter = communicator()->createObjectAdapter("SessionControlAdapter"); - adapter->add(new SessionManagerI, communicator()->stringToIdentity("SessionManager")); + adapter->add(new SessionManagerI, Ice::stringToIdentity("SessionManager")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Glacier2/sessionHelper/Server.cpp b/cpp/test/Glacier2/sessionHelper/Server.cpp index c5e95356813..f359b5f557d 100644 --- a/cpp/test/Glacier2/sessionHelper/Server.cpp +++ b/cpp/test/Glacier2/sessionHelper/Server.cpp @@ -59,7 +59,7 @@ SessionHelperServer::run(int, char**) communicator()->getProperties()->setProperty("CallbackAdapter.Endpoints", "default -p 12010"); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("CallbackAdapter"); - adapter->add(new CallbackI(), communicator()->stringToIdentity("callback")); + adapter->add(new CallbackI(), Ice::stringToIdentity("callback")); adapter->activate(); communicator()->waitForShutdown(); diff --git a/cpp/test/Glacier2/ssl/Server.cpp b/cpp/test/Glacier2/ssl/Server.cpp index 04f9ed6df9c..fcaf8d411b9 100644 --- a/cpp/test/Glacier2/ssl/Server.cpp +++ b/cpp/test/Glacier2/ssl/Server.cpp @@ -171,10 +171,10 @@ SessionServer::run(int, char**) { Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapterWithEndpoints( "SessionServer", "tcp -h 127.0.0.1 -p 12350"); - adapter->add(new PermissionsVerifierI, communicator()->stringToIdentity("verifier")); - adapter->add(new SSLPermissionsVerifierI, communicator()->stringToIdentity("sslverifier")); - adapter->add(new SessionManagerI, communicator()->stringToIdentity("sessionmanager")); - adapter->add(new SSLSessionManagerI, communicator()->stringToIdentity("sslsessionmanager")); + adapter->add(new PermissionsVerifierI, Ice::stringToIdentity("verifier")); + adapter->add(new SSLPermissionsVerifierI, Ice::stringToIdentity("sslverifier")); + adapter->add(new SessionManagerI, Ice::stringToIdentity("sessionmanager")); + adapter->add(new SSLSessionManagerI, Ice::stringToIdentity("sslsessionmanager")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Glacier2/staticFiltering/Server.cpp b/cpp/test/Glacier2/staticFiltering/Server.cpp index 66645f61ff8..034676d7b89 100644 --- a/cpp/test/Glacier2/staticFiltering/Server.cpp +++ b/cpp/test/Glacier2/staticFiltering/Server.cpp @@ -54,7 +54,7 @@ public: _adapter(adapter), _registryPrx( LocatorRegistryPrx::uncheckedCast( - adapter->add(new ServerLocatorRegistry, _adapter->getCommunicator()->stringToIdentity("registry")))) + adapter->add(new ServerLocatorRegistry, Ice::stringToIdentity("registry")))) { } @@ -67,7 +67,7 @@ public: virtual void findAdapterById_async(const AMD_Locator_findAdapterByIdPtr& cb, const string&, const Current&) const { - cb->ice_response(_adapter->createDirectProxy(_adapter->getCommunicator()->stringToIdentity("dummy"))); + cb->ice_response(_adapter->createDirectProxy(stringToIdentity("dummy"))); } virtual LocatorRegistryPrx @@ -137,7 +137,7 @@ BackendServer::run(int, char**) ObjectAdapterPtr adapter = communicator()->createObjectAdapter("BackendAdapter"); BackendPtr backend = new BackendI; Ice::LocatorPtr locator = new ServerLocatorI(backend, adapter); - adapter->add(locator, communicator()->stringToIdentity("locator")); + adapter->add(locator, Ice::stringToIdentity("locator")); adapter->addServantLocator(new ServantLocatorI(backend), ""); adapter->activate(); communicator()->waitForShutdown(); diff --git a/cpp/test/Ice/acm/Server.cpp b/cpp/test/Ice/acm/Server.cpp index 4797c8607c2..d2af92e45f8 100644 --- a/cpp/test/Ice/acm/Server.cpp +++ b/cpp/test/Ice/acm/Server.cpp @@ -21,7 +21,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); communicator->getProperties()->setProperty("TestAdapter.ACM.Timeout", "0"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - Ice::Identity id = communicator->stringToIdentity("communicator"); + Ice::Identity id = Ice::stringToIdentity("communicator"); adapter->add(ICE_MAKE_SHARED(RemoteCommunicatorI), id); adapter->activate(); diff --git a/cpp/test/Ice/acm/TestI.cpp b/cpp/test/Ice/acm/TestI.cpp index 42e0f119cd1..98f07a1b93a 100644 --- a/cpp/test/Ice/acm/TestI.cpp +++ b/cpp/test/Ice/acm/TestI.cpp @@ -104,7 +104,7 @@ RemoteCommunicatorI::shutdown(const Ice::Current& current) RemoteObjectAdapterI::RemoteObjectAdapterI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter), _testIntf(ICE_UNCHECKED_CAST(TestIntfPrx, _adapter->add(ICE_MAKE_SHARED(TestI), - adapter->getCommunicator()->stringToIdentity("test")))) + stringToIdentity("test")))) { _adapter->activate(); } diff --git a/cpp/test/Ice/admin/AllTests.cpp b/cpp/test/Ice/admin/AllTests.cpp index da880fc0ced..bbe87980315 100644 --- a/cpp/test/Ice/admin/AllTests.cpp +++ b/cpp/test/Ice/admin/AllTests.cpp @@ -225,7 +225,7 @@ allTests(const Ice::CommunicatorPtr& communicator) Ice::CommunicatorPtr com = Ice::initialize(init); test(!com->getAdmin()); - Ice::Identity id = com->stringToIdentity("test-admin"); + Ice::Identity id = stringToIdentity("test-admin"); try { com->createAdmin(0, id); diff --git a/cpp/test/Ice/admin/Server.cpp b/cpp/test/Ice/admin/Server.cpp index 57157d58363..c18d954e2ef 100644 --- a/cpp/test/Ice/admin/Server.cpp +++ b/cpp/test/Ice/admin/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 10000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - Ice::Identity id = communicator->stringToIdentity("factory"); + Ice::Identity id = Ice::stringToIdentity("factory"); adapter->add(ICE_MAKE_SHARED(RemoteCommunicatorFactoryI), id); adapter->activate(); TEST_READY diff --git a/cpp/test/Ice/ami/Collocated.cpp b/cpp/test/Ice/ami/Collocated.cpp index 73396d57834..0f9abd96355 100644 --- a/cpp/test/Ice/ami/Collocated.cpp +++ b/cpp/test/Ice/ami/Collocated.cpp @@ -27,10 +27,10 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) TestIntfControllerIPtr testController = ICE_MAKE_SHARED(TestIntfControllerI, adapter); - adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); //adapter->activate(); // Collocated test doesn't need to activate the OA - adapter2->add(testController, communicator->stringToIdentity("testController")); + adapter2->add(testController, Ice::stringToIdentity("testController")); //adapter2->activate(); // Collocated test doesn't need to activate the OA void allTests(const Ice::CommunicatorPtr&, bool); diff --git a/cpp/test/Ice/ami/Server.cpp b/cpp/test/Ice/ami/Server.cpp index adf27fd04f2..7c0ebd03b42 100644 --- a/cpp/test/Ice/ami/Server.cpp +++ b/cpp/test/Ice/ami/Server.cpp @@ -27,10 +27,10 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) TestIntfControllerIPtr testController = ICE_MAKE_SHARED(TestIntfControllerI, adapter); - adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); adapter->activate(); - adapter2->add(testController, communicator->stringToIdentity("testController")); + adapter2->add(testController, Ice::stringToIdentity("testController")); adapter2->activate(); TEST_READY diff --git a/cpp/test/Ice/background/Server.cpp b/cpp/test/Ice/background/Server.cpp index 201b7610d5d..3f13ca8fbb3 100644 --- a/cpp/test/Ice/background/Server.cpp +++ b/cpp/test/Ice/background/Server.cpp @@ -31,7 +31,7 @@ public: { _controller->checkCallPause(current); Ice::CommunicatorPtr communicator = current.adapter->getCommunicator(); - response(current.adapter->createDirectProxy(communicator->stringToIdentity("dummy"))); + response(current.adapter->createDirectProxy(Ice::stringToIdentity("dummy"))); } virtual void @@ -51,7 +51,7 @@ public: { _controller->checkCallPause(current); Ice::CommunicatorPtr communicator = current.adapter->getCommunicator(); - response->ice_response(current.adapter->createDirectProxy(communicator->stringToIdentity("dummy"))); + response->ice_response(current.adapter->createDirectProxy(Ice::stringToIdentity("dummy"))); } virtual void @@ -132,12 +132,12 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) ConfigurationPtr configuration = plugin->getConfiguration(); BackgroundControllerIPtr backgroundController = ICE_MAKE_SHARED(BackgroundControllerI, adapter, configuration); - adapter->add(ICE_MAKE_SHARED(BackgroundI, backgroundController), communicator->stringToIdentity("background")); - adapter->add(ICE_MAKE_SHARED(LocatorI, backgroundController), communicator->stringToIdentity("locator")); - adapter->add(ICE_MAKE_SHARED(RouterI, backgroundController), communicator->stringToIdentity("router")); + adapter->add(ICE_MAKE_SHARED(BackgroundI, backgroundController), Ice::stringToIdentity("background")); + adapter->add(ICE_MAKE_SHARED(LocatorI, backgroundController), Ice::stringToIdentity("locator")); + adapter->add(ICE_MAKE_SHARED(RouterI, backgroundController), Ice::stringToIdentity("router")); adapter->activate(); - adapter2->add(backgroundController, communicator->stringToIdentity("backgroundController")); + adapter2->add(backgroundController, Ice::stringToIdentity("backgroundController")); adapter2->activate(); communicator->waitForShutdown(); diff --git a/cpp/test/Ice/binding/AllTests.cpp b/cpp/test/Ice/binding/AllTests.cpp index e2f8a0e24a4..7b840621ab2 100644 --- a/cpp/test/Ice/binding/AllTests.cpp +++ b/cpp/test/Ice/binding/AllTests.cpp @@ -987,7 +987,7 @@ allTests(const Ice::CommunicatorPtr& communicator) // Ensure the published endpoints are actually valid. On // Fedora, binding to "localhost" with IPv6 only works but // resolving localhost don't return the IPv6 adress. - Ice::ObjectPrxPtr prx = oa->createProxy(serverCommunicator->stringToIdentity("dummy")); + Ice::ObjectPrxPtr prx = oa->createProxy(Ice::stringToIdentity("dummy")); try { prx->ice_collocationOptimized(false)->ice_ping(); diff --git a/cpp/test/Ice/binding/Server.cpp b/cpp/test/Ice/binding/Server.cpp index 6e182cf26e4..431e7dfe3f2 100644 --- a/cpp/test/Ice/binding/Server.cpp +++ b/cpp/test/Ice/binding/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - Ice::Identity id = communicator->stringToIdentity("communicator"); + Ice::Identity id = Ice::stringToIdentity("communicator"); adapter->add(ICE_MAKE_SHARED(RemoteCommunicatorI), id); adapter->activate(); diff --git a/cpp/test/Ice/binding/TestI.cpp b/cpp/test/Ice/binding/TestI.cpp index 28c29b774c6..2f2904303c7 100644 --- a/cpp/test/Ice/binding/TestI.cpp +++ b/cpp/test/Ice/binding/TestI.cpp @@ -69,7 +69,7 @@ RemoteObjectAdapterI::RemoteObjectAdapterI(const Ice::ObjectAdapterPtr& adapter) _adapter(adapter), _testIntf(ICE_UNCHECKED_CAST(TestIntfPrx, _adapter->add(ICE_MAKE_SHARED(TestI), - adapter->getCommunicator()->stringToIdentity("test")))) + stringToIdentity("test")))) { _adapter->activate(); } diff --git a/cpp/test/Ice/checksum/Server.cpp b/cpp/test/Ice/checksum/Server.cpp index 534567b0a15..42d986b2dbf 100644 --- a/cpp/test/Ice/checksum/Server.cpp +++ b/cpp/test/Ice/checksum/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 10000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(ChecksumI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(ChecksumI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/custom/Collocated.cpp b/cpp/test/Ice/custom/Collocated.cpp index d5e5cd467d0..5f17fb0c7e4 100644 --- a/cpp/test/Ice/custom/Collocated.cpp +++ b/cpp/test/Ice/custom/Collocated.cpp @@ -22,9 +22,9 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(TestIntfI, communicator), communicator->stringToIdentity("test")); - adapter->add(ICE_MAKE_SHARED(Test1::WstringClassI), communicator->stringToIdentity("wstring1")); - adapter->add(ICE_MAKE_SHARED(Test2::WstringClassI), communicator->stringToIdentity("wstring2")); + adapter->add(ICE_MAKE_SHARED(TestIntfI, communicator), Ice::stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(Test1::WstringClassI), Ice::stringToIdentity("wstring1")); + adapter->add(ICE_MAKE_SHARED(Test2::WstringClassI), Ice::stringToIdentity("wstring2")); Test::TestIntfPrxPtr allTests(const Ice::CommunicatorPtr&); allTests(communicator); diff --git a/cpp/test/Ice/custom/Server.cpp b/cpp/test/Ice/custom/Server.cpp index 51c6b4c4cd5..be7e8adf81b 100644 --- a/cpp/test/Ice/custom/Server.cpp +++ b/cpp/test/Ice/custom/Server.cpp @@ -22,9 +22,9 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(TestIntfI, communicator), communicator->stringToIdentity("test")); - adapter->add(ICE_MAKE_SHARED(Test1::WstringClassI), communicator->stringToIdentity("wstring1")); - adapter->add(ICE_MAKE_SHARED(Test2::WstringClassI), communicator->stringToIdentity("wstring2")); + adapter->add(ICE_MAKE_SHARED(TestIntfI, communicator), Ice::stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(Test1::WstringClassI), Ice::stringToIdentity("wstring1")); + adapter->add(ICE_MAKE_SHARED(Test2::WstringClassI), Ice::stringToIdentity("wstring2")); adapter->activate(); TEST_READY diff --git a/cpp/test/Ice/custom/ServerAMD.cpp b/cpp/test/Ice/custom/ServerAMD.cpp index e2b635f2665..954a2035ab2 100644 --- a/cpp/test/Ice/custom/ServerAMD.cpp +++ b/cpp/test/Ice/custom/ServerAMD.cpp @@ -22,9 +22,9 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(TestIntfI,communicator), communicator->stringToIdentity("test")); - adapter->add(ICE_MAKE_SHARED(Test1::WstringClassI), communicator->stringToIdentity("wstring1")); - adapter->add(ICE_MAKE_SHARED(Test2::WstringClassI), communicator->stringToIdentity("wstring2")); + adapter->add(ICE_MAKE_SHARED(TestIntfI,communicator), Ice::stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(Test1::WstringClassI), Ice::stringToIdentity("wstring1")); + adapter->add(ICE_MAKE_SHARED(Test2::WstringClassI), Ice::stringToIdentity("wstring2")); adapter->activate(); TEST_READY diff --git a/cpp/test/Ice/dispatcher/Collocated.cpp b/cpp/test/Ice/dispatcher/Collocated.cpp index b08e2440643..05592f5a8ed 100644 --- a/cpp/test/Ice/dispatcher/Collocated.cpp +++ b/cpp/test/Ice/dispatcher/Collocated.cpp @@ -28,10 +28,10 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) TestIntfControllerIPtr testController = ICE_MAKE_SHARED(TestIntfControllerI, adapter); - adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); //adapter->activate(); // Don't activate OA to ensure collocation is used. - adapter2->add(testController, communicator->stringToIdentity("testController")); + adapter2->add(testController, Ice::stringToIdentity("testController")); //adapter2->activate(); // Don't activate OA to ensure collocation is used. void allTests(const Ice::CommunicatorPtr&); diff --git a/cpp/test/Ice/dispatcher/Server.cpp b/cpp/test/Ice/dispatcher/Server.cpp index bdc490dd4eb..08dc9b75e17 100644 --- a/cpp/test/Ice/dispatcher/Server.cpp +++ b/cpp/test/Ice/dispatcher/Server.cpp @@ -28,10 +28,10 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) TestIntfControllerIPtr testController = ICE_MAKE_SHARED(TestIntfControllerI, adapter); - adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); adapter->activate(); - adapter2->add(testController, communicator->stringToIdentity("testController")); + adapter2->add(testController, Ice::stringToIdentity("testController")); adapter2->activate(); TEST_READY diff --git a/cpp/test/Ice/echo/Server.cpp b/cpp/test/Ice/echo/Server.cpp index e1d56838839..9d80f8833a9 100644 --- a/cpp/test/Ice/echo/Server.cpp +++ b/cpp/test/Ice/echo/Server.cpp @@ -52,7 +52,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); BlobjectIPtr blob = ICE_MAKE_SHARED(BlobjectI); adapter->addDefaultServant(blob, ""); - adapter->add(ICE_MAKE_SHARED(EchoI, blob), communicator->stringToIdentity("__echo")); + adapter->add(ICE_MAKE_SHARED(EchoI, blob), Ice::stringToIdentity("__echo")); adapter->activate(); TEST_READY diff --git a/cpp/test/Ice/enums/Server.cpp b/cpp/test/Ice/enums/Server.cpp index e01c6c9c1eb..45dec2632e4 100644 --- a/cpp/test/Ice/enums/Server.cpp +++ b/cpp/test/Ice/enums/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 18cd9d7539b..3f047784a12 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -306,7 +306,7 @@ public: } catch(const Ice::ObjectNotExistException& ex) { - Ice::Identity id = _communicator->stringToIdentity("does not exist"); + Ice::Identity id = Ice::stringToIdentity("does not exist"); test(ex.id == id); } catch(...) @@ -563,10 +563,10 @@ allTests(const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter1.Endpoints", localOAEndpoint); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter1"); Ice::ObjectPtr obj = ICE_MAKE_SHARED(EmptyI); - adapter->add(obj, communicator->stringToIdentity("x")); + adapter->add(obj, Ice::stringToIdentity("x")); try { - adapter->add(obj, communicator->stringToIdentity("x")); + adapter->add(obj, Ice::stringToIdentity("x")); test(false); } catch(const Ice::AlreadyRegisteredException& ex) @@ -580,7 +580,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - adapter->add(obj, communicator->stringToIdentity("")); + adapter->add(obj, Ice::stringToIdentity("")); } catch(const Ice::IllegalIdentityException& ex) { @@ -594,7 +594,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - adapter->add(0, communicator->stringToIdentity("x")); + adapter->add(0, Ice::stringToIdentity("x")); } catch(const Ice::IllegalServantException& ex) { @@ -605,10 +605,10 @@ allTests(const Ice::CommunicatorPtr& communicator) } } - adapter->remove(communicator->stringToIdentity("x")); + adapter->remove(Ice::stringToIdentity("x")); try { - adapter->remove(communicator->stringToIdentity("x")); + adapter->remove(Ice::stringToIdentity("x")); test(false); } catch(const Ice::NotRegisteredException& ex) @@ -1010,7 +1010,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "catching object not exist exception... " << flush; - Ice::Identity id = communicator->stringToIdentity("does not exist"); + Ice::Identity id = Ice::stringToIdentity("does not exist"); try { ThrowerPrxPtr thrower2 = ICE_UNCHECKED_CAST(ThrowerPrx, thrower->ice_identity(id)); @@ -1568,7 +1568,7 @@ allTests(const Ice::CommunicatorPtr& communicator) { #ifdef ICE_CPP11_MAPPING - id = communicator->stringToIdentity("does not exist"); + id = Ice::stringToIdentity("does not exist"); shared_ptr<ThrowerPrx> thrower2 = Ice::uncheckedCast<ThrowerPrx>(thrower->ice_identity(id)); auto f = thrower2->throwAasAAsync(1); try @@ -1584,7 +1584,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(false); } #else - id = communicator->stringToIdentity("does not exist"); + id = Ice::stringToIdentity("does not exist"); ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower->ice_identity(id)); CallbackPtr cb = new Callback(communicator); Callback_Thrower_throwAasAPtr callback = diff --git a/cpp/test/Ice/exceptions/Collocated.cpp b/cpp/test/Ice/exceptions/Collocated.cpp index e5aa2de376a..063bbd25e1a 100644 --- a/cpp/test/Ice/exceptions/Collocated.cpp +++ b/cpp/test/Ice/exceptions/Collocated.cpp @@ -22,7 +22,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(ThrowerI); - adapter->add(object, communicator->stringToIdentity("thrower")); + adapter->add(object, Ice::stringToIdentity("thrower")); ThrowerPrxPtr allTests(const Ice::CommunicatorPtr&); allTests(communicator); diff --git a/cpp/test/Ice/exceptions/Server.cpp b/cpp/test/Ice/exceptions/Server.cpp index e0cd7903ed5..2a95948c06a 100644 --- a/cpp/test/Ice/exceptions/Server.cpp +++ b/cpp/test/Ice/exceptions/Server.cpp @@ -27,9 +27,9 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter2 = communicator->createObjectAdapter("TestAdapter2"); Ice::ObjectAdapterPtr adapter3 = communicator->createObjectAdapter("TestAdapter3"); Ice::ObjectPtr object = ICE_MAKE_SHARED(ThrowerI); - adapter->add(object, communicator->stringToIdentity("thrower")); - adapter2->add(object, communicator->stringToIdentity("thrower")); - adapter3->add(object, communicator->stringToIdentity("thrower")); + adapter->add(object, Ice::stringToIdentity("thrower")); + adapter2->add(object, Ice::stringToIdentity("thrower")); + adapter3->add(object, Ice::stringToIdentity("thrower")); adapter->activate(); adapter2->activate(); adapter3->activate(); diff --git a/cpp/test/Ice/exceptions/ServerAMD.cpp b/cpp/test/Ice/exceptions/ServerAMD.cpp index 99dee0dec94..528b0e7ee03 100644 --- a/cpp/test/Ice/exceptions/ServerAMD.cpp +++ b/cpp/test/Ice/exceptions/ServerAMD.cpp @@ -27,9 +27,9 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter2 = communicator->createObjectAdapter("TestAdapter2"); Ice::ObjectAdapterPtr adapter3 = communicator->createObjectAdapter("TestAdapter3"); Ice::ObjectPtr object = ICE_MAKE_SHARED(ThrowerI); - adapter->add(object, communicator->stringToIdentity("thrower")); - adapter2->add(object, communicator->stringToIdentity("thrower")); - adapter3->add(object, communicator->stringToIdentity("thrower")); + adapter->add(object, Ice::stringToIdentity("thrower")); + adapter2->add(object, Ice::stringToIdentity("thrower")); + adapter3->add(object, Ice::stringToIdentity("thrower")); adapter->activate(); adapter2->activate(); adapter3->activate(); diff --git a/cpp/test/Ice/facets/AllTests.cpp b/cpp/test/Ice/facets/AllTests.cpp index 923bb4e437b..5b542de8a85 100644 --- a/cpp/test/Ice/facets/AllTests.cpp +++ b/cpp/test/Ice/facets/AllTests.cpp @@ -60,20 +60,20 @@ allTests(const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("FacetExceptionTestAdapter.Endpoints", localOAEndpoint); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("FacetExceptionTestAdapter"); Ice::ObjectPtr obj = ICE_MAKE_SHARED(EmptyI); - adapter->add(obj, communicator->stringToIdentity("d")); - adapter->addFacet(obj, communicator->stringToIdentity("d"), "facetABCD"); + adapter->add(obj, Ice::stringToIdentity("d")); + adapter->addFacet(obj, Ice::stringToIdentity("d"), "facetABCD"); try { - adapter->addFacet(obj, communicator->stringToIdentity("d"), "facetABCD"); + adapter->addFacet(obj, Ice::stringToIdentity("d"), "facetABCD"); test(false); } catch(const Ice::AlreadyRegisteredException&) { } - adapter->removeFacet(communicator->stringToIdentity("d"), "facetABCD"); + adapter->removeFacet(Ice::stringToIdentity("d"), "facetABCD"); try { - adapter->removeFacet(communicator->stringToIdentity("d"), "facetABCD"); + adapter->removeFacet(Ice::stringToIdentity("d"), "facetABCD"); test(false); } catch(const Ice::NotRegisteredException&) @@ -84,25 +84,25 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing removeAllFacets... " << flush; Ice::ObjectPtr obj1 = ICE_MAKE_SHARED(EmptyI); Ice::ObjectPtr obj2 = ICE_MAKE_SHARED(EmptyI); - adapter->addFacet(obj1, communicator->stringToIdentity("id1"), "f1"); - adapter->addFacet(obj2, communicator->stringToIdentity("id1"), "f2"); + adapter->addFacet(obj1, Ice::stringToIdentity("id1"), "f1"); + adapter->addFacet(obj2, Ice::stringToIdentity("id1"), "f2"); Ice::ObjectPtr obj3 = ICE_MAKE_SHARED(EmptyI); - adapter->addFacet(obj1, communicator->stringToIdentity("id2"), "f1"); - adapter->addFacet(obj2, communicator->stringToIdentity("id2"), "f2"); - adapter->addFacet(obj3, communicator->stringToIdentity("id2"), ""); - Ice::FacetMap fm = adapter->removeAllFacets(communicator->stringToIdentity("id1")); + adapter->addFacet(obj1, Ice::stringToIdentity("id2"), "f1"); + adapter->addFacet(obj2, Ice::stringToIdentity("id2"), "f2"); + adapter->addFacet(obj3, Ice::stringToIdentity("id2"), ""); + Ice::FacetMap fm = adapter->removeAllFacets(Ice::stringToIdentity("id1")); test(fm.size() == 2); test(fm["f1"] == obj1); test(fm["f2"] == obj2); try { - adapter->removeAllFacets(communicator->stringToIdentity("id1")); + adapter->removeAllFacets(Ice::stringToIdentity("id1")); test(false); } catch(const Ice::NotRegisteredException&) { } - fm = adapter->removeAllFacets(communicator->stringToIdentity("id2")); + fm = adapter->removeAllFacets(Ice::stringToIdentity("id2")); test(fm.size() == 3); test(fm["f1"] == obj1); test(fm["f2"] == obj2); diff --git a/cpp/test/Ice/facets/Collocated.cpp b/cpp/test/Ice/facets/Collocated.cpp index 9dbf1bb6b2f..21460a5806c 100644 --- a/cpp/test/Ice/facets/Collocated.cpp +++ b/cpp/test/Ice/facets/Collocated.cpp @@ -22,12 +22,12 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr d = ICE_MAKE_SHARED(DI); - adapter->add(d, communicator->stringToIdentity("d")); - adapter->addFacet(d, communicator->stringToIdentity("d"), "facetABCD"); + adapter->add(d, Ice::stringToIdentity("d")); + adapter->addFacet(d, Ice::stringToIdentity("d"), "facetABCD"); Ice::ObjectPtr f = ICE_MAKE_SHARED(FI); - adapter->addFacet(f, communicator->stringToIdentity("d"), "facetEF"); + adapter->addFacet(f, Ice::stringToIdentity("d"), "facetEF"); Ice::ObjectPtr h = ICE_MAKE_SHARED(HI, communicator); - adapter->addFacet(h, communicator->stringToIdentity("d"), "facetGH"); + adapter->addFacet(h, Ice::stringToIdentity("d"), "facetGH"); GPrxPtr allTests(const Ice::CommunicatorPtr&); allTests(communicator); diff --git a/cpp/test/Ice/facets/Server.cpp b/cpp/test/Ice/facets/Server.cpp index b9bff160667..92d0b838bd5 100644 --- a/cpp/test/Ice/facets/Server.cpp +++ b/cpp/test/Ice/facets/Server.cpp @@ -21,12 +21,12 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr d = ICE_MAKE_SHARED(DI); - adapter->add(d, communicator->stringToIdentity("d")); - adapter->addFacet(d, communicator->stringToIdentity("d"), "facetABCD"); + adapter->add(d, Ice::stringToIdentity("d")); + adapter->addFacet(d, Ice::stringToIdentity("d"), "facetABCD"); Ice::ObjectPtr f = ICE_MAKE_SHARED(FI); - adapter->addFacet(f, communicator->stringToIdentity("d"), "facetEF"); + adapter->addFacet(f, Ice::stringToIdentity("d"), "facetEF"); Ice::ObjectPtr h = ICE_MAKE_SHARED(HI, communicator); - adapter->addFacet(h, communicator->stringToIdentity("d"), "facetGH"); + adapter->addFacet(h, Ice::stringToIdentity("d"), "facetGH"); TEST_READY adapter->activate(); communicator->waitForShutdown(); diff --git a/cpp/test/Ice/faultTolerance/Server.cpp b/cpp/test/Ice/faultTolerance/Server.cpp index ab727d372de..c731d007786 100644 --- a/cpp/test/Ice/faultTolerance/Server.cpp +++ b/cpp/test/Ice/faultTolerance/Server.cpp @@ -53,7 +53,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpts.str()); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(TestI); - adapter->add(object, communicator->stringToIdentity("test")); + adapter->add(object, Ice::stringToIdentity("test")); adapter->activate(); communicator->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Ice/hold/Server.cpp b/cpp/test/Ice/hold/Server.cpp index 3d1db1b74a4..261d83d4660 100644 --- a/cpp/test/Ice/hold/Server.cpp +++ b/cpp/test/Ice/hold/Server.cpp @@ -26,7 +26,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter1.ThreadPool.SizeWarn", "0"); communicator->getProperties()->setProperty("TestAdapter1.ThreadPool.Serialize", "0"); Ice::ObjectAdapterPtr adapter1 = communicator->createObjectAdapter("TestAdapter1"); - adapter1->add(ICE_MAKE_SHARED(HoldI, timer, adapter1), communicator->stringToIdentity("hold")); + adapter1->add(ICE_MAKE_SHARED(HoldI, timer, adapter1), Ice::stringToIdentity("hold")); communicator->getProperties()->setProperty("TestAdapter2.Endpoints", getTestEndpoint(communicator, 1) + ":udp"); communicator->getProperties()->setProperty("TestAdapter2.ThreadPool.Size", "5"); @@ -34,7 +34,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter2.ThreadPool.SizeWarn", "0"); communicator->getProperties()->setProperty("TestAdapter2.ThreadPool.Serialize", "1"); Ice::ObjectAdapterPtr adapter2 = communicator->createObjectAdapter("TestAdapter2"); - adapter2->add(ICE_MAKE_SHARED(HoldI, timer, adapter2), communicator->stringToIdentity("hold")); + adapter2->add(ICE_MAKE_SHARED(HoldI, timer, adapter2), Ice::stringToIdentity("hold")); adapter1->activate(); adapter2->activate(); diff --git a/cpp/test/Ice/impl/Server.cpp b/cpp/test/Ice/impl/Server.cpp index b2f397730e5..91cb3580b0d 100644 --- a/cpp/test/Ice/impl/Server.cpp +++ b/cpp/test/Ice/impl/Server.cpp @@ -22,7 +22,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) string endpt = getTestEndpoint(communicator, 0); communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpt + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/impl/ServerAMD.cpp b/cpp/test/Ice/impl/ServerAMD.cpp index d9488a27456..88a22188406 100644 --- a/cpp/test/Ice/impl/ServerAMD.cpp +++ b/cpp/test/Ice/impl/ServerAMD.cpp @@ -22,7 +22,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) string endpt = getTestEndpoint(communicator, 0); communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpt + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/info/Server.cpp b/cpp/test/Ice/info/Server.cpp index 5d811ef4609..47c8bbb3332 100644 --- a/cpp/test/Ice/info/Server.cpp +++ b/cpp/test/Ice/info/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp -p 12010"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(TestI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(TestI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/inheritance/Collocated.cpp b/cpp/test/Ice/inheritance/Collocated.cpp index f0ff2a1e25f..0f640de9b8b 100644 --- a/cpp/test/Ice/inheritance/Collocated.cpp +++ b/cpp/test/Ice/inheritance/Collocated.cpp @@ -22,7 +22,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(InitialI, adapter); - adapter->add(object, communicator->stringToIdentity("initial")); + adapter->add(object, Ice::stringToIdentity("initial")); InitialPrxPtr allTests(const Ice::CommunicatorPtr&); allTests(communicator); diff --git a/cpp/test/Ice/inheritance/Server.cpp b/cpp/test/Ice/inheritance/Server.cpp index abb805c10ca..8ec0c761076 100644 --- a/cpp/test/Ice/inheritance/Server.cpp +++ b/cpp/test/Ice/inheritance/Server.cpp @@ -21,7 +21,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(InitialI, adapter); - adapter->add(object, communicator->stringToIdentity("initial")); + adapter->add(object, Ice::stringToIdentity("initial")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/location/AllTests.cpp b/cpp/test/Ice/location/AllTests.cpp index 2a6966a80a6..cf48eb18b51 100644 --- a/cpp/test/Ice/location/AllTests.cpp +++ b/cpp/test/Ice/location/AllTests.cpp @@ -707,7 +707,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const string& ref) registry->addObject(adapter->add(ICE_MAKE_SHARED(HelloI), id)); adapter->activate(); - HelloPrxPtr helloPrx = ICE_CHECKED_CAST(HelloPrx, communicator->stringToProxy(communicator->identityToString(id))); + HelloPrxPtr helloPrx = ICE_CHECKED_CAST(HelloPrx, communicator->stringToProxy(identityToString(id))); test(!helloPrx->ice_getConnection()); adapter->deactivate(); diff --git a/cpp/test/Ice/location/Server.cpp b/cpp/test/Ice/location/Server.cpp index 8bb0485c07f..fb2f29a2226 100644 --- a/cpp/test/Ice/location/Server.cpp +++ b/cpp/test/Ice/location/Server.cpp @@ -37,16 +37,16 @@ run(int, char**, const Ice::CommunicatorPtr& communicator, // 'servers' created with the server manager interface. // ServerLocatorRegistryPtr registry = ICE_MAKE_SHARED(ServerLocatorRegistry); - registry->addObject(adapter->createProxy(communicator->stringToIdentity("ServerManager"))); + registry->addObject(adapter->createProxy(Ice::stringToIdentity("ServerManager"))); Ice::ObjectPtr object = ICE_MAKE_SHARED(ServerManagerI, registry, initData); - adapter->add(object, communicator->stringToIdentity("ServerManager")); + adapter->add(object, Ice::stringToIdentity("ServerManager")); Ice::LocatorRegistryPrxPtr registryPrx = ICE_UNCHECKED_CAST(Ice::LocatorRegistryPrx, - adapter->add(registry, communicator->stringToIdentity("registry"))); + adapter->add(registry, Ice::stringToIdentity("registry"))); Ice::LocatorPtr locator = ICE_MAKE_SHARED(ServerLocator, registry, registryPrx); - adapter->add(locator, communicator->stringToIdentity("locator")); + adapter->add(locator, Ice::stringToIdentity("locator")); adapter->activate(); TEST_READY diff --git a/cpp/test/Ice/location/TestI.cpp b/cpp/test/Ice/location/TestI.cpp index 833d660a159..80e391b2a8d 100644 --- a/cpp/test/Ice/location/TestI.cpp +++ b/cpp/test/Ice/location/TestI.cpp @@ -69,9 +69,9 @@ ServerManagerI::startServer(const Ice::Current&) adapter2->setLocator(ICE_UNCHECKED_CAST(Ice::LocatorPrx, locator)); Ice::ObjectPtr object = ICE_MAKE_SHARED(TestI, adapter, adapter2, _registry); - _registry->addObject(adapter->add(object, serverCommunicator->stringToIdentity("test"))); - _registry->addObject(adapter->add(object, serverCommunicator->stringToIdentity("test2"))); - adapter->add(object, serverCommunicator->stringToIdentity("test3")); + _registry->addObject(adapter->add(object, Ice::stringToIdentity("test"))); + _registry->addObject(adapter->add(object, Ice::stringToIdentity("test2"))); + adapter->add(object, Ice::stringToIdentity("test3")); adapter->activate(); adapter2->activate(); @@ -93,7 +93,7 @@ TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const ServerLocatorRegistryPtr& registry) : _adapter1(adapter), _adapter2(adapter2), _registry(registry) { - _registry->addObject(_adapter1->add(ICE_MAKE_SHARED(HelloI), _adapter1->getCommunicator()->stringToIdentity("hello"))); + _registry->addObject(_adapter1->add(ICE_MAKE_SHARED(HelloI), Ice::stringToIdentity("hello"))); } void @@ -106,19 +106,19 @@ HelloPrxPtr TestI::getHello(const Ice::Current&) { return ICE_UNCHECKED_CAST(HelloPrx, _adapter1->createIndirectProxy( - _adapter1->getCommunicator()->stringToIdentity("hello"))); + Ice::stringToIdentity("hello"))); } HelloPrxPtr TestI::getReplicatedHello(const Ice::Current&) { - return ICE_UNCHECKED_CAST(HelloPrx, _adapter1->createProxy(_adapter1->getCommunicator()->stringToIdentity("hello"))); + return ICE_UNCHECKED_CAST(HelloPrx, _adapter1->createProxy(Ice::stringToIdentity("hello"))); } void TestI::migrateHello(const Ice::Current&) { - const Ice::Identity id = _adapter1->getCommunicator()->stringToIdentity("hello"); + const Ice::Identity id = Ice::stringToIdentity("hello"); try { _registry->addObject(_adapter2->add(_adapter1->remove(id), id)); diff --git a/cpp/test/Ice/metrics/Collocated.cpp b/cpp/test/Ice/metrics/Collocated.cpp index 3bfed32f91a..dd314954612 100644 --- a/cpp/test/Ice/metrics/Collocated.cpp +++ b/cpp/test/Ice/metrics/Collocated.cpp @@ -22,12 +22,12 @@ run(int, char**, const Ice::CommunicatorPtr& communicator, const CommunicatorObs { communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MetricsI), communicator->stringToIdentity("metrics")); + adapter->add(ICE_MAKE_SHARED(MetricsI), Ice::stringToIdentity("metrics")); //adapter->activate(); // Don't activate OA to ensure collocation is used. communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "default -p 12011"); Ice::ObjectAdapterPtr controllerAdapter = communicator->createObjectAdapter("ControllerAdapter"); - controllerAdapter->add(ICE_MAKE_SHARED(ControllerI, adapter), communicator->stringToIdentity("controller")); + controllerAdapter->add(ICE_MAKE_SHARED(ControllerI, adapter), Ice::stringToIdentity("controller")); //controllerAdapter->activate(); // Don't activate OA to ensure collocation is used. MetricsPrxPtr allTests(const Ice::CommunicatorPtr&, const CommunicatorObserverIPtr&); diff --git a/cpp/test/Ice/metrics/Server.cpp b/cpp/test/Ice/metrics/Server.cpp index 069f288c645..e5daf413204 100644 --- a/cpp/test/Ice/metrics/Server.cpp +++ b/cpp/test/Ice/metrics/Server.cpp @@ -20,12 +20,12 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MetricsI), communicator->stringToIdentity("metrics")); + adapter->add(ICE_MAKE_SHARED(MetricsI), Ice::stringToIdentity("metrics")); adapter->activate(); communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "default -p 12011"); Ice::ObjectAdapterPtr controllerAdapter = communicator->createObjectAdapter("ControllerAdapter"); - controllerAdapter->add(ICE_MAKE_SHARED(ControllerI, adapter), communicator->stringToIdentity("controller")); + controllerAdapter->add(ICE_MAKE_SHARED(ControllerI, adapter), Ice::stringToIdentity("controller")); controllerAdapter->activate(); TEST_READY diff --git a/cpp/test/Ice/metrics/ServerAMD.cpp b/cpp/test/Ice/metrics/ServerAMD.cpp index 1d53c859792..40aee438374 100644 --- a/cpp/test/Ice/metrics/ServerAMD.cpp +++ b/cpp/test/Ice/metrics/ServerAMD.cpp @@ -20,12 +20,12 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MetricsI), communicator->stringToIdentity("metrics")); + adapter->add(ICE_MAKE_SHARED(MetricsI), Ice::stringToIdentity("metrics")); adapter->activate(); communicator->getProperties()->setProperty("ControllerAdapter.Endpoints", "default -p 12011"); Ice::ObjectAdapterPtr controllerAdapter = communicator->createObjectAdapter("ControllerAdapter"); - controllerAdapter->add(ICE_MAKE_SHARED(ControllerI, adapter), communicator->stringToIdentity("controller")); + controllerAdapter->add(ICE_MAKE_SHARED(ControllerI, adapter), Ice::stringToIdentity("controller")); controllerAdapter->activate(); TEST_READY diff --git a/cpp/test/Ice/networkProxy/Server.cpp b/cpp/test/Ice/networkProxy/Server.cpp index d8c103dc721..07dac51360a 100644 --- a/cpp/test/Ice/networkProxy/Server.cpp +++ b/cpp/test/Ice/networkProxy/Server.cpp @@ -37,7 +37,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(TestI); - adapter->add(object, communicator->stringToIdentity("test")); + adapter->add(object, Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/objects/Collocated.cpp b/cpp/test/Ice/objects/Collocated.cpp index 9686c6ca559..6443ed13252 100644 --- a/cpp/test/Ice/objects/Collocated.cpp +++ b/cpp/test/Ice/objects/Collocated.cpp @@ -134,9 +134,9 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(InitialI, adapter), communicator->stringToIdentity("initial")); - adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); - adapter->add(ICE_MAKE_SHARED(UnexpectedObjectExceptionTestI), communicator->stringToIdentity("uoet")); + adapter->add(ICE_MAKE_SHARED(InitialI, adapter), Ice::stringToIdentity("initial")); + adapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(UnexpectedObjectExceptionTestI), Ice::stringToIdentity("uoet")); InitialPrxPtr allTests(const Ice::CommunicatorPtr&); InitialPrxPtr initial = allTests(communicator); // We must call shutdown even in the collocated case for cyclic dependency cleanup diff --git a/cpp/test/Ice/objects/Server.cpp b/cpp/test/Ice/objects/Server.cpp index 47ef551c54f..c63b2d7c415 100644 --- a/cpp/test/Ice/objects/Server.cpp +++ b/cpp/test/Ice/objects/Server.cpp @@ -68,10 +68,10 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(InitialI, adapter), communicator->stringToIdentity("initial")); - adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(InitialI, adapter), Ice::stringToIdentity("initial")); + adapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); - adapter->add(ICE_MAKE_SHARED(UnexpectedObjectExceptionTestI), communicator->stringToIdentity("uoet")); + adapter->add(ICE_MAKE_SHARED(UnexpectedObjectExceptionTestI), Ice::stringToIdentity("uoet")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp index 58cec8483b4..cfce947446d 100644 --- a/cpp/test/Ice/operations/Collocated.cpp +++ b/cpp/test/Ice/operations/Collocated.cpp @@ -21,7 +21,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); communicator->getProperties()->setProperty("TestAdapter.AdapterId", "test"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - Ice::ObjectPrxPtr prx = adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); + Ice::ObjectPrxPtr prx = adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); //adapter->activate(); // Don't activate OA to ensure collocation is used. test(!prx->ice_getConnection()); diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp index c291f5cb13e..80f89467fe7 100644 --- a/cpp/test/Ice/operations/Server.cpp +++ b/cpp/test/Ice/operations/Server.cpp @@ -21,7 +21,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) string endpt = getTestEndpoint(communicator, 0); communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpt + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/operations/ServerAMD.cpp b/cpp/test/Ice/operations/ServerAMD.cpp index c52ea694234..f291f11a5a4 100644 --- a/cpp/test/Ice/operations/ServerAMD.cpp +++ b/cpp/test/Ice/operations/ServerAMD.cpp @@ -21,7 +21,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) string endpt = getTestEndpoint(communicator, 0); communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpt + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/operations/TestAMDI.cpp b/cpp/test/Ice/operations/TestAMDI.cpp index d7c5ceff2c0..046bd3f6de6 100644 --- a/cpp/test/Ice/operations/TestAMDI.cpp +++ b/cpp/test/Ice/operations/TestAMDI.cpp @@ -210,7 +210,7 @@ MyDerivedClassI::opMyClassAsync(shared_ptr<Test::MyClassPrx> p1, { auto p2 = p1; auto p3 = uncheckedCast<Test::MyClassPrx>(current.adapter->createProxy( - current.adapter->getCommunicator()->stringToIdentity("noSuchIdentity"))); + stringToIdentity("noSuchIdentity"))); response(uncheckedCast<Test::MyClassPrx>(current.adapter->createProxy(current.id)), p2, p3); } @@ -1126,7 +1126,7 @@ MyDerivedClassI::opMyClass_async(const Test::AMD_MyClass_opMyClassPtr& cb, Test::MyClassPrxPtr p2 = p1; Test::MyClassPrxPtr p3 = ICE_UNCHECKED_CAST( Test::MyClassPrx, current.adapter->createProxy( - current.adapter->getCommunicator()->stringToIdentity("noSuchIdentity"))); + stringToIdentity("noSuchIdentity"))); cb->ice_response(ICE_UNCHECKED_CAST(Test::MyClassPrx, current.adapter->createProxy(current.id)), p2, p3); } diff --git a/cpp/test/Ice/operations/TestI.cpp b/cpp/test/Ice/operations/TestI.cpp index 1c091594b36..ddbcffedd7f 100644 --- a/cpp/test/Ice/operations/TestI.cpp +++ b/cpp/test/Ice/operations/TestI.cpp @@ -164,7 +164,7 @@ MyDerivedClassI::opMyClass(ICE_IN(Test::MyClassPrxPtr) p1, p2 = p1; p3 = ICE_UNCHECKED_CAST(Test::MyClassPrx, current.adapter->createProxy( - current.adapter->getCommunicator()->stringToIdentity("noSuchIdentity"))); + stringToIdentity("noSuchIdentity"))); return ICE_UNCHECKED_CAST(Test::MyClassPrx, current.adapter->createProxy(current.id)); } diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index e0ba66c9c92..a8fbe72f7e9 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -351,9 +351,9 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrxPtr& p) test(Ice::proxyIdentityAndFacetEqual(c1, p)); test(!Ice::proxyIdentityAndFacetEqual(c2, p)); test(Ice::proxyIdentityAndFacetEqual(r, p)); - test(c1->ice_getIdentity() == communicator->stringToIdentity("test")); - test(c2->ice_getIdentity() == communicator->stringToIdentity("noSuchIdentity")); - test(r->ice_getIdentity() == communicator->stringToIdentity("test")); + test(c1->ice_getIdentity() == Ice::stringToIdentity("test")); + test(c2->ice_getIdentity() == Ice::stringToIdentity("noSuchIdentity")); + test(r->ice_getIdentity() == Ice::stringToIdentity("test")); r->opVoid(); c1->opVoid(); try diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp index 1a40355816b..1e96c80cae4 100644 --- a/cpp/test/Ice/operations/TwowaysAMI.cpp +++ b/cpp/test/Ice/operations/TwowaysAMI.cpp @@ -170,9 +170,9 @@ public: void opMyClass(const Test::MyClassPrxPtr& r, const Test::MyClassPrxPtr& c1, const Test::MyClassPrxPtr& c2) { - test(c1->ice_getIdentity() == _communicator->stringToIdentity("test")); - test(c2->ice_getIdentity() == _communicator->stringToIdentity("noSuchIdentity")); - test(r->ice_getIdentity() == _communicator->stringToIdentity("test")); + test(c1->ice_getIdentity() == Ice::stringToIdentity("test")); + test(c2->ice_getIdentity() == Ice::stringToIdentity("noSuchIdentity")); + test(r->ice_getIdentity() == Ice::stringToIdentity("test")); // // We can't do the callbacks below in connection serialization mode. diff --git a/cpp/test/Ice/optional/Server.cpp b/cpp/test/Ice/optional/Server.cpp index fe22e6abe87..aacddd084ed 100644 --- a/cpp/test/Ice/optional/Server.cpp +++ b/cpp/test/Ice/optional/Server.cpp @@ -21,7 +21,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(InitialI), communicator->stringToIdentity("initial")); + adapter->add(ICE_MAKE_SHARED(InitialI), Ice::stringToIdentity("initial")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/optional/ServerAMD.cpp b/cpp/test/Ice/optional/ServerAMD.cpp index 9b4c93e894b..c47b19721b5 100644 --- a/cpp/test/Ice/optional/ServerAMD.cpp +++ b/cpp/test/Ice/optional/ServerAMD.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(InitialI), communicator->stringToIdentity("initial")); + adapter->add(ICE_MAKE_SHARED(InitialI), Ice::stringToIdentity("initial")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp index 0bcaccfff27..bcded5cb5b2 100644 --- a/cpp/test/Ice/proxy/AllTests.cpp +++ b/cpp/test/Ice/proxy/AllTests.cpp @@ -258,15 +258,11 @@ allTests(const Ice::CommunicatorPtr& communicator) // Test for bug ICE-5543: escaped escapes in stringToIdentity // Ice::Identity id = { "test", ",X2QNUAzSBcJ_e$AV;E\\" }; - Ice::Identity id2 = communicator->stringToIdentity(communicator->identityToString(id)); - test(id == id2); - id2 = Ice::stringToIdentity(Ice::identityToString(id)); + Ice::Identity id2 = Ice::stringToIdentity(Ice::identityToString(id)); test(id == id2); id.name = "test"; id.category = ",X2QNUAz\\SB\\/cJ_e$AV;E\\\\"; - id2 = communicator->stringToIdentity(communicator->identityToString(id)); - test(id == id2); id2 = Ice::stringToIdentity(Ice::identityToString(id)); test(id == id2); @@ -448,8 +444,10 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "ok" << endl; cout << "testing proxy methods... " << flush; - test(communicator->identityToString(base->ice_identity(communicator->stringToIdentity("other"))->ice_getIdentity()) - == "other"); + +// Deprecated +// test(communicator->identityToString(base->ice_identity(communicator->stringToIdentity("other"))->ice_getIdentity()) +// == "other"); test(Ice::identityToString(base->ice_identity(Ice::stringToIdentity("other"))->ice_getIdentity()) == "other"); test(base->ice_facet("facet")->ice_getFacet() == "facet"); test(base->ice_adapterId("id")->ice_getAdapterId() == "id"); diff --git a/cpp/test/Ice/proxy/Collocated.cpp b/cpp/test/Ice/proxy/Collocated.cpp index aa651a1da15..2c7e91d3106 100644 --- a/cpp/test/Ice/proxy/Collocated.cpp +++ b/cpp/test/Ice/proxy/Collocated.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); //adapter->activate(); // Don't activate OA to ensure collocation is used. Test::MyClassPrxPtr allTests(const Ice::CommunicatorPtr&); diff --git a/cpp/test/Ice/proxy/Server.cpp b/cpp/test/Ice/proxy/Server.cpp index 15c8418a051..c0a9a8761c5 100644 --- a/cpp/test/Ice/proxy/Server.cpp +++ b/cpp/test/Ice/proxy/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/proxy/ServerAMD.cpp b/cpp/test/Ice/proxy/ServerAMD.cpp index 432c34f9b53..db603a4570a 100644 --- a/cpp/test/Ice/proxy/ServerAMD.cpp +++ b/cpp/test/Ice/proxy/ServerAMD.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0)); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/retry/Collocated.cpp b/cpp/test/Ice/retry/Collocated.cpp index 597fc7a65d7..1c83cb7c996 100644 --- a/cpp/test/Ice/retry/Collocated.cpp +++ b/cpp/test/Ice/retry/Collocated.cpp @@ -22,7 +22,7 @@ void setupObjectAdapter(const Ice::CommunicatorPtr& communicator) { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(""); - adapter->add(ICE_MAKE_SHARED(RetryI), communicator->stringToIdentity("retry")); + adapter->add(ICE_MAKE_SHARED(RetryI), Ice::stringToIdentity("retry")); //adapter->activate(); // Don't activate OA to ensure collocation is used. } diff --git a/cpp/test/Ice/retry/Server.cpp b/cpp/test/Ice/retry/Server.cpp index 8a42f1e389e..a0e37557fbf 100644 --- a/cpp/test/Ice/retry/Server.cpp +++ b/cpp/test/Ice/retry/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(RetryI), communicator->stringToIdentity("retry")); + adapter->add(ICE_MAKE_SHARED(RetryI), Ice::stringToIdentity("retry")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/servantLocator/Collocated.cpp b/cpp/test/Ice/servantLocator/Collocated.cpp index 13fe3b76e4b..aeb02c0e36d 100644 --- a/cpp/test/Ice/servantLocator/Collocated.cpp +++ b/cpp/test/Ice/servantLocator/Collocated.cpp @@ -96,8 +96,8 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); adapter->addServantLocator(ICE_MAKE_SHARED(ServantLocatorI, ""), ""); adapter->addServantLocator(ICE_MAKE_SHARED(ServantLocatorI, "category"), "category"); - adapter->add(ICE_MAKE_SHARED(TestI), communicator->stringToIdentity("asm")); - adapter->add(ICE_MAKE_SHARED(TestActivationI), communicator->stringToIdentity("test/activation")); + adapter->add(ICE_MAKE_SHARED(TestI), Ice::stringToIdentity("asm")); + adapter->add(ICE_MAKE_SHARED(TestActivationI), Ice::stringToIdentity("test/activation")); Test::TestIntfPrxPtr allTests(const CommunicatorPtr&); allTests(communicator); diff --git a/cpp/test/Ice/servantLocator/Server.cpp b/cpp/test/Ice/servantLocator/Server.cpp index 6b4a38dc772..c5c78e23881 100644 --- a/cpp/test/Ice/servantLocator/Server.cpp +++ b/cpp/test/Ice/servantLocator/Server.cpp @@ -97,8 +97,8 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) adapter->addServantLocator(ICE_MAKE_SHARED(ServantLocatorI, ""), ""); adapter->addServantLocator(ICE_MAKE_SHARED(ServantLocatorI, "category"), "category"); - adapter->add(ICE_MAKE_SHARED(TestI), communicator->stringToIdentity("asm")); - adapter->add(ICE_MAKE_SHARED(TestActivationI), communicator->stringToIdentity("test/activation")); + adapter->add(ICE_MAKE_SHARED(TestI), Ice::stringToIdentity("asm")); + adapter->add(ICE_MAKE_SHARED(TestActivationI), Ice::stringToIdentity("test/activation")); adapter->activate(); TEST_READY adapter->waitForDeactivate(); diff --git a/cpp/test/Ice/servantLocator/ServerAMD.cpp b/cpp/test/Ice/servantLocator/ServerAMD.cpp index b51708b76cb..740d6072b33 100644 --- a/cpp/test/Ice/servantLocator/ServerAMD.cpp +++ b/cpp/test/Ice/servantLocator/ServerAMD.cpp @@ -96,8 +96,8 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) adapter->addServantLocator(ICE_MAKE_SHARED(ServantLocatorAMDI, ""), ""); adapter->addServantLocator(ICE_MAKE_SHARED(ServantLocatorAMDI, "category"), "category"); - adapter->add(ICE_MAKE_SHARED(TestAMDI), communicator->stringToIdentity("asm")); - adapter->add(ICE_MAKE_SHARED(TestActivationI), communicator->stringToIdentity("test/activation")); + adapter->add(ICE_MAKE_SHARED(TestAMDI), Ice::stringToIdentity("asm")); + adapter->add(ICE_MAKE_SHARED(TestActivationI), Ice::stringToIdentity("test/activation")); adapter->activate(); TEST_READY adapter->waitForDeactivate(); diff --git a/cpp/test/Ice/slicing/exceptions/Server.cpp b/cpp/test/Ice/slicing/exceptions/Server.cpp index 2cd8dba2995..909b87b7fc0 100644 --- a/cpp/test/Ice/slicing/exceptions/Server.cpp +++ b/cpp/test/Ice/slicing/exceptions/Server.cpp @@ -22,7 +22,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) properties->setProperty("Ice.Warn.Dispatch", "0"); communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(TestI), communicator->stringToIdentity("Test")); + adapter->add(ICE_MAKE_SHARED(TestI), Ice::stringToIdentity("Test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp b/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp index 5b67af38a4f..c5534dcc207 100644 --- a/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp +++ b/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp @@ -22,7 +22,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) properties->setProperty("Ice.Warn.Dispatch", "0"); communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(TestI), communicator->stringToIdentity("Test")); + adapter->add(ICE_MAKE_SHARED(TestI), Ice::stringToIdentity("Test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/slicing/objects/Server.cpp b/cpp/test/Ice/slicing/objects/Server.cpp index 62221669931..093997a59ef 100644 --- a/cpp/test/Ice/slicing/objects/Server.cpp +++ b/cpp/test/Ice/slicing/objects/Server.cpp @@ -23,7 +23,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(TestI); - adapter->add(object, communicator->stringToIdentity("Test")); + adapter->add(object, Ice::stringToIdentity("Test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/slicing/objects/ServerAMD.cpp b/cpp/test/Ice/slicing/objects/ServerAMD.cpp index 293676daa27..28e3b390606 100644 --- a/cpp/test/Ice/slicing/objects/ServerAMD.cpp +++ b/cpp/test/Ice/slicing/objects/ServerAMD.cpp @@ -23,7 +23,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + " -t 2000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(TestI); - adapter->add(object, communicator->stringToIdentity("Test")); + adapter->add(object, Ice::stringToIdentity("Test")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/stringConverter/Server.cpp b/cpp/test/Ice/stringConverter/Server.cpp index ce592e19ba9..3e3b6e17541 100644 --- a/cpp/test/Ice/stringConverter/Server.cpp +++ b/cpp/test/Ice/stringConverter/Server.cpp @@ -45,7 +45,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(MyObjectI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(MyObjectI), Ice::stringToIdentity("test")); adapter->activate(); TEST_READY diff --git a/cpp/test/Ice/threadPoolPriority/Server.cpp b/cpp/test/Ice/threadPoolPriority/Server.cpp index bde7ad25bff..b1957badf2f 100644 --- a/cpp/test/Ice/threadPoolPriority/Server.cpp +++ b/cpp/test/Ice/threadPoolPriority/Server.cpp @@ -49,7 +49,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(PriorityI, adapter); - adapter->add(object, communicator->stringToIdentity("test")); + adapter->add(object, Ice::stringToIdentity("test")); adapter->activate(); communicator->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Ice/threadPoolPriority/ServerCustomThreadPool.cpp b/cpp/test/Ice/threadPoolPriority/ServerCustomThreadPool.cpp index 934ba14b99f..3d67cc16c3f 100644 --- a/cpp/test/Ice/threadPoolPriority/ServerCustomThreadPool.cpp +++ b/cpp/test/Ice/threadPoolPriority/ServerCustomThreadPool.cpp @@ -53,7 +53,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) #endif Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(PriorityI, adapter); - adapter->add(object, communicator->stringToIdentity("test")); + adapter->add(object, Ice::stringToIdentity("test")); adapter->activate(); communicator->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/Ice/timeout/Server.cpp b/cpp/test/Ice/timeout/Server.cpp index d31e626034e..f355ce381fa 100644 --- a/cpp/test/Ice/timeout/Server.cpp +++ b/cpp/test/Ice/timeout/Server.cpp @@ -21,7 +21,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint(communicator, 0) + ":udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = ICE_MAKE_SHARED(TimeoutI); - adapter->add(object, communicator->stringToIdentity("timeout")); + adapter->add(object, Ice::stringToIdentity("timeout")); adapter->activate(); TEST_READY communicator->waitForShutdown(); diff --git a/cpp/test/Ice/udp/Server.cpp b/cpp/test/Ice/udp/Server.cpp index 77abcdf2d03..9574f504ed7 100644 --- a/cpp/test/Ice/udp/Server.cpp +++ b/cpp/test/Ice/udp/Server.cpp @@ -26,14 +26,14 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) os << "tcp -p " << (12010 + num); properties->setProperty("ControlAdapter.Endpoints", os.str()); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("ControlAdapter"); - adapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("control")); + adapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("control")); adapter->activate(); if(num == 0) { properties->setProperty("TestAdapter.Endpoints", "udp -p 12010"); Ice::ObjectAdapterPtr adapter2 = communicator->createObjectAdapter("TestAdapter"); - adapter2->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); + adapter2->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); adapter2->activate(); } @@ -52,7 +52,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) } properties->setProperty("McastTestAdapter.Endpoints", endpoint); Ice::ObjectAdapterPtr mcastAdapter = communicator->createObjectAdapter("McastTestAdapter"); - mcastAdapter->add(ICE_MAKE_SHARED(TestIntfI), communicator->stringToIdentity("test")); + mcastAdapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test")); mcastAdapter->activate(); TEST_READY diff --git a/cpp/test/IceBox/configuration/Service.cpp b/cpp/test/IceBox/configuration/Service.cpp index ee1c1389aaf..2d369d3ef2c 100644 --- a/cpp/test/IceBox/configuration/Service.cpp +++ b/cpp/test/IceBox/configuration/Service.cpp @@ -54,7 +54,7 @@ void ServiceI::start(const string& name, const CommunicatorPtr& communicator, const StringSeq& args) { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name + "OA"); - adapter->add(ICE_MAKE_SHARED(TestI, args), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(TestI, args), stringToIdentity("test")); adapter->activate(); } diff --git a/cpp/test/IceDiscovery/simple/Server.cpp b/cpp/test/IceDiscovery/simple/Server.cpp index 5b7660acd67..ef543fa090e 100644 --- a/cpp/test/IceDiscovery/simple/Server.cpp +++ b/cpp/test/IceDiscovery/simple/Server.cpp @@ -37,7 +37,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { ostringstream os; os << "controller" << num; - adapter->add(ICE_MAKE_SHARED(ControllerI), communicator->stringToIdentity(os.str())); + adapter->add(ICE_MAKE_SHARED(ControllerI), Ice::stringToIdentity(os.str())); } adapter->activate(); diff --git a/cpp/test/IceGrid/activation/Server.cpp b/cpp/test/IceGrid/activation/Server.cpp index 54b2aa418c1..e614fdaf02b 100644 --- a/cpp/test/IceGrid/activation/Server.cpp +++ b/cpp/test/IceGrid/activation/Server.cpp @@ -36,7 +36,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); TestI* test = new TestI(); Ice::ObjectPtr obj = test; - adapter->add(test, communicator()->stringToIdentity(properties->getProperty("Ice.Admin.ServerId"))); + adapter->add(test, Ice::stringToIdentity(properties->getProperty("Ice.Admin.ServerId"))); int delay = properties->getPropertyAsInt("ActivationDelay"); if(delay > 0) diff --git a/cpp/test/IceGrid/allocation/AllTests.cpp b/cpp/test/IceGrid/allocation/AllTests.cpp index 12473e73d3b..0a86f1011f3 100644 --- a/cpp/test/IceGrid/allocation/AllTests.cpp +++ b/cpp/test/IceGrid/allocation/AllTests.cpp @@ -192,7 +192,7 @@ public: os << "stress-" << IceUtilInternal::random(6) + 1; try { - return session->allocateObjectById(_communicator->stringToIdentity(os.str())); + return session->allocateObjectById(Ice::stringToIdentity(os.str())); } catch(const AllocationTimeoutException&) { @@ -227,7 +227,7 @@ public: CallbackPtr asyncCB = new Callback(); IceGrid::Callback_Session_allocateObjectByIdPtr cb = IceGrid::newCallback_Session_allocateObjectById(asyncCB, &Callback::response, &Callback::exception); - session->begin_allocateObjectById(_communicator->stringToIdentity(os.str()), cb); + session->begin_allocateObjectById(Ice::stringToIdentity(os.str()), cb); session->destroy(); } @@ -307,19 +307,19 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing allocate object by identity... " << flush; - Ice::Identity allocatable = communicator->stringToIdentity("allocatable"); - Ice::Identity allocatablebis = communicator->stringToIdentity("allocatablebis"); + Ice::Identity allocatable = Ice::stringToIdentity("allocatable"); + Ice::Identity allocatablebis = Ice::stringToIdentity("allocatablebis"); try { - session1->allocateObjectById(communicator->stringToIdentity("dummy")); + session1->allocateObjectById(Ice::stringToIdentity("dummy")); } catch(const ObjectNotRegisteredException&) { } try { - session1->releaseObject(communicator->stringToIdentity("dummy")); + session1->releaseObject(Ice::stringToIdentity("dummy")); } catch(const ObjectNotRegisteredException&) { @@ -327,7 +327,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - session1->allocateObjectById(communicator->stringToIdentity("nonallocatable")); + session1->allocateObjectById(Ice::stringToIdentity("nonallocatable")); test(false); } catch(const AllocationException&) @@ -340,7 +340,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - session2->allocateObjectById(communicator->stringToIdentity("nonallocatable")); + session2->allocateObjectById(Ice::stringToIdentity("nonallocatable")); test(false); } catch(const AllocationException&) @@ -353,7 +353,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - session1->releaseObject(communicator->stringToIdentity("nonallocatable")); + session1->releaseObject(Ice::stringToIdentity("nonallocatable")); test(false); } catch(const AllocationException&) @@ -366,7 +366,7 @@ allTests(const Ice::CommunicatorPtr& communicator) try { - session2->releaseObject(communicator->stringToIdentity("nonallocatable")); + session2->releaseObject(Ice::stringToIdentity("nonallocatable")); test(false); } catch(const AllocationException&) @@ -642,8 +642,8 @@ allTests(const Ice::CommunicatorPtr& communicator) session1->setAllocationTimeout(0); session2->setAllocationTimeout(0); - Ice::Identity allocatable3 = communicator->stringToIdentity("allocatable3"); - Ice::Identity allocatable4 = communicator->stringToIdentity("allocatable4"); + Ice::Identity allocatable3 = Ice::stringToIdentity("allocatable3"); + Ice::Identity allocatable4 = Ice::stringToIdentity("allocatable4"); session1->allocateObjectById(allocatable3); try @@ -777,8 +777,8 @@ allTests(const Ice::CommunicatorPtr& communicator) { } test(session1->allocateObjectByType("::TestMultipleByServer")); - session1->releaseObject(communicator->stringToIdentity("allocatable31")); - session1->releaseObject(communicator->stringToIdentity("allocatable41")); + session1->releaseObject(Ice::stringToIdentity("allocatable31")); + session1->releaseObject(Ice::stringToIdentity("allocatable41")); test(session2->allocateObjectByType("::TestMultipleByServer")); try { @@ -789,8 +789,8 @@ allTests(const Ice::CommunicatorPtr& communicator) { } test(session2->allocateObjectByType("::TestMultipleByServer")); - session2->releaseObject(communicator->stringToIdentity("allocatable31")); - session2->releaseObject(communicator->stringToIdentity("allocatable41")); + session2->releaseObject(Ice::stringToIdentity("allocatable31")); + session2->releaseObject(Ice::stringToIdentity("allocatable41")); Ice::ObjectPrx obj1 = session1->allocateObjectByType("::TestMultipleServer"); test(obj1); diff --git a/cpp/test/IceGrid/allocation/PermissionsVerifier.cpp b/cpp/test/IceGrid/allocation/PermissionsVerifier.cpp index d39a9eb1dce..54fe5be7c01 100644 --- a/cpp/test/IceGrid/allocation/PermissionsVerifier.cpp +++ b/cpp/test/IceGrid/allocation/PermissionsVerifier.cpp @@ -30,7 +30,7 @@ public: virtual int run(int, char*[]) { Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("PermissionsVerifier"); - adapter->add(new PermissionsVerifierI, communicator()->stringToIdentity("PermissionsVerifier")); + adapter->add(new PermissionsVerifierI, Ice::stringToIdentity("PermissionsVerifier")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/IceGrid/allocation/Server.cpp b/cpp/test/IceGrid/allocation/Server.cpp index 8e9931a3e91..113ccaa4846 100644 --- a/cpp/test/IceGrid/allocation/Server.cpp +++ b/cpp/test/IceGrid/allocation/Server.cpp @@ -32,16 +32,16 @@ Server::run(int argc, char* argv[]) string name = properties->getProperty("Ice.ProgramName"); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("nonallocatable")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable1")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable2")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable3")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable4")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable11")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable21")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable31")); - adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable41")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable")); + adapter->add(new TestI(properties), Ice::stringToIdentity("nonallocatable")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable1")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable2")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable3")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable4")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable11")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable21")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable31")); + adapter->add(new TestI(properties), Ice::stringToIdentity("allocatable41")); shutdownOnInterrupt(); try diff --git a/cpp/test/IceGrid/deployer/AllTests.cpp b/cpp/test/IceGrid/deployer/AllTests.cpp index 47d984c302c..301692a25aa 100644 --- a/cpp/test/IceGrid/deployer/AllTests.cpp +++ b/cpp/test/IceGrid/deployer/AllTests.cpp @@ -68,7 +68,7 @@ public: bool operator()(const Ice::ObjectPrx& p1, const string& id) const { - return p1->ice_getIdentity() == _communicator->stringToIdentity(id); + return p1->ice_getIdentity() == Ice::stringToIdentity(id); } private: @@ -429,16 +429,16 @@ allTests(const Ice::CommunicatorPtr& comm) test(find_if(objs.begin(), objs.end(), bind2nd(ProxyIdentityEqual(comm),"ReplicatedObject")) != objs.end()); { - test(comm->identityToString(query->findObjectByType("::TestId1")->ice_getIdentity()) == "cat/name1"); - test(comm->identityToString(query->findObjectByType("::TestId2")->ice_getIdentity()) == "cat1/name1"); - test(comm->identityToString(query->findObjectByType("::TestId3")->ice_getIdentity()) == "cat1/name1-bis"); - test(comm->identityToString(query->findObjectByType("::TestId4")->ice_getIdentity()) == "c2\\/c2/n2\\/n2"); - test(comm->identityToString(query->findObjectByType("::TestId5")->ice_getIdentity()) == "n2\\/n2"); + test(identityToString(query->findObjectByType("::TestId1")->ice_getIdentity()) == "cat/name1"); + test(identityToString(query->findObjectByType("::TestId2")->ice_getIdentity()) == "cat1/name1"); + test(identityToString(query->findObjectByType("::TestId3")->ice_getIdentity()) == "cat1/name1-bis"); + test(identityToString(query->findObjectByType("::TestId4")->ice_getIdentity()) == "c2\\/c2/n2\\/n2"); + test(identityToString(query->findObjectByType("::TestId5")->ice_getIdentity()) == "n2\\/n2"); } { Ice::ObjectPrx obj = query->findObjectByType("::Test"); - string id = comm->identityToString(obj->ice_getIdentity()); + string id = identityToString(obj->ice_getIdentity()); test(id == "Server1" || id == "Server2" || id == "SimpleServer" || id == "IceBox1-Service1" || id == "IceBox1-Service2" || id == "IceBox2-Service1" || id == "IceBox2-Service2" || @@ -447,7 +447,7 @@ allTests(const Ice::CommunicatorPtr& comm) { Ice::ObjectPrx obj = query->findObjectByTypeOnLeastLoadedNode("::Test", LoadSample5); - string id = comm->identityToString(obj->ice_getIdentity()); + string id = identityToString(obj->ice_getIdentity()); test(id == "Server1" || id == "Server2" || id == "SimpleServer" || id == "IceBox1-Service1" || id == "IceBox1-Service2" || id == "IceBox2-Service1" || id == "IceBox2-Service2" || diff --git a/cpp/test/IceGrid/deployer/Server.cpp b/cpp/test/IceGrid/deployer/Server.cpp index 42c9ebef1d2..5c5f6f821db 100644 --- a/cpp/test/IceGrid/deployer/Server.cpp +++ b/cpp/test/IceGrid/deployer/Server.cpp @@ -42,7 +42,7 @@ Server::run(int argc, char* argv[]) adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, communicator()->stringToIdentity(name)); + adapter->add(object, Ice::stringToIdentity(name)); shutdownOnInterrupt(); try { diff --git a/cpp/test/IceGrid/deployer/Service.cpp b/cpp/test/IceGrid/deployer/Service.cpp index b9587ec1889..c5905ea722e 100644 --- a/cpp/test/IceGrid/deployer/Service.cpp +++ b/cpp/test/IceGrid/deployer/Service.cpp @@ -58,7 +58,7 @@ ServiceI::start(const string& name, Ice::PropertiesPtr properties = communicator->getProperties(); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name); Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, communicator->stringToIdentity(properties->getProperty(name + ".Identity"))); + adapter->add(object, stringToIdentity(properties->getProperty(name + ".Identity"))); adapter->activate(); } diff --git a/cpp/test/IceGrid/distribution/Server.cpp b/cpp/test/IceGrid/distribution/Server.cpp index 2d7f88df87d..c86e876bbf9 100644 --- a/cpp/test/IceGrid/distribution/Server.cpp +++ b/cpp/test/IceGrid/distribution/Server.cpp @@ -33,7 +33,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, communicator()->stringToIdentity(name)); + adapter->add(object, Ice::stringToIdentity(name)); shutdownOnInterrupt(); try diff --git a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp index 95f7ca1a58c..97a85507c05 100644 --- a/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/AllTests.cpp @@ -193,7 +193,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = true; addProperty(server, "Server.Endpoints", "default"); ObjectDescriptor object; - object.id = communicator->stringToIdentity("${server}"); + object.id = Ice::stringToIdentity("${server}"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -204,7 +204,7 @@ allTests(const Ice::CommunicatorPtr& communicator) update.nodes[0].servers[0]->id = "Server2"; update.nodes[0].servers[0]->adapters[0].id = "ServerAdapter2"; - update.nodes[0].servers[0]->adapters[0].objects[0].id = communicator->stringToIdentity("test2"); + update.nodes[0].servers[0]->adapters[0].objects[0].id = Ice::stringToIdentity("test2"); try { admin->updateApplicationWithoutRestart(update); @@ -240,7 +240,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = true; addProperty(server, "Server.Endpoints", "default"); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("${server}"); + object.id = Ice::stringToIdentity("${server}"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -456,7 +456,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(info.descriptor); test(info.descriptor->adapters.size() == 1); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("testfoo"); + object.id = Ice::stringToIdentity("testfoo"); info.descriptor->adapters[0].objects.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -478,7 +478,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -536,7 +536,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.registerProcess = false; adapter.serverLifetime = false; addProperty(service, "${service}.Endpoints", "default"); - object.id = communicator->stringToIdentity("${server}.${service}"); + object.id = Ice::stringToIdentity("${server}.${service}"); addProperty(service, "${service}.Identity", "${server}.${service}"); adapter.objects.push_back(object); service->adapters.push_back(adapter); diff --git a/cpp/test/IceGrid/noRestartUpdate/Server.cpp b/cpp/test/IceGrid/noRestartUpdate/Server.cpp index 492fe695d1c..ad1d3fa2ae9 100644 --- a/cpp/test/IceGrid/noRestartUpdate/Server.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/Server.cpp @@ -33,7 +33,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(adapter, properties); - adapter->add(object, communicator()->stringToIdentity(name)); + adapter->add(object, Ice::stringToIdentity(name)); shutdownOnInterrupt(); try diff --git a/cpp/test/IceGrid/noRestartUpdate/Service.cpp b/cpp/test/IceGrid/noRestartUpdate/Service.cpp index b0f86c594e8..a07b62b74db 100644 --- a/cpp/test/IceGrid/noRestartUpdate/Service.cpp +++ b/cpp/test/IceGrid/noRestartUpdate/Service.cpp @@ -58,7 +58,7 @@ ServiceI::start(const string& name, Ice::PropertiesPtr properties = communicator->getProperties(); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name); Ice::ObjectPtr object = new TestI(adapter, properties); - adapter->add(object, communicator->stringToIdentity(properties->getProperty(name + ".Identity"))); + adapter->add(object, stringToIdentity(properties->getProperty(name + ".Identity"))); adapter->activate(); } diff --git a/cpp/test/IceGrid/replicaGroup/Server.cpp b/cpp/test/IceGrid/replicaGroup/Server.cpp index bc3dcfa1a14..938c6ea3d11 100644 --- a/cpp/test/IceGrid/replicaGroup/Server.cpp +++ b/cpp/test/IceGrid/replicaGroup/Server.cpp @@ -26,8 +26,8 @@ Server::run(int, char**) Ice::ObjectAdapterPtr adpt = communicator()->createObjectAdapter("ReplicatedAdapter"); Ice::PropertiesPtr properties = communicator()->getProperties(); Ice::ObjectPtr object = new TestI(properties); - adpt->add(object, communicator()->stringToIdentity(properties->getProperty("Ice.ProgramName"))); - adpt->add(object, communicator()->stringToIdentity(properties->getProperty("Identity"))); + adpt->add(object, Ice::stringToIdentity(properties->getProperty("Ice.ProgramName"))); + adpt->add(object, Ice::stringToIdentity(properties->getProperty("Identity"))); shutdownOnInterrupt(); try { diff --git a/cpp/test/IceGrid/replicaGroup/Service.cpp b/cpp/test/IceGrid/replicaGroup/Service.cpp index 7cf76382e6a..b87ab36faeb 100644 --- a/cpp/test/IceGrid/replicaGroup/Service.cpp +++ b/cpp/test/IceGrid/replicaGroup/Service.cpp @@ -57,8 +57,8 @@ ServiceI::start(const string& name, { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name); Ice::ObjectPtr object = new TestI(communicator->getProperties()); - adapter->add(object, communicator->stringToIdentity(name)); - adapter->add(object, communicator->stringToIdentity(communicator->getProperties()->getProperty("Identity"))); + adapter->add(object, stringToIdentity(name)); + adapter->add(object, stringToIdentity(communicator->getProperties()->getProperty("Identity"))); adapter->activate(); } diff --git a/cpp/test/IceGrid/replication/AllTests.cpp b/cpp/test/IceGrid/replication/AllTests.cpp index 09c197e612e..05a64cf0b27 100644 --- a/cpp/test/IceGrid/replication/AllTests.cpp +++ b/cpp/test/IceGrid/replication/AllTests.cpp @@ -314,17 +314,17 @@ allTests(const Ice::CommunicatorPtr& comm) Ice::EndpointSeq endpoints; ObjectInfo info; - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")); - ObjectInfo info1 = slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")); - test(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) == info); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")); + ObjectInfo info1 = slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")); + test(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) == info); test(info.type == Ice::Locator::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 2); test(endpoints[0]->toString().find("-p 12050") != string::npos); test(endpoints[1]->toString().find("-p 12051") != string::npos); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")); - test(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) == info); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")); + test(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) == info); test(info.type == IceGrid::Query::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 2); @@ -334,15 +334,15 @@ allTests(const Ice::CommunicatorPtr& comm) admin->startServer("Slave2"); slave2Admin = createAdminSession(slave2Locator, "Slave2"); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")); // We eventually need to wait here for the update of the replicated objects to propagate to the replica. int nRetry = 0; - while(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) != info && nRetry < maxRetry) + while(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) != info && nRetry < maxRetry) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(sleepTime)); ++nRetry; } - test(slave2Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) == info); + test(slave2Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) == info); test(info.type == Ice::Locator::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 3); @@ -350,15 +350,15 @@ allTests(const Ice::CommunicatorPtr& comm) test(endpoints[1]->toString().find("-p 12051") != string::npos); test(endpoints[2]->toString().find("-p 12052") != string::npos); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")); // We eventually need to wait here for the update of the replicated objects to propagate to the replica. nRetry = 0; - while(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) != info && nRetry < maxRetry) + while(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) != info && nRetry < maxRetry) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(sleepTime)); ++nRetry; } - test(slave2Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) == info); + test(slave2Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) == info); test(info.type == IceGrid::Query::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 3); @@ -369,29 +369,29 @@ allTests(const Ice::CommunicatorPtr& comm) slave2Admin->shutdown(); waitForServerState(admin, "Slave2", false); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")); // We eventually need to wait here for the update of the replicated objects to propagate to the replica. nRetry = 0; - while(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) != info && nRetry < maxRetry) + while(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) != info && nRetry < maxRetry) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(sleepTime)); ++nRetry; } - test(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Locator")) == info); + test(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Locator")) == info); test(info.type == Ice::Locator::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 2); test(endpoints[0]->toString().find("-p 12050") != string::npos); test(endpoints[1]->toString().find("-p 12051") != string::npos); - info = masterAdmin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")); + info = masterAdmin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")); nRetry = 0; - while(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) != info && nRetry < maxRetry) + while(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) != info && nRetry < maxRetry) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(sleepTime)); ++nRetry; } - test(slave1Admin->getObjectInfo(comm->stringToIdentity("RepTestIceGrid/Query")) == info); + test(slave1Admin->getObjectInfo(Ice::stringToIdentity("RepTestIceGrid/Query")) == info); test(info.type == IceGrid::Query::ice_staticId()); endpoints = info.proxy->ice_getEndpoints(); test(endpoints.size() == 2); @@ -948,7 +948,7 @@ allTests(const Ice::CommunicatorPtr& comm) property.value = "test"; server->propertySet.properties.push_back(property); ObjectDescriptor object; - object.id = comm->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -1175,7 +1175,7 @@ allTests(const Ice::CommunicatorPtr& comm) property.value = "test"; server->propertySet.properties.push_back(property); ObjectDescriptor object; - object.id = comm->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -1315,7 +1315,7 @@ allTests(const Ice::CommunicatorPtr& comm) property.value = "test"; server->propertySet.properties.push_back(property); ObjectDescriptor object; - object.id = comm->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); diff --git a/cpp/test/IceGrid/replication/Server.cpp b/cpp/test/IceGrid/replication/Server.cpp index 52126ea2c26..d4ade3c1c73 100644 --- a/cpp/test/IceGrid/replication/Server.cpp +++ b/cpp/test/IceGrid/replication/Server.cpp @@ -25,7 +25,7 @@ Server::run(int, char**) { Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI(); - adapter->add(object, communicator()->stringToIdentity(communicator()->getProperties()->getProperty("Identity"))); + adapter->add(object, Ice::stringToIdentity(communicator()->getProperties()->getProperty("Identity"))); shutdownOnInterrupt(); try { diff --git a/cpp/test/IceGrid/session/AllTests.cpp b/cpp/test/IceGrid/session/AllTests.cpp index bdd080a9ea0..e7f18c31519 100644 --- a/cpp/test/IceGrid/session/AllTests.cpp +++ b/cpp/test/IceGrid/session/AllTests.cpp @@ -269,7 +269,7 @@ public: Lock sync(*this); this->objects.erase(id); updated(updateSerial(0, "object removed `" + - current.adapter->getCommunicator()->identityToString(id) + "'")); + identityToString(id) + "'")); } int serial; @@ -1641,20 +1641,20 @@ allTests(const Ice::CommunicatorPtr& communicator) admin->addObjectWithType(obj, "::Dummy"); objectObs1->waitForUpdate(__FILE__, __LINE__); - test(objectObs1->objects.find(communicator->stringToIdentity("dummy")) != objectObs1->objects.end()); - test(objectObs1->objects[communicator->stringToIdentity("dummy")].type == "::Dummy"); - test(objectObs1->objects[communicator->stringToIdentity("dummy")].proxy == obj); + test(objectObs1->objects.find(Ice::stringToIdentity("dummy")) != objectObs1->objects.end()); + test(objectObs1->objects[Ice::stringToIdentity("dummy")].type == "::Dummy"); + test(objectObs1->objects[Ice::stringToIdentity("dummy")].proxy == obj); obj = communicator->stringToProxy("dummy:tcp -p 10000 -h localhost"); admin->updateObject(obj); objectObs1->waitForUpdate(__FILE__, __LINE__); - test(objectObs1->objects.find(communicator->stringToIdentity("dummy")) != objectObs1->objects.end()); - test(objectObs1->objects[communicator->stringToIdentity("dummy")].type == "::Dummy"); - test(objectObs1->objects[communicator->stringToIdentity("dummy")].proxy == obj); + test(objectObs1->objects.find(Ice::stringToIdentity("dummy")) != objectObs1->objects.end()); + test(objectObs1->objects[Ice::stringToIdentity("dummy")].type == "::Dummy"); + test(objectObs1->objects[Ice::stringToIdentity("dummy")].proxy == obj); admin->removeObject(obj->ice_getIdentity()); objectObs1->waitForUpdate(__FILE__, __LINE__); - test(objectObs1->objects.find(communicator->stringToIdentity("dummy")) == objectObs1->objects.end()); + test(objectObs1->objects.find(Ice::stringToIdentity("dummy")) == objectObs1->objects.end()); } catch(const Ice::UserException& ex) { diff --git a/cpp/test/IceGrid/session/PermissionsVerifier.cpp b/cpp/test/IceGrid/session/PermissionsVerifier.cpp index f2971f5309d..ec8444d7f00 100644 --- a/cpp/test/IceGrid/session/PermissionsVerifier.cpp +++ b/cpp/test/IceGrid/session/PermissionsVerifier.cpp @@ -43,7 +43,7 @@ public: { Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapterWithEndpoints( "PermissionsVerifier", "tcp -p 12002"); - adapter->add(new AdminPermissionsVerifierI, communicator()->stringToIdentity("AdminPermissionsVerifier")); + adapter->add(new AdminPermissionsVerifierI, Ice::stringToIdentity("AdminPermissionsVerifier")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; diff --git a/cpp/test/IceGrid/session/Server.cpp b/cpp/test/IceGrid/session/Server.cpp index 86abe1afd38..e118744af53 100644 --- a/cpp/test/IceGrid/session/Server.cpp +++ b/cpp/test/IceGrid/session/Server.cpp @@ -66,8 +66,8 @@ Server::run(int, char**) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); if(communicator()->getProperties()->getPropertyAsInt("AddPermissionsVerifiers") > 0) { - adapter->add(new ClientPermissionsVerifierI(), communicator()->stringToIdentity("ClientPermissionsVerifier")); - adapter->add(new SSLPermissionsVerifierI(), communicator()->stringToIdentity("SSLPermissionsVerifier")); + adapter->add(new ClientPermissionsVerifierI(), Ice::stringToIdentity("ClientPermissionsVerifier")); + adapter->add(new SSLPermissionsVerifierI(), Ice::stringToIdentity("SSLPermissionsVerifier")); } adapter->activate(); diff --git a/cpp/test/IceGrid/simple/Server.cpp b/cpp/test/IceGrid/simple/Server.cpp index 5bc7aa01d69..1ba08e9b8af 100644 --- a/cpp/test/IceGrid/simple/Server.cpp +++ b/cpp/test/IceGrid/simple/Server.cpp @@ -30,7 +30,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI(); string id = communicator()->getProperties()->getPropertyWithDefault("Identity", "test"); - adapter->add(object, communicator()->stringToIdentity(id)); + adapter->add(object, Ice::stringToIdentity(id)); shutdownOnInterrupt(); try diff --git a/cpp/test/IceGrid/update/AllTests.cpp b/cpp/test/IceGrid/update/AllTests.cpp index 9512d42b4c3..67653d1252c 100644 --- a/cpp/test/IceGrid/update/AllTests.cpp +++ b/cpp/test/IceGrid/update/AllTests.cpp @@ -106,7 +106,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = false; addProperty(server, "Server.Endpoints", "default"); ObjectDescriptor object; - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -145,7 +145,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(false); } - update.nodes[0].servers[0]->adapters[0].objects[0].id = communicator->stringToIdentity("test2"); + update.nodes[0].servers[0]->adapters[0].objects[0].id = Ice::stringToIdentity("test2"); try { admin->updateApplication(update); @@ -173,7 +173,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = false; addProperty(server, "Server.Endpoints", "default"); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("${server}"); + object.id = Ice::stringToIdentity("${server}"); object.type = "::Test::TestIntf"; adapter.objects.push_back(object); server->adapters.push_back(adapter); @@ -400,7 +400,7 @@ allTests(const Ice::CommunicatorPtr& communicator) adapter.serverLifetime = false; adapter.registerProcess = false; object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); adapter.objects.push_back(object); info.descriptor->adapters.push_back(adapter); update = empty; @@ -423,7 +423,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); info.descriptor->adapters[0].objects.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -445,7 +445,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test1"); + object.id = Ice::stringToIdentity("test1"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -463,7 +463,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test1"); + object.id = Ice::stringToIdentity("test1"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -485,7 +485,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); @@ -503,7 +503,7 @@ allTests(const Ice::CommunicatorPtr& communicator) info = admin->getServerInfo("Server"); test(info.descriptor); object = ObjectDescriptor(); - object.id = communicator->stringToIdentity("test"); + object.id = Ice::stringToIdentity("test"); info.descriptor->adapters[0].allocatables.push_back(object); update = empty; update.nodes[0].servers.push_back(info.descriptor); diff --git a/cpp/test/IceGrid/update/Server.cpp b/cpp/test/IceGrid/update/Server.cpp index 2d7f88df87d..c86e876bbf9 100644 --- a/cpp/test/IceGrid/update/Server.cpp +++ b/cpp/test/IceGrid/update/Server.cpp @@ -33,7 +33,7 @@ Server::run(int argc, char* argv[]) Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server"); Ice::ObjectPtr object = new TestI(properties); - adapter->add(object, communicator()->stringToIdentity(name)); + adapter->add(object, Ice::stringToIdentity(name)); shutdownOnInterrupt(); try diff --git a/cpp/test/IceSSL/configuration/Server.cpp b/cpp/test/IceSSL/configuration/Server.cpp index d2006021028..44c76dc5cb5 100644 --- a/cpp/test/IceSSL/configuration/Server.cpp +++ b/cpp/test/IceSSL/configuration/Server.cpp @@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", "tcp -p 12010"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - Ice::Identity id = communicator->stringToIdentity("factory"); + Ice::Identity id = Ice::stringToIdentity("factory"); adapter->add(ICE_MAKE_SHARED(ServerFactoryI), id); adapter->activate(); TEST_READY diff --git a/cpp/test/IceStorm/rep1/Sub.cpp b/cpp/test/IceStorm/rep1/Sub.cpp index 30e5cc4a22a..5192f61e548 100644 --- a/cpp/test/IceStorm/rep1/Sub.cpp +++ b/cpp/test/IceStorm/rep1/Sub.cpp @@ -74,7 +74,7 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator) return EXIT_FAILURE; } - Ice::ObjectPrx prx = adapter->add(new SingleI(), communicator->stringToIdentity(opts.optArg("id"))); + Ice::ObjectPrx prx = adapter->add(new SingleI(), stringToIdentity(opts.optArg("id"))); if(opts.isSet("unsub")) { topic->unsubscribe(prx); diff --git a/cpp/test/Slice/keyword/Client.cpp b/cpp/test/Slice/keyword/Client.cpp index 0696a6e2edb..87f1556485b 100644 --- a/cpp/test/Slice/keyword/Client.cpp +++ b/cpp/test/Slice/keyword/Client.cpp @@ -172,12 +172,12 @@ run(const Ice::CommunicatorPtr& communicator) { communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); - adapter->add(ICE_MAKE_SHARED(charI), communicator->stringToIdentity("test")); + adapter->add(ICE_MAKE_SHARED(charI), Ice::stringToIdentity("test")); adapter->activate(); cout << "Testing operation name... " << flush; _cpp_and::charPrxPtr p = ICE_UNCHECKED_CAST(_cpp_and::charPrx, - adapter->createProxy(communicator->stringToIdentity("test"))); + adapter->createProxy(Ice::stringToIdentity("test"))); p->_cpp_explicit(); cout << "ok" << endl; |