summaryrefslogtreecommitdiff
path: root/cpp/src/slice2swift/Gen.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2019-05-08 19:35:50 -0400
committerBernard Normier <bernard@zeroc.com>2019-05-08 19:35:50 -0400
commit466114c0edb77462973bcecf0712320c6c46cd73 (patch)
tree262373ebca6c329ea5b795f89249c373ba153a7d /cpp/src/slice2swift/Gen.cpp
parentRegenerate Xcode projects (diff)
downloadice-466114c0edb77462973bcecf0712320c6c46cd73.tar.bz2
ice-466114c0edb77462973bcecf0712320c6c46cd73.tar.xz
ice-466114c0edb77462973bcecf0712320c6c46cd73.zip
Add/remove leading underscores
Diffstat (limited to 'cpp/src/slice2swift/Gen.cpp')
-rw-r--r--cpp/src/slice2swift/Gen.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp
index fdbf9974637..c12aad10453 100644
--- a/cpp/src/slice2swift/Gen.cpp
+++ b/cpp/src/slice2swift/Gen.cpp
@@ -982,7 +982,7 @@ Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
const string swiftModule = getSwiftModule(getTopLevelModule(ContainedPtr::dynamicCast(p)));
const string name = getUnqualified(getAbsolute(p), swiftModule);
const string prx = name + "Prx";
- const string prxI = "_" + name + "PrxI";
+ const string prxI = name + "PrxI";
out << sp;
out << nl << "public protocol " << prx << ":";
@@ -1005,7 +1005,16 @@ Gen::ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
out << eb;
out << sp;
- out << nl << "public class " << prxI << ": " << getUnqualified("Ice._ObjectPrxI", swiftModule) << ", " << prx;
+ out << nl;
+ if(swiftModule == "Ice")
+ {
+ out << "internal ";
+ }
+ else
+ {
+ out << "private ";
+ }
+ out << "final class " << prxI << ": " << getUnqualified("Ice.ObjectPrxI", swiftModule) << ", " << prx;
out << sb;
out << nl << "public override class func ice_staticId() -> Swift.String";
@@ -1497,7 +1506,7 @@ Gen::ObjectExtVisitor::visitClassDefEnd(const ClassDefPtr& p)
out << sp;
out << nl;
- out << "func iceDispatch";
+ out << "func _iceDispatch";
out << spar;
out << ("incoming inS: " + getUnqualified("Ice.Incoming", swiftModule));
out << ("current: " + getUnqualified("Ice.Current", swiftModule));
@@ -1513,7 +1522,7 @@ Gen::ObjectExtVisitor::visitClassDefEnd(const ClassDefPtr& p)
const string opName = *q;
out << nl << "case \"" << opName << "\":";
out.inc();
- out << nl << "try iceD_" << opName << "(incoming: inS, current: current)";
+ out << nl << "try _iceD_" << opName << "(incoming: inS, current: current)";
out.dec();
}
out << nl << "default:";