diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-03-30 16:26:59 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-03-30 16:26:59 +0000 |
commit | c54471c5be84361c1069a90e749b56d281762f6a (patch) | |
tree | 39fa040c1b1eacad73dbb56beee78dcd614f8820 /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | Added wstring support (diff) | |
download | ice-c54471c5be84361c1069a90e749b56d281762f6a.tar.bz2 ice-c54471c5be84361c1069a90e749b56d281762f6a.tar.xz ice-c54471c5be84361c1069a90e749b56d281762f6a.zip |
Added support for "cpp:type:string"
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 001419d817d..8969162f05a 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -143,7 +143,7 @@ Slice::typeToString(const TypePtr& type, bool useWstring, const StringList& meta if(builtin->kind() == Builtin::KindString) { string strType = findMetaData(metaData, true); - if(useWstring || strType == "wstring") + if(strType != "string" && (useWstring || strType == "wstring")) { return "::std::wstring"; } @@ -267,7 +267,7 @@ Slice::inputTypeToString(const TypePtr& type, bool useWstring, const StringList& if(builtin->kind() == Builtin::KindString) { string strType = findMetaData(metaData, true); - if(useWstring || strType == "wstring") + if(strType != "string" && (useWstring || strType == "wstring")) { return "const ::std::wstring&"; } @@ -381,7 +381,7 @@ Slice::outputTypeToString(const TypePtr& type, bool useWstring, const StringList if(builtin->kind() == Builtin::KindString) { string strType = findMetaData(metaData, true); - if(useWstring || strType == "wstring") + if(strType != "string" && (useWstring || strType == "wstring")) { return "::std::wstring&"; } @@ -1105,7 +1105,7 @@ Slice::writeStreamMarshalUnmarshalCode(Output& out, const TypePtr& type, const s case Builtin::KindString: { string strType = findMetaData(metaData, true); - if(useWstring || strType == "wstring") + if(strType != "string" && (useWstring || strType == "wstring")) { if(marshal) { @@ -1332,7 +1332,7 @@ Slice::writeStreamMarshalUnmarshalCode(Output& out, const TypePtr& type, const s case Builtin::KindString: { string strType = findMetaData(seq->typeMetaData(), true); - if(useWstring || strType == "wstring") + if(strType != "string" && (useWstring || strType == "wstring")) { if(marshal) { @@ -1475,6 +1475,10 @@ Slice::inWstringModule(const SequencePtr& seq) { return true; } + else if(find(metaData.begin(), metaData.end(), "cpp:type:string") != metaData.end()) + { + return false; + } cont = mod->container(); } return false; |