diff options
author | Michi Henning <michi@zeroc.com> | 2007-10-18 12:56:48 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2007-10-18 12:56:48 +1000 |
commit | c92848b936b304e6157ef592e319c57542106d23 (patch) | |
tree | 6cc0fc99458798419828a4359df37d1246ce4fc5 /cpp/src/Slice/CsUtil.cpp | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-c92848b936b304e6157ef592e319c57542106d23.tar.bz2 ice-c92848b936b304e6157ef592e319c57542106d23.tar.xz ice-c92848b936b304e6157ef592e319c57542106d23.zip |
Changed the way the patchers work for the expected type.
Simplified code generation for UnexpectedObjectException.
Fixed a few places where the wrong Slice type IDs were
reported by that exception.
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rwxr-xr-x | cpp/src/Slice/CsUtil.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index 4290a7a1b8b..ae9ed24bc11 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -416,7 +416,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, if(isOutParam) { out << nl << "IceInternal.ParamPatcher<Ice.Object> " << param - << "_PP = new IceInternal.ParamPatcher<Ice.Object>();"; + << "_PP = new IceInternal.ParamPatcher<Ice.Object>(\"::Ice::Object\");"; out << nl << stream << ".readObject("; if(streamingAPI) { @@ -431,7 +431,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, { out << "(Ice.ReadObjectCallback)"; } - out << "new Patcher__(" << patchParams << "));"; + out << "new Patcher__(\"::Ice::Object\", " << patchParams << "));"; } } break; @@ -494,9 +494,9 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, { if(isOutParam) { - ContainedPtr contained = ContainedPtr::dynamicCast(type); out << nl << "IceInternal.ParamPatcher<" << typeToString(type) << ">" << param - << "_PP = new IceInternal.ParamPatcher<" << typeToString(type) << ">();"; + << "_PP = new IceInternal.ParamPatcher<" << typeToString(type) << ">(\"" + << cl->scoped() << "\");"; out << nl << stream << ".readObject("; if(streamingAPI) { @@ -511,7 +511,7 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, { out << "(Ice.ReadObjectCallback)"; } - out << "new Patcher__(" << patchParams << "));"; + out << "new Patcher__(\"" << cl->scoped() << "\", " << patchParams << "));"; } } return; @@ -802,7 +802,8 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { patcherName = "Sequence"; } - out << "new IceInternal." << patcherName << "Patcher<Ice.Object>(" << param << ", ix__));"; + out << "new IceInternal." << patcherName << "Patcher<Ice.Object>(\"::Ice::Object\", " + << param << ", ix__));"; } else { @@ -994,8 +995,9 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { patcherName = "Sequence"; } + string scoped = ContainedPtr::dynamicCast(type)->scoped(); out << nl << "IceInternal." << patcherName << "Patcher<" << typeS << "> spx = new IceInternal." - << patcherName << "Patcher<" << typeS << ">(" << param << ", ix__);"; + << patcherName << "Patcher<" << typeS << ">(\"" << scoped << "\", " << param << ", ix__);"; out << nl << stream << ".readObject("; if(streamingAPI) { |