summaryrefslogtreecommitdiff
path: root/cpp/src/FreezeScript/Data.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-04-12 19:39:53 +0000
committerMark Spruiell <mes@zeroc.com>2004-04-12 19:39:53 +0000
commite9fb104368ac5aa34d0901b22af01e881237b094 (patch)
tree24becd70eac8666968a19475418047bf25ab6384 /cpp/src/FreezeScript/Data.cpp
parentSwitched to a single database file with multiple databases (diff)
downloadice-e9fb104368ac5aa34d0901b22af01e881237b094.tar.bz2
ice-e9fb104368ac5aa34d0901b22af01e881237b094.tar.xz
ice-e9fb104368ac5aa34d0901b22af01e881237b094.zip
facet fixes for FreezeScript
Diffstat (limited to 'cpp/src/FreezeScript/Data.cpp')
-rw-r--r--cpp/src/FreezeScript/Data.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/cpp/src/FreezeScript/Data.cpp b/cpp/src/FreezeScript/Data.cpp
index 9c0dc9911eb..9435add2f95 100644
--- a/cpp/src/FreezeScript/Data.cpp
+++ b/cpp/src/FreezeScript/Data.cpp
@@ -32,7 +32,7 @@ public:
ObjectWriter(const ObjectDataPtr&);
- virtual void __write(IceInternal::BasicStream*, bool) const;
+ virtual void __write(IceInternal::BasicStream*) const;
virtual void __read(IceInternal::BasicStream*, bool = true);
private:
@@ -49,7 +49,7 @@ public:
ObjectReader(const DataFactoryPtr&, const Slice::TypePtr&);
- virtual void __write(IceInternal::BasicStream*, bool) const;
+ virtual void __write(IceInternal::BasicStream*) const;
virtual void __read(IceInternal::BasicStream*, bool = true);
ObjectDataPtr getValue() const;
@@ -73,7 +73,7 @@ FreezeScript::ObjectWriter::ObjectWriter(const ObjectDataPtr& value) :
}
void
-FreezeScript::ObjectWriter::__write(IceInternal::BasicStream* os, bool) const
+FreezeScript::ObjectWriter::__write(IceInternal::BasicStream* os) const
{
Slice::ClassDeclPtr decl = Slice::ClassDeclPtr::dynamicCast(_value->_type);
Slice::ClassDefPtr type;
@@ -110,7 +110,7 @@ FreezeScript::ObjectWriter::__write(IceInternal::BasicStream* os, bool) const
//
os->writeTypeId(Ice::Object::ice_staticId());
os->startWriteSlice();
- _value->_facetMap->marshal(*os);
+ os->writeSize(0); // For compatibility with the old AFM.
os->endWriteSlice();
}
@@ -129,7 +129,7 @@ FreezeScript::ObjectReader::ObjectReader(const DataFactoryPtr& factory, const Sl
}
void
-FreezeScript::ObjectReader::__write(IceInternal::BasicStream*, bool) const
+FreezeScript::ObjectReader::__write(IceInternal::BasicStream*) const
{
assert(false);
}
@@ -189,7 +189,13 @@ FreezeScript::ObjectReader::__read(IceInternal::BasicStream* is, bool rid)
}
}
is->startReadSlice();
- _value->_facetMap->unmarshal(*is);
+ // For compatibility with the old AFM.
+ Ice::Int sz;
+ is->readSize(sz);
+ if(sz != 0)
+ {
+ throw Ice::MarshalException(__FILE__, __LINE__);
+ }
is->endReadSlice();
}
@@ -2129,15 +2135,6 @@ FreezeScript::DictionaryData::getElements()
FreezeScript::ObjectData::ObjectData(const DataFactoryPtr& factory, const Slice::TypePtr& type, bool readOnly) :
Data(factory->getErrorReporter(), readOnly), _type(type), _refCount(0)
{
- //
- // Create a Data object for the facet map. We add this to the _members map so that
- // the `ice_facets' member is handled like all other members.
- //
- Slice::TypeList l = _type->unit()->lookupType("::_FacetMap", false);
- assert(!l.empty());
- _facetMap = factory->create(l.front(), readOnly);
- _members["ice_facets"] = _facetMap;
-
Slice::ClassDeclPtr decl = Slice::ClassDeclPtr::dynamicCast(type);
if(decl)
{