summaryrefslogtreecommitdiff
path: root/cpp/src/slice2objc/ObjCUtil.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-12-06 14:33:03 -0500
committerBernard Normier <bernard@zeroc.com>2016-12-06 14:33:03 -0500
commitd2cadef086b2a694bb33830caa1bec57fa42a3e4 (patch)
tree1f3a5a89626192f73b46e07e8176eb60f484035d /cpp/src/slice2objc/ObjCUtil.cpp
parentFixed for ICE-7458 - Removed escaping form double quoted strings of icegridad... (diff)
downloadice-d2cadef086b2a694bb33830caa1bec57fa42a3e4.tar.bz2
ice-d2cadef086b2a694bb33830caa1bec57fa42a3e4.tar.xz
ice-d2cadef086b2a694bb33830caa1bec57fa42a3e4.zip
Removed or replaced most double underscores in ObjC
Diffstat (limited to 'cpp/src/slice2objc/ObjCUtil.cpp')
-rw-r--r--cpp/src/slice2objc/ObjCUtil.cpp25
1 files changed, 19 insertions, 6 deletions
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
@@ -208,6 +208,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)
{
ClassDefPtr def = ClassDefPtr::dynamicCast(p);
@@ -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 << "];";
}
}