diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-06-08 14:15:20 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-06-08 14:15:20 +0000 |
commit | f85a964893e985543dd87a1da616a445130761ac (patch) | |
tree | 8a8a8a610c8740f8944faa21e00b16e9a1ed88f3 /cpp/src/Slice/VbUtil.cpp | |
parent | Fix (diff) | |
download | ice-f85a964893e985543dd87a1da616a445130761ac.tar.bz2 ice-f85a964893e985543dd87a1da616a445130761ac.tar.xz ice-f85a964893e985543dd87a1da616a445130761ac.zip |
fix for bug 774: simplify use of streaming API in templates
Diffstat (limited to 'cpp/src/Slice/VbUtil.cpp')
-rwxr-xr-x | cpp/src/Slice/VbUtil.cpp | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/cpp/src/Slice/VbUtil.cpp b/cpp/src/Slice/VbUtil.cpp index cf6ad0fa3b9..07359c1d85a 100755 --- a/cpp/src/Slice/VbUtil.cpp +++ b/cpp/src/Slice/VbUtil.cpp @@ -482,13 +482,27 @@ Slice::VbGenerator::writeMarshalUnmarshalCode(Output &out, { if(marshal) { - out << nl << param << ".write__(" << stream << ')'; + if(streamingAPI) + { + out << nl << param << ".ice_write(" << stream << ')'; + } + else + { + out << nl << param << ".write__(" << stream << ')'; + } } else { string typeS = typeToString(type); out << nl << param << " = New " << typeS; - out << nl << param << ".read__(" << stream << ")"; + if(streamingAPI) + { + out << nl << param << ".ice_read(" << stream << ")"; + } + else + { + out << nl << param << ".read__(" << stream << ")"; + } } return; } @@ -794,7 +808,14 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << stream << ".writeSize(" << param << '.' << limitID << ")"; out << nl << "For ix__ As Integer = 0 To " << param << '.' << limitID << " - 1"; out.inc(); - out << nl << param << "(ix__).write__(" << stream << ")"; + if(streamingAPI) + { + out << nl << param << "(ix__).ice_write(" << stream << ")"; + } + else + { + out << nl << param << "(ix__).write__(" << stream << ")"; + } out.dec(); out << nl << "Next"; out.dec(); @@ -831,12 +852,26 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { out << nl << param << "(ix__) = New " << typeS; } - out << nl << param << "(ix__).read__(" << stream << ")"; + if(streamingAPI) + { + out << nl << param << "(ix__).ice_read(" << stream << ")"; + } + else + { + out << nl << param << "(ix__).read__(" << stream << ")"; + } } else { out << nl << "Dim val__ As " << typeS << " = New " << typeS; - out << nl << "val__.read__(" << stream << ')'; + if(streamingAPI) + { + out << nl << "val__.ice_read(" << stream << ')'; + } + else + { + out << nl << "val__.read__(" << stream << ')'; + } out << nl << param << ".Add(val__)"; } if(!streamingAPI && type->isVariableLength()) |