summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/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 /cppe/src/IceE/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 'cppe/src/IceE/ReferenceFactory.cpp')
-rw-r--r--cppe/src/IceE/ReferenceFactory.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/cppe/src/IceE/ReferenceFactory.cpp b/cppe/src/IceE/ReferenceFactory.cpp
index 38188992608..2d9fdee24e4 100644
--- a/cppe/src/IceE/ReferenceFactory.cpp
+++ b/cppe/src/IceE/ReferenceFactory.cpp
@@ -10,7 +10,6 @@
#include <IceE/ReferenceFactory.h>
#include <IceE/LocalException.h>
#include <IceE/Instance.h>
-#include <IceE/IdentityUtil.h>
#include <IceE/Endpoint.h>
#include <IceE/EndpointFactory.h>
#ifdef ICEE_HAS_ROUTER
@@ -210,7 +209,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())
{
@@ -338,6 +337,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;
}
@@ -541,6 +549,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;
+ }
+
#ifdef ICEE_HAS_ROUTER
return create(ident, _instance->initializationData().defaultContext, facet, mode, secure, adapter,
routerInfo, locatorInfo);