From 49b4fa8e70a76a48e82bd6364946039a620197f6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 11 Aug 2022 20:04:19 +0100 Subject: Simplified Ice::ByteSeq interfaces --- slicer/ice/serializer.cpp | 5 ++--- slicer/ice/serializer.h | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/slicer/ice/serializer.cpp b/slicer/ice/serializer.cpp index fdda2a7..eacecf8 100644 --- a/slicer/ice/serializer.cpp +++ b/slicer/ice/serializer.cpp @@ -20,17 +20,16 @@ namespace Slicer { { ic->destroy(); } - IceBlobSerializer::IceBlobSerializer(Ice::ByteSeq & b) : refblob(b) { } void IceBlobSerializer::Serialize(ModelPartForRootPtr mp) { Ice::OutputStream s(ic); mp->Write(s); - s.finished(refblob); + s.finished(blob); } - IceStreamSerializer::IceStreamSerializer(std::ostream & os) : IceBlobSerializer(blob), strm(os) { } + IceStreamSerializer::IceStreamSerializer(std::ostream & os) : strm(os) { } void IceStreamSerializer::Serialize(ModelPartForRootPtr mp) diff --git a/slicer/ice/serializer.h b/slicer/ice/serializer.h index c45ece8..db467cd 100644 --- a/slicer/ice/serializer.h +++ b/slicer/ice/serializer.h @@ -21,12 +21,10 @@ namespace Slicer { class DLL_PUBLIC IceBlobSerializer : public Serializer, protected IceBase { public: - explicit IceBlobSerializer(Ice::ByteSeq &); - void Serialize(ModelPartForRootPtr) override; - private: - Ice::ByteSeq & refblob; + protected: + Ice::ByteSeq blob; }; class DLL_PUBLIC IceStreamSerializer : public IceBlobSerializer { @@ -37,7 +35,6 @@ namespace Slicer { protected: std::ostream & strm; - Ice::ByteSeq blob; }; class DLL_PUBLIC IceBlobDeserializer : public Deserializer, protected IceBase { -- cgit v1.2.3