summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/ObjCUtil.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-02-10 12:18:20 -0330
committerDwayne Boone <dwayne@zeroc.com>2015-02-10 12:18:20 -0330
commit000aa721b34d5488f31a368947dc189b39251364 (patch)
tree55637e85ebd902d143918ba86ac53ee528ebfae2 /cpp/src/Slice/ObjCUtil.cpp
parentFixed (ICE-5975) - Improve IceUtil::ThreadControl::sleep and wait primitives ... (diff)
downloadice-000aa721b34d5488f31a368947dc189b39251364.tar.bz2
ice-000aa721b34d5488f31a368947dc189b39251364.tar.xz
ice-000aa721b34d5488f31a368947dc189b39251364.zip
Added Servant Locator to ObjC
Diffstat (limited to 'cpp/src/Slice/ObjCUtil.cpp')
-rw-r--r--cpp/src/Slice/ObjCUtil.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/cpp/src/Slice/ObjCUtil.cpp b/cpp/src/Slice/ObjCUtil.cpp
index a20ae8f0e18..e449ea87539 100644
--- a/cpp/src/Slice/ObjCUtil.cpp
+++ b/cpp/src/Slice/ObjCUtil.cpp
@@ -46,12 +46,12 @@ lookupKwd(const string& name, int baseType, bool mangleCasts = false)
"typedef", "union", "unsigned", "void", "volatile", "while", "YES"
};
- static string nsObjectList[] =
+ static string nsObjectList[] =
{
"autorelease", "class", "classForCoder", "copy", "dealloc", "description", "hash", "init", "isa",
"isProxy", "mutableCopy", "release", "retain", "retainCount", "superclass", "zone"
};
- static string nsExceptionList[] =
+ static string nsExceptionList[] =
{
"callStackReturnAddresses", "name", "raise", "reason", "reserved", "userInfo",
};
@@ -478,7 +478,7 @@ Slice::ObjCGenerator::mapsToPointerType(const TypePtr& type)
BuiltinPtr builtin = BuiltinPtr::dynamicCast(type);
if(builtin)
{
- return builtin->kind() != Builtin::KindObjectProxy;
+ return builtin->kind() != Builtin::KindObjectProxy && builtin->kind() != Builtin::KindLocalObject;
}
ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type);
if(cl && cl->isInterface())
@@ -683,7 +683,7 @@ Slice::ObjCGenerator::getOptionalFormat(const TypePtr& type)
}
void
-Slice::ObjCGenerator::writeMarshalUnmarshalCode(Output &out, const TypePtr& type, const string& param,
+Slice::ObjCGenerator::writeMarshalUnmarshalCode(Output &out, const TypePtr& type, const string& param,
bool marshal, bool autoreleased) const
{
string stream = marshal ? "os_" : "is_";
@@ -828,12 +828,12 @@ Slice::ObjCGenerator::writeMarshalUnmarshalCode(Output &out, const TypePtr& type
{
if(marshal)
{
- out << nl << "[" << stream << " writeEnumerator:" << param << " min:" << en->minValue()
+ out << nl << "[" << stream << " writeEnumerator:" << param << " min:" << en->minValue()
<< " max:" << en->maxValue() << "];";
}
else
{
- out << nl << param << " = " << "[" << stream << " readEnumerator:" << en->minValue()
+ out << nl << param << " = " << "[" << stream << " readEnumerator:" << en->minValue()
<< " max:" << en->maxValue() << "];";
}
return;
@@ -856,11 +856,11 @@ Slice::ObjCGenerator::writeMarshalUnmarshalCode(Output &out, const TypePtr& type
{
out << nl << param << " = [" << name << " readRetained:" << stream << "];";
}
- }
+ }
}
void
-Slice::ObjCGenerator::writeOptMemberMarshalUnmarshalCode(Output &out, const TypePtr& type, const string& param,
+Slice::ObjCGenerator::writeOptMemberMarshalUnmarshalCode(Output &out, const TypePtr& type, const string& param,
bool marshal) const
{
string stream = marshal ? "os_" : "is_";
@@ -930,7 +930,7 @@ Slice::ObjCGenerator::writeOptMemberMarshalUnmarshalCode(Output &out, const Type
writeMarshalUnmarshalCode(out, type, param, marshal, false);
return;
}
- else
+ else
{
optionalHelper = "ICEFixedSequenceOptionalHelper";
}
@@ -964,7 +964,7 @@ Slice::ObjCGenerator::writeOptMemberMarshalUnmarshalCode(Output &out, const Type
}
void
-Slice::ObjCGenerator::writeOptParamMarshalUnmarshalCode(Output &out, const TypePtr& type, const string& param,
+Slice::ObjCGenerator::writeOptParamMarshalUnmarshalCode(Output &out, const TypePtr& type, const string& param,
int tag, bool marshal) const
{
string helper;
@@ -1195,7 +1195,7 @@ Slice::ObjCGenerator::MetaDataVisitor::validate(const ContainedPtr& cont)
for(p = meta.begin(); p != meta.end(); ++p)
{
const string prefix = "prefix:";
- string name;
+ string name;
if(p->substr(_objcPrefix.size(), prefix.size()) == prefix)
{
foundPrefix = true;