diff options
Diffstat (limited to 'cpp/src/slice2swift/SwiftUtil.cpp')
-rw-r--r-- | cpp/src/slice2swift/SwiftUtil.cpp | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/cpp/src/slice2swift/SwiftUtil.cpp b/cpp/src/slice2swift/SwiftUtil.cpp index f41d29fe73f..f7fa3e678e5 100644 --- a/cpp/src/slice2swift/SwiftUtil.cpp +++ b/cpp/src/slice2swift/SwiftUtil.cpp @@ -62,6 +62,31 @@ replace(string s, string patt, string val) return r; } +string +opFormatTypeToString(const OperationPtr& op ) +{ + switch(op->format()) + { + case DefaultFormat: + { + return ".DefaultFormat"; + } + case CompactFormat: + { + return ".CompactFormat"; + } + case SlicedFormat: + { + return ".SlicedFormat"; + } + default: + { + assert(false); + } + } + return "???"; +} + } // @@ -460,17 +485,17 @@ SwiftGenerator::modeToString(Operation::Mode opMode) { case Operation::Normal: { - mode = "Ice.OperationMode.Normal"; + mode = ".Normal"; break; } case Operation::Nonmutating: { - mode = "Ice.OperationMode.Nonmutating"; + mode = ".Nonmutating"; break; } case Operation::Idempotent: { - mode = "Ice.OperationMode.Idempotent"; + mode = ".Idempotent"; break; } default: @@ -1491,6 +1516,12 @@ SwiftGenerator::writeProxyOperation(::IceUtilInternal::Output& out, const Operat out << "operation: \"" << op->name() << "\","; out << nl << "mode: " << modeToString(op->sendMode()) << ","; + if(op->format() != DefaultFormat) + { + out << nl << "format: " << opFormatTypeToString(op); + out << ","; + } + if(allInParams.size() > 0) { out << nl << "write: "; |