summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/BasicStream.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2003-07-25 15:45:58 +0000
committerMark Spruiell <mes@zeroc.com>2003-07-25 15:45:58 +0000
commit7d61ad3d5c820b13464cf525f18f91d0838acf5e (patch)
treefb768b77b0c2db629345e693000c1385287a4030 /cpp/src/Ice/BasicStream.cpp
parentminor Solaris fixes (diff)
downloadice-7d61ad3d5c820b13464cf525f18f91d0838acf5e.tar.bz2
ice-7d61ad3d5c820b13464cf525f18f91d0838acf5e.tar.xz
ice-7d61ad3d5c820b13464cf525f18f91d0838acf5e.zip
allow a factory for Ice::Object
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r--cpp/src/Ice/BasicStream.cpp77
1 files changed, 39 insertions, 38 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp
index 58bb8ef9b65..e8be2301b28 100644
--- a/cpp/src/Ice/BasicStream.cpp
+++ b/cpp/src/Ice/BasicStream.cpp
@@ -1093,44 +1093,45 @@ IceInternal::BasicStream::read(PatchFunc patchFunc, void* patchAddr)
{
string id;
readTypeId(id);
- if(id == Ice::Object::ice_staticId())
- {
- v = new ::Ice::Object;
- }
- else
- {
- ObjectFactoryPtr userFactory = _instance->servantFactoryManager()->find(id);
- if(userFactory)
- {
- v = userFactory->create(id);
- }
- if(!v)
- {
- ObjectFactoryPtr of = Ice::factoryTable->getObjectFactory(id);
- if(of)
- {
- v = of->create(id);
- assert(v);
- }
- }
- if(!v)
- {
- //
- // Performance sensitive, so we use lazy initialization for tracing.
- //
- if(_traceSlicing == -1)
- {
- _traceSlicing = _instance->traceLevels()->slicing;
- _slicingCat = _instance->traceLevels()->slicingCat;
- }
- if(_traceSlicing > 0)
- {
- traceSlicing("class", id, _slicingCat, _instance->logger());
- }
- skipSlice(); // Slice off this derived part -- we don't understand it.
- continue;
- }
- }
+
+ ObjectFactoryPtr userFactory = _instance->servantFactoryManager()->find(id);
+ if(userFactory)
+ {
+ v = userFactory->create(id);
+ }
+
+ if(!v && id == Ice::Object::ice_staticId())
+ {
+ v = new ::Ice::Object;
+ }
+
+ if(!v)
+ {
+ ObjectFactoryPtr of = Ice::factoryTable->getObjectFactory(id);
+ if(of)
+ {
+ v = of->create(id);
+ assert(v);
+ }
+ }
+
+ if(!v)
+ {
+ //
+ // Performance sensitive, so we use lazy initialization for tracing.
+ //
+ if(_traceSlicing == -1)
+ {
+ _traceSlicing = _instance->traceLevels()->slicing;
+ _slicingCat = _instance->traceLevels()->slicingCat;
+ }
+ if(_traceSlicing > 0)
+ {
+ traceSlicing("class", id, _slicingCat, _instance->logger());
+ }
+ skipSlice(); // Slice off this derived part -- we don't understand it.
+ continue;
+ }
IndexToPtrMap::const_iterator unmarshaledPos =
_currentReadEncaps->unmarshaledMap->insert(make_pair(index, v)).first;