diff options
author | Michi Henning <michi@zeroc.com> | 2007-09-24 18:53:14 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2007-09-24 18:53:14 +1000 |
commit | d957aaae622c35f27d8ba3f5c825d32ab14bace0 (patch) | |
tree | 45e587141f2a4475bb69ce853144f90d40a9b58e /cpp/src/Slice/CsUtil.cpp | |
parent | Remove unused local variables. (diff) | |
parent | Updated CHANGES file for previous commit. (diff) | |
download | ice-d957aaae622c35f27d8ba3f5c825d32ab14bace0.tar.bz2 ice-d957aaae622c35f27d8ba3f5c825d32ab14bace0.tar.xz ice-d957aaae622c35f27d8ba3f5c825d32ab14bace0.zip |
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rwxr-xr-x | cpp/src/Slice/CsUtil.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index 6db9f79c216..9a515839e42 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -130,6 +130,21 @@ Slice::CsGenerator::fixId(const string& name, int baseTypes, bool mangleCasts) } string +Slice::CsGenerator::fixId(const ContainedPtr& cont, int baseTypes, bool mangleCasts) +{ + ContainerPtr container = cont->container(); + ContainedPtr contained = ContainedPtr::dynamicCast(container); + if(contained && contained->hasMetaData("clr:property")) + { + return cont->name() + "_prop"; + } + else + { + return fixId(cont->name(), baseTypes, mangleCasts); + } +} + +string Slice::CsGenerator::typeToString(const TypePtr& type) { if(!type) @@ -519,7 +534,10 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, else { string typeS = typeToString(type); - out << nl << param << " = new " << typeS << "();"; + if(param.size() < 6 || param.substr(param.size() - 5) != "_prop") + { + out << nl << param << " = new " << typeS << "();"; + } if(streamingAPI) { out << nl << param << ".ice_read(" << stream << ");"; |