summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-03-30 17:11:58 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-03-30 17:11:58 +0000
commit90d9a4483865ce1e1ef30f7071468c0f14506232 (patch)
tree769e85aba0f925e54510fa14242986eead6dc7da /cpp/src/Slice/CPlusPlusUtil.cpp
parentAdded support for "cpp:type:string" (diff)
downloadice-90d9a4483865ce1e1ef30f7071468c0f14506232.tar.bz2
ice-90d9a4483865ce1e1ef30f7071468c0f14506232.tar.xz
ice-90d9a4483865ce1e1ef30f7071468c0f14506232.zip
Allow AMD to use arrays and ranges for return and out paramaters in
ice_response()
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp40
1 files changed, 13 insertions, 27 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index 8969162f05a..61bfef813bd 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -244,7 +244,7 @@ Slice::returnTypeToString(const TypePtr& type, bool useWstring, const StringList
}
string
-Slice::inputTypeToString(const TypePtr& type, bool useWstring, const StringList& metaData, bool allowArray)
+Slice::inputTypeToString(const TypePtr& type, bool useWstring, const StringList& metaData)
{
static const char* inputBuiltinTable[] =
{
@@ -302,40 +302,26 @@ Slice::inputTypeToString(const TypePtr& type, bool useWstring, const StringList&
if(seqType == "array" || seqType == "range:array")
{
- if(allowArray)
- {
- TypePtr elemType = seq->type();
- string s = typeToString(elemType, inWstringModule(seq), seq->typeMetaData());
- return "const ::std::pair<const " + s + "*, const " + s + "*>&";
- }
- else
- {
- return "const " + fixKwd(seq->scoped()) + "&";
- }
+ TypePtr elemType = seq->type();
+ string s = typeToString(elemType, inWstringModule(seq), seq->typeMetaData());
+ return "const ::std::pair<const " + s + "*, const " + s + "*>&";
}
else if(seqType.find("range") == 0)
{
- if(allowArray)
+ string s;
+ if(seqType.find("range:") == 0)
{
- string s;
- if(seqType.find("range:") == 0)
- {
- s = seqType.substr(strlen("range:"));
- }
- else
- {
- s = fixKwd(seq->scoped());
- }
- if(s[0] == ':')
- {
- s = " " + s;
- }
- return "const ::std::pair<" + s + "::const_iterator, " + s + "::const_iterator>&";
+ s = seqType.substr(strlen("range:"));
}
else
{
- return "const " + fixKwd(seq->scoped()) + "&";
+ s = fixKwd(seq->scoped());
+ }
+ if(s[0] == ':')
+ {
+ s = " " + s;
}
+ return "const ::std::pair<" + s + "::const_iterator, " + s + "::const_iterator>&";
}
else
{