summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/BasicStream.cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2015-12-08 11:33:42 -0500
committerJoe George <joe@zeroc.com>2015-12-08 16:09:24 -0500
commit6a43686ce26de5d2d5edf4a485ecff3a242c26b6 (patch)
treed31e4f16dc9ed6e28056a7224e045a4638955f5e /cpp/src/Ice/BasicStream.cpp
parentC++11 mapping IceDiscovery plug-in (diff)
downloadice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.tar.bz2
ice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.tar.xz
ice-6a43686ce26de5d2d5edf4a485ecff3a242c26b6.zip
ICE-6908 - Add ValueFactory
ValueFactory is a replacement for ObjectFactory (which is still available if needed). It is an interface with only one operation and can has the "delegate" metadata.
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r--cpp/src/Ice/BasicStream.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp
index d60a31abc54..7dabb6cd7e4 100644
--- a/cpp/src/Ice/BasicStream.cpp
+++ b/cpp/src/Ice/BasicStream.cpp
@@ -14,8 +14,8 @@
#include <Ice/Object.h>
#include <Ice/Proxy.h>
#include <Ice/ProxyFactory.h>
-#include <Ice/ObjectFactory.h>
-#include <Ice/ObjectFactoryManager.h>
+#include <Ice/ValueFactory.h>
+#include <Ice/ValueFactoryManager.h>
#include <Ice/UserExceptionFactory.h>
#include <Ice/LocalException.h>
#include <Ice/Protocol.h>
@@ -1855,7 +1855,7 @@ IceInternal::BasicStream::initReadEncaps()
if(!_currentReadEncaps->decoder) // Lazy initialization.
{
- ObjectFactoryManagerPtr factoryManager = _instance->servantFactoryManager();
+ ValueFactoryManagerPtr factoryManager = _instance->servantFactoryManager();
if(_currentReadEncaps->encoding == Encoding_1_0)
{
_currentReadEncaps->decoder = new EncapsDecoder10(this, _currentReadEncaps, _sliceObjects, factoryManager);
@@ -1931,7 +1931,7 @@ IceInternal::BasicStream::EncapsDecoder::newInstance(const string& typeId)
v = userFactory(typeId);
}
#else
- ObjectFactoryPtr userFactory = _servantFactoryManager->find(typeId);
+ ValueFactoryPtr userFactory = _servantFactoryManager->find(typeId);
if(userFactory)
{
v = userFactory->create(typeId);
@@ -1961,14 +1961,14 @@ IceInternal::BasicStream::EncapsDecoder::newInstance(const string& typeId)
if(!v)
{
#ifdef ICE_CPP11_MAPPING
- function<ValuePtr (const string&)> of = IceInternal::factoryTable->getObjectFactory(typeId);
+ function<ValuePtr (const string&)> of = IceInternal::factoryTable->getValueFactory(typeId);
if(of)
{
v = of(typeId);
assert(v);
}
#else
- ObjectFactoryPtr of = IceInternal::factoryTable->getObjectFactory(typeId);
+ ValueFactoryPtr of = IceInternal::factoryTable->getValueFactory(typeId);
if(of)
{
v = of->create(typeId);
@@ -2382,7 +2382,7 @@ IceInternal::BasicStream::EncapsDecoder10::readInstance()
//
if(_typeId == Object::ice_staticId())
{
- throw NoObjectFactoryException(__FILE__, __LINE__, "", mostDerivedId);
+ throw NoValueFactoryException(__FILE__, __LINE__, "", mostDerivedId);
}
v = newInstance(_typeId);
@@ -2400,7 +2400,7 @@ IceInternal::BasicStream::EncapsDecoder10::readInstance()
//
if(!_sliceObjects)
{
- throw NoObjectFactoryException(__FILE__, __LINE__, "no object factory found and object slicing is disabled",
+ throw NoValueFactoryException(__FILE__, __LINE__, "no value factory found and object slicing is disabled",
_typeId);
}
@@ -2700,8 +2700,8 @@ IceInternal::BasicStream::EncapsDecoder11::skipSlice()
{
if(_current->sliceType == ObjectSlice)
{
- throw NoObjectFactoryException(__FILE__, __LINE__,
- "no object factory found and compact format prevents "
+ throw NoValueFactoryException(__FILE__, __LINE__,
+ "no value factory found and compact format prevents "
"slicing (the sender should use the sliced format instead)",
_current->typeId);
}
@@ -2867,7 +2867,7 @@ IceInternal::BasicStream::EncapsDecoder11::readInstance(Int index, PatchFunc pat
//
if(!_sliceObjects)
{
- throw NoObjectFactoryException(__FILE__, __LINE__, "no object factory found and object slicing is disabled",
+ throw NoValueFactoryException(__FILE__, __LINE__, "no value factory found and object slicing is disabled",
_current->typeId);
}