From d2cadef086b2a694bb33830caa1bec57fa42a3e4 Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Tue, 6 Dec 2016 14:33:03 -0500 Subject: Removed or replaced most double underscores in ObjC --- cpp/src/slice2objc/ObjCUtil.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'cpp/src/slice2objc/ObjCUtil.cpp') diff --git a/cpp/src/slice2objc/ObjCUtil.cpp b/cpp/src/slice2objc/ObjCUtil.cpp index 852af9ba2af..99f7f925098 100644 --- a/cpp/src/slice2objc/ObjCUtil.cpp +++ b/cpp/src/slice2objc/ObjCUtil.cpp @@ -207,6 +207,19 @@ Slice::ObjCGenerator::getParamId(const ContainedPtr& param) } } +string +Slice::ObjCGenerator::getParamName(const ContainedPtr& param, bool internal) +{ + if(internal) + { + return "iceP_" + param->name(); + } + else + { + return fixId(param->name()); + } +} + string Slice::ObjCGenerator::getFactoryMethod(const ContainedPtr& p, bool deprecated) { @@ -692,7 +705,7 @@ void Slice::ObjCGenerator::writeMarshalUnmarshalCode(Output &out, const TypePtr& type, const string& param, bool marshal, bool autoreleased) const { - string stream = marshal ? "os_" : "is_"; + string stream = marshal ? "ostr" : "istr"; BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); if(builtin) @@ -883,7 +896,7 @@ void Slice::ObjCGenerator::writeOptMemberMarshalUnmarshalCode(Output &out, const TypePtr& type, const string& param, bool marshal) const { - string stream = marshal ? "os_" : "is_"; + string stream = marshal ? "ostr" : "istr"; string optionalHelper; string helper; @@ -1009,11 +1022,11 @@ Slice::ObjCGenerator::writeOptParamMarshalUnmarshalCode(Output &out, const TypeP out << nl; if(marshal) { - out << "[" << helper << " writeOptional:" << param << " stream:os_ tag:" << tag << "];"; + out << "[" << helper << " writeOptional:" << param << " stream:ostr tag:" << tag << "];"; } else { - out << "[" << helper << " readOptional:&" << param << " stream:is_ tag:" << tag << "];"; + out << "[" << helper << " readOptional:&" << param << " stream:istr tag:" << tag << "];"; } return; } @@ -1021,11 +1034,11 @@ Slice::ObjCGenerator::writeOptParamMarshalUnmarshalCode(Output &out, const TypeP out << nl; if(marshal) { - out << "[" << helper << " writeOptional:" << param << " stream:os_ tag:" << tag << "];"; + out << "[" << helper << " writeOptional:" << param << " stream:ostr tag:" << tag << "];"; } else { - out << param << " = [" << helper << " readOptional:is_ tag:" << tag << "];"; + out << param << " = [" << helper << " readOptional:istr tag:" << tag << "];"; } } -- cgit v1.2.3