summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ReferenceFactory.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-05-09 13:07:41 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-05-09 13:07:41 +0000
commit197b6de9281b52d0b53c4b3fa3312e371b4469a9 (patch)
treebae93f8155da0770f5dd45d12ef1160ee99aed54 /cpp/src/Ice/ReferenceFactory.cpp
parentAdded identityToString and stringToIdentity to Communicator (diff)
downloadice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.tar.bz2
ice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.tar.xz
ice-197b6de9281b52d0b53c4b3fa3312e371b4469a9.zip
Fixed proxy and identity t/from string functions to use string converters
Diffstat (limited to 'cpp/src/Ice/ReferenceFactory.cpp')
-rw-r--r--cpp/src/Ice/ReferenceFactory.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp
index 776fa14e478..07e1d124a3c 100644
--- a/cpp/src/Ice/ReferenceFactory.cpp
+++ b/cpp/src/Ice/ReferenceFactory.cpp
@@ -11,7 +11,6 @@
#include <Ice/ProxyFactory.h>
#include <Ice/LocalException.h>
#include <Ice/Instance.h>
-#include <Ice/IdentityUtil.h>
#include <Ice/EndpointI.h>
#include <Ice/EndpointFactoryManager.h>
#include <Ice/RouterInfo.h>
@@ -193,7 +192,7 @@ IceInternal::ReferenceFactory::create(const string& str)
//
// Parsing the identity may raise IdentityParseException.
//
- Identity ident = stringToIdentity(idstr);
+ Identity ident = _instance->stringToIdentity(idstr);
if(ident.name.empty())
{
//
@@ -320,6 +319,15 @@ IceInternal::ReferenceFactory::create(const string& str)
throw ex;
}
+ if(_instance->initializationData().stringConverter)
+ {
+ string tmpFacet;
+ _instance->initializationData().stringConverter->fromUTF8(
+ reinterpret_cast<const Byte*>(facet.data()),
+ reinterpret_cast<const Byte*>(facet.data() + facet.size()), tmpFacet);
+ facet = tmpFacet;
+ }
+
break;
}
@@ -505,6 +513,15 @@ IceInternal::ReferenceFactory::create(const string& str)
throw ex;
}
+ if(_instance->initializationData().stringConverter)
+ {
+ string tmpAdapter;
+ _instance->initializationData().stringConverter->fromUTF8(
+ reinterpret_cast<const Byte*>(adapter.data()),
+ reinterpret_cast<const Byte*>(adapter.data() + adapter.size()), tmpAdapter);
+ adapter = tmpAdapter;
+ }
+
return create(ident, _instance->initializationData().defaultContext, facet, mode, secure, adapter,
routerInfo, locatorInfo, _instance->defaultsAndOverrides()->defaultCollocationOptimization,
_instance->defaultsAndOverrides()->defaultLocatorCacheTimeout);