diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-05-03 12:37:27 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-05-03 12:37:27 +0000 |
commit | 23dc847ca8457ebb0dd60d7bded53c14d97f47af (patch) | |
tree | 7ec00656d05fab426505f378044c5af918789d57 /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | Export wstringDisabled on Win32 (diff) | |
download | ice-23dc847ca8457ebb0dd60d7bded53c14d97f47af.tar.bz2 ice-23dc847ca8457ebb0dd60d7bded53c14d97f47af.tar.xz ice-23dc847ca8457ebb0dd60d7bded53c14d97f47af.zip |
Bug 2164
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 8c82abfb095..5624801b8e5 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -13,7 +13,7 @@ using namespace std; using namespace Slice; using namespace IceUtil; -bool Slice::wstringDisabled = false; +Slice::FeatureProfile Slice::featureProfile = Slice::Ice; char Slice::ToIfdef::operator()(char c) @@ -170,9 +170,16 @@ Slice::typeToString(const TypePtr& type, bool useWstring, const StringList& meta if(builtin->kind() == Builtin::KindString) { string strType = findMetaData(metaData, true); - if(!wstringDisabled && strType != "string" && (useWstring || strType == "wstring")) + if(strType != "string" && (useWstring || strType == "wstring")) { - return "::std::wstring"; + if(featureProfile == IceE) + { + return "::Ice::Wstring"; + } + else + { + return "::std::wstring"; + } } } return builtinTable[builtin->kind()]; @@ -304,9 +311,16 @@ Slice::inputTypeToString(const TypePtr& type, bool useWstring, const StringList& if(builtin->kind() == Builtin::KindString) { string strType = findMetaData(metaData, true); - if(!wstringDisabled && strType != "string" && (useWstring || strType == "wstring")) + if(strType != "string" && (useWstring || strType == "wstring")) { - return "const ::std::wstring&"; + if(featureProfile == IceE) + { + return "const ::Ice::Wstring&"; + } + else + { + return "const ::std::wstring&"; + } } } return inputBuiltinTable[builtin->kind()]; @@ -413,9 +427,16 @@ Slice::outputTypeToString(const TypePtr& type, bool useWstring, const StringList if(builtin->kind() == Builtin::KindString) { string strType = findMetaData(metaData, true); - if(!wstringDisabled && strType != "string" && (useWstring || strType == "wstring")) + if(strType != "string" && (useWstring || strType == "wstring")) { - return "::std::wstring&"; + if(featureProfile == IceE) + { + return "::Ice::Wstring&"; + } + else + { + return "::std::wstring&"; + } } } return outputBuiltinTable[builtin->kind()]; @@ -1195,7 +1216,7 @@ Slice::writeStreamMarshalUnmarshalCode(Output& out, const TypePtr& type, const s case Builtin::KindString: { string strType = findMetaData(metaData, true); - if(!wstringDisabled && strType != "string" && (useWstring || strType == "wstring")) + if(strType != "string" && (useWstring || strType == "wstring")) { if(marshal) { @@ -1426,7 +1447,7 @@ Slice::writeStreamMarshalUnmarshalCode(Output& out, const TypePtr& type, const s case Builtin::KindString: { string strType = findMetaData(seq->typeMetaData(), true); - if(!wstringDisabled && strType != "string" && (useWstring || strType == "wstring")) + if(strType != "string" && (useWstring || strType == "wstring")) { if(marshal) { @@ -1575,11 +1596,6 @@ Slice::findMetaData(const StringList& metaData, bool inParam) bool Slice::inWstringModule(const SequencePtr& seq) { - if(wstringDisabled) - { - return false; - } - ContainerPtr cont = seq->container(); while(cont) { |