diff options
author | Michi Henning <michi@zeroc.com> | 2003-03-20 06:00:00 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-03-20 06:00:00 +0000 |
commit | 3f55b1c64c52a5f55871f62b3d7625f9e869b707 (patch) | |
tree | cf3ba1c52ec117d56c463a46a82bfb751ee74eee /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | cast fixes (diff) | |
download | ice-3f55b1c64c52a5f55871f62b3d7625f9e869b707.tar.bz2 ice-3f55b1c64c52a5f55871f62b3d7625f9e869b707.tar.xz ice-3f55b1c64c52a5f55871f62b3d7625f9e869b707.zip |
Fixed unmarshaling side for classes that have a member that is only forward
declared, but not defined.
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index f0d77d96fe1..6909df3d44d 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -422,14 +422,13 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& if(cl) { out << sb; + string scope = fixKwd(cl->scope()); if(marshal) { - string scope = fixKwd(cl->scope()); out << nl << scope << "__write(" << stream << ", " << fixedParam << ");"; } else { - out << nl << "::Ice::ObjectPtr " << obj << ';'; ClassDefPtr def = cl->definition(); string factory; string type; @@ -445,8 +444,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& factory = "0"; type = "\"\""; } - out << nl << stream << deref << func << type << ", " << factory << ", " << obj << ");"; - out << nl << fixedParam << " = " << fixKwd(cl->scoped()) << "Ptr::dynamicCast(" << obj << ");"; + out << nl << scope << "__read(" << stream << ", " << type << ", " << factory << ", " << fixedParam << ");"; } out << eb; @@ -640,16 +638,15 @@ Slice::writeGenericMarshalUnmarshalCode(Output& out, const TypePtr& type, const ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type); if(cl) { + string scope = fixKwd(cl->scope()); out << sb; if(marshal) { - string scope = fixKwd(cl->scope()); out << nl << scope << "__" << streamFunc << "Object(" << stream << ", " << tagName << ", " << fixedParam << ");"; } else { - out << nl << "::Ice::ObjectPtr " << obj << ';'; ClassDefPtr def = cl->definition(); string factory; string type; @@ -665,9 +662,8 @@ Slice::writeGenericMarshalUnmarshalCode(Output& out, const TypePtr& type, const factory = "0"; type = "\"\""; } - out << nl << obj << " = " << stream << deref << streamFunc << "Object(" << tagName << ", " - << type << ", " << factory << ");"; - out << nl << fixedParam << " = " << fixKwd(cl->scoped()) << "Ptr::dynamicCast(" << obj << ");"; + out << nl << scope << "__" << streamFunc << "Object(" << stream << ", " << tagName << ", " + << type << ", " << factory << ", " << fixedParam << ");"; } out << eb; |