diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-02-01 18:58:45 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-02-01 18:58:45 +0000 |
commit | bb667688181f65c4661157a70be4a9344c24fcad (patch) | |
tree | 300d5d8317dd3dfae8779f16af21afb14a59be65 /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | Fixed bug #715 (diff) | |
download | ice-bb667688181f65c4661157a70be4a9344c24fcad.tar.bz2 ice-bb667688181f65c4661157a70be4a9344c24fcad.tar.xz ice-bb667688181f65c4661157a70be4a9344c24fcad.zip |
generate code rather than using templates where possible
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 587e184804d..524cf37ea0b 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -857,11 +857,18 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& { StringList md; md.push_back("cpp:array"); - string tmpParam = "__" + fixedParam; - string::size_type pos = tmpParam.find("[i]"); - if(pos != string::npos) + string tmpParam = "__"; + if(fixedParam.find("(*") == 0) { - tmpParam = tmpParam.substr(0, pos); + tmpParam += fixedParam.substr(2, fixedParam.size() - 3); + } + else if(fixedParam.find("[i]") != string::npos) + { + tmpParam += fixedParam.substr(0, fixedParam.size() - 5); + } + else + { + tmpParam += fixedParam; } out << nl << typeToString(type, md) << " " << tmpParam << ";"; out << nl << stream << deref << func << tmpParam << ");"; |