diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-02-13 00:47:50 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-02-13 00:47:50 +0000 |
commit | 8df1c85f81b1586570c47060a6d8ae7eaf6d33b9 (patch) | |
tree | 77768fb509cf428dc90a34872970eeddedd4122e /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | minor fixes (diff) | |
download | ice-8df1c85f81b1586570c47060a6d8ae7eaf6d33b9.tar.bz2 ice-8df1c85f81b1586570c47060a6d8ae7eaf6d33b9.tar.xz ice-8df1c85f81b1586570c47060a6d8ae7eaf6d33b9.zip |
revising Stream.ice to remove out params
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 12b7b354958..363ad1ca391 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -496,22 +496,30 @@ Slice::writeGenericMarshalUnmarshalCode(Output& out, const TypePtr& type, const { if (builtin->kind() == Builtin::KindObject) { - streamFunc += outputBuiltinTable[builtin->kind()]; + streamFunc += outputBuiltinTable[builtin->kind()]; if (marshal) { out << nl << stream << deref << streamFunc << "(" << tagName << ", " << param << ");"; } else { - out << nl << stream << deref << streamFunc << "(" << tagName << ", ::Ice::Object::__classIds[0], 0, " - << param << ");"; + out << nl << param << " = " << stream << deref << streamFunc << "(" << tagName + << ", ::Ice::Object::__classIds[0], 0);"; } return; } else { - out << nl << stream << deref << streamFunc << outputBuiltinTable[builtin->kind()] - << "(" << tagName << ", " << param << ");"; + if (marshal) + { + out << nl << stream << deref << streamFunc << outputBuiltinTable[builtin->kind()] + << "(" << tagName << ", " << param << ");"; + } + else + { + out << nl << param << " = " << stream << deref << streamFunc << outputBuiltinTable[builtin->kind()] + << "(" << tagName << ");"; + } return; } } @@ -543,8 +551,8 @@ Slice::writeGenericMarshalUnmarshalCode(Output& out, const TypePtr& type, const factory = "0"; type = "\"\""; } - out << nl << stream << deref << streamFunc << "Object(" << tagName << ", " - << type << ", " << factory << ", " << obj << ");"; + out << nl << obj << " = " << stream << deref << streamFunc << "Object(" << tagName << ", " + << type << ", " << factory << ");"; out << nl << param << " = " << cl->scoped() << "Ptr::dynamicCast(" << obj << ");"; } out << eb; @@ -565,8 +573,16 @@ Slice::writeGenericMarshalUnmarshalCode(Output& out, const TypePtr& type, const BuiltinPtr builtin = BuiltinPtr::dynamicCast(seq->type()); if (builtin) { - out << nl << stream << deref << streamFunc << outputBuiltinTable[builtin->kind()] << "Seq(" - << tagName << ", " << param << ");"; + if (marshal) + { + out << nl << stream << deref << streamFunc << outputBuiltinTable[builtin->kind()] << "Seq(" + << tagName << ", " << param << ");"; + } + else + { + out << nl << param << " = " << stream << deref << streamFunc << outputBuiltinTable[builtin->kind()] + << "Seq(" << tagName << ");"; + } } else { |