summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-10-22 14:14:10 +0000
committerMarc Laukien <marc@zeroc.com>2001-10-22 14:14:10 +0000
commitba88e06fd6d4a10394913697033b5858773946f7 (patch)
treef80f306006c885eff2370450170df8731bf5b753 /cpp/src/Slice/CPlusPlusUtil.cpp
parentfixes for STLport-4.5 (diff)
downloadice-ba88e06fd6d4a10394913697033b5858773946f7.tar.bz2
ice-ba88e06fd6d4a10394913697033b5858773946f7.tar.xz
ice-ba88e06fd6d4a10394913697033b5858773946f7.zip
removed truncation feature
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index 2f66f9fcbab..3ca1969af42 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -304,25 +304,29 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
if (marshal)
{
out << nl << "::Ice::ObjectPtr " << obj << " = " << param << ';';
- out << nl << stream << deref << "write(" << obj << ");";
+ out << nl << stream << deref << func << obj << ");";
}
else
{
+ out << nl << "::Ice::ObjectPtr " << obj << ';';
ClassDefPtr def = cl->definition();
if (def && !def->isAbstract())
{
- out << nl << "::Ice::ObjectPtr " << obj << " = new " << cl->scoped() << ';';
+ out << nl << "if (" << stream << deref << func << cl->scoped() << "::__classIds[0], " << obj << "))";
+ out << sb;
+ out << nl << param << " = " << cl->scoped() << "Ptr::dynamicCast(" << obj << ");";
+ out << eb;
+ out << nl << "else";
+ out << sb;
+ out << nl << param << " = new " << cl->scoped() << ';';
+ out << nl << param << "->__" << func << stream << ");";
+ out << eb;
}
else
{
- out << nl << "::Ice::ObjectPtr " << obj << ';';
+ out << nl << stream << deref << func << "\"\"," << obj << ");";
+ out << nl << param << " = " << cl->scoped() << "Ptr::dynamicCast(" << obj << ");";
}
- out << nl << stream << deref << "read(" << obj << ", " << cl->scoped() << "::__classIds[0]);";
- out << nl << param << " = " << cl->scoped() << "Ptr::dynamicCast(" << obj << ");";
- out << nl << "if (!" << param << ')';
- out << sb;
- out << nl << "throw ::Ice::ServantUnmarshalException(__FILE__, __LINE__);";
- out << eb;
}
out << eb;