summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/JavaUtil.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-05-21 07:40:18 +0000
committerMichi Henning <michi@zeroc.com>2003-05-21 07:40:18 +0000
commit639318c3c26076d4fc985b27be705338ce14d001 (patch)
tree3f7d6b3bfc0945b4fa2ea59f066c67c5f0a2eddd /cpp/src/Slice/JavaUtil.cpp
parentSun C++ 5.5 port (diff)
downloadice-639318c3c26076d4fc985b27be705338ce14d001.tar.bz2
ice-639318c3c26076d4fc985b27be705338ce14d001.tar.xz
ice-639318c3c26076d4fc985b27be705338ce14d001.zip
- Fixed bugs relating to use of ends iomanipulator.
- Fixed code generation bug for dictionaries with a key type not derived from Object. - Added tests for dictionary slicing. - Restructured slicing tests to use more intuitive file names and better directory structure.
Diffstat (limited to 'cpp/src/Slice/JavaUtil.cpp')
-rw-r--r--cpp/src/Slice/JavaUtil.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp
index 3b4c45f0d7c..8986ff98b3c 100644
--- a/cpp/src/Slice/JavaUtil.cpp
+++ b/cpp/src/Slice/JavaUtil.cpp
@@ -787,7 +787,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
out << sb;
out << nl << stream << ".writeSize(" << v << ".size());";
ostringstream o;
- o << "__i" << iter << ends;
+ o << "__i" << iter;
string it = o.str();
iter++;
out << nl << "java.util.Iterator " << it << " = " << v << ".iterator();";
@@ -865,7 +865,6 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
o << "[]";
}
- o << ends;
switch(b->kind())
{
case Builtin::KindByte:
@@ -974,7 +973,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
out << nl << stream << ".writeSize(" << v << ".size());";
ostringstream o;
- o << "__i" << iter << ends;
+ o << "__i" << iter;
iter++;
string it = o.str();
out << nl << "java.util.Iterator " << it << " = " << v << ".iterator();";
@@ -1126,7 +1125,7 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
<< "++)";
out << sb;
ostringstream o;
- o << v << "[__i" << iter << "]" << ends;
+ o << v << "[__i" << iter << "]";
iter++;
writeMarshalUnmarshalCode(out, scope, seq->type(), o.str(), true, iter, false);
out << eb;
@@ -1146,9 +1145,9 @@ Slice::JavaGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
<< "++)";
out << sb;
ostringstream o;
- o << v << "[__i" << iter << "]" << ends;
+ o << v << "[__i" << iter << "]";
ostringstream patchParams;
- patchParams << v << ", __i" << iter << ends;
+ patchParams << v << ", __i" << iter;
writeMarshalUnmarshalCode(out, scope, seq->type(), o.str(), false, iter, false,
list<string>(), patchParams.str());
iter++;
@@ -1505,7 +1504,7 @@ Slice::JavaGenerator::writeGenericSequenceMarshalUnmarshalCode(Output& out,
out << sb;
out << nl << stream << ".startWriteSequence(" << name << ", " << v << ".size());";
ostringstream o;
- o << "__i" << iter << ends;
+ o << "__i" << iter;
string it = o.str();
iter++;
out << nl << "java.util.Iterator " << it << " = " << v << ".iterator();";
@@ -1584,7 +1583,6 @@ Slice::JavaGenerator::writeGenericSequenceMarshalUnmarshalCode(Output& out,
{
o << "[]";
}
- o << ends;
switch(b->kind())
{
case Builtin::KindByte:
@@ -1695,7 +1693,7 @@ Slice::JavaGenerator::writeGenericSequenceMarshalUnmarshalCode(Output& out,
{
out << nl << stream << ".startWriteSequence(" << name << ", " << v << ".size());";
ostringstream o;
- o << "__i" << iter << ends;
+ o << "__i" << iter;
iter++;
string it = o.str();
out << nl << "java.util.Iterator " << it << " = " << v << ".iterator();";
@@ -1851,7 +1849,7 @@ Slice::JavaGenerator::writeGenericSequenceMarshalUnmarshalCode(Output& out,
<< "++)";
out << sb;
ostringstream o;
- o << v << "[__i" << iter << "]" << ends;
+ o << v << "[__i" << iter << "]";
iter++;
writeGenericMarshalUnmarshalCode(out, scope, seq->type(), "\"e\"", o.str(), true, iter, false);
out << eb;
@@ -1872,7 +1870,7 @@ Slice::JavaGenerator::writeGenericSequenceMarshalUnmarshalCode(Output& out,
<< "++)";
out << sb;
ostringstream o;
- o << v << "[__i" << iter << "]" << ends;
+ o << v << "[__i" << iter << "]";
iter++;
writeGenericMarshalUnmarshalCode(out, scope, seq->type(), "\"e\"", o.str(), false, iter, false);
out << eb;