From ec35e73083a6a706cedcdf28fbe76a0eba9fe332 Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Mon, 30 Jan 2006 13:35:54 +0000 Subject: Make alternate sequence class not require template --- cpp/src/Slice/CPlusPlusUtil.cpp | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp') diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 044ede63821..b7880b4ac46 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -159,22 +159,17 @@ Slice::typeToString(const TypePtr& type, const StringList& metaData) if(seq) { string seqType = findMetaData(metaData); - if(seqType.empty()) - { - StringList l = seq->getMetaData(); - seqType = findMetaData(l); - } if(!seqType.empty()) { - TypePtr elemType = seq->type(); - string s = typeToString(elemType); if(seqType == "array") { + TypePtr elemType = seq->type(); + string s = typeToString(elemType); return "::std::pair"; } else { - return seqType + "<" + (s[0] == ':' ? " " : "") + s + ">"; + return seqType; } } else @@ -255,22 +250,17 @@ Slice::inputTypeToString(const TypePtr& type, const StringList& metaData) if(seq) { string seqType = findMetaData(metaData); - if(seqType.empty()) - { - StringList l = seq->getMetaData(); - seqType = findMetaData(l); - } if(!seqType.empty()) { - TypePtr elemType = seq->type(); - string s = typeToString(elemType); if(seqType == "array") { + TypePtr elemType = seq->type(); + string s = typeToString(elemType); return "const ::std::pair&"; } else { - return "const " + seqType + "<" + (s[0] == ':' ? " " : "") + s + ">&"; + return "const " + seqType + "&"; } } else @@ -328,16 +318,9 @@ Slice::outputTypeToString(const TypePtr& type, const StringList& metaData) if(seq) { string seqType = findMetaData(metaData); - if(seqType.empty()) - { - StringList l = seq->getMetaData(); - seqType = findMetaData(l); - } if(!seqType.empty() && seqType != "array") { - TypePtr elemType = seq->type(); - string s = typeToString(elemType); - return seqType + "<" + (s[0] == ':' ? " " : "") + s + ">&"; + return seqType + "&"; } else { -- cgit v1.2.3