From 3d5721d40940b2361d0708b81c390f490e5e06b3 Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Tue, 7 Feb 2006 14:26:23 +0000 Subject: Fixed sequences of classes --- cpp/src/Slice/CPlusPlusUtil.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp') diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 841e26d48ad..a3ec06913c4 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -730,9 +730,19 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& << typeToString(innerProxy) << ">(" << stream << ", " << fixedParam << ", " << innerScope << "__write);"; return; + } + ClassDeclPtr innerClass = ClassDeclPtr::dynamicCast(seq->type()); + if(innerClass) + { + string innerScope = fixKwd(innerClass->scope()); + out << nl << "::IceInternal::writeSequence7<" << typeStr << ", " + << typeToString(innerClass) << ">(" << stream << ", " << fixedParam << ", " + << innerScope << "__write);"; + return; } + out << nl << "::IceInternal::writeSequence2<" << typeStr << ">(" << stream << ", " << fixedParam << ");"; } @@ -926,6 +936,16 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& return; } + ClassDeclPtr innerClass = ClassDeclPtr::dynamicCast(seq->type()); + if(innerClass) + { + string innerScope = fixKwd(innerClass->scope()); + out << nl << "::IceInternal::readSequence6<" << typeStr << ">(" << stream << ", " + << fixedParam << ", " << innerClass->minWireSize() << ", " + << innerScope << "__patch__" << innerClass->name() << "Ptr);"; + return; + } + TypePtr elemType = seq->type(); out << nl << "::IceInternal::readSequence2<" << typeStr << ">(" << stream << ", " << fixedParam << ", " << elemType->minWireSize() << ", " -- cgit v1.2.3