summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2019-06-11 10:53:00 -0400
committerBernard Normier <bernard@zeroc.com>2019-06-11 10:53:00 -0400
commita126435b9c56ad1057c0c35b21e801a43960d02e (patch)
tree60d1f22bba91d0962630cf793babaf7b8ec0aeb0
parentBlobject dispatch fixes (diff)
downloadice-a126435b9c56ad1057c0c35b21e801a43960d02e.tar.bz2
ice-a126435b9c56ad1057c0c35b21e801a43960d02e.tar.xz
ice-a126435b9c56ad1057c0c35b21e801a43960d02e.zip
Fixed comments
-rw-r--r--swift/src/Ice/Blobject.swift2
-rw-r--r--swift/src/Ice/BlobjectAsync.swift2
-rw-r--r--swift/src/Ice/Object.swift15
3 files changed, 13 insertions, 6 deletions
diff --git a/swift/src/Ice/Blobject.swift b/swift/src/Ice/Blobject.swift
index 6aa7b4798c6..2f4075d0e13 100644
--- a/swift/src/Ice/Blobject.swift
+++ b/swift/src/Ice/Blobject.swift
@@ -24,8 +24,8 @@ public protocol Blobject {
func ice_invoke(inEncaps: Data, current: Current) throws -> (ok: Bool, outParams: Data)
}
+/// Dispatcher for Blobject servants.
public struct BlobjectDisp: Disp {
-
public let servant: Blobject
public init(_ servant: Blobject) {
diff --git a/swift/src/Ice/BlobjectAsync.swift b/swift/src/Ice/BlobjectAsync.swift
index 41ab0cae062..ecec547d910 100644
--- a/swift/src/Ice/BlobjectAsync.swift
+++ b/swift/src/Ice/BlobjectAsync.swift
@@ -25,8 +25,8 @@ public protocol BlobjectAsync {
func ice_invokeAsync(inEncaps: Data, current: Current) -> Promise<(ok: Bool, outParams: Data)>
}
+/// Dispatcher for BlobjectAsync servants.
public struct BlobjectAsyncDisp: Disp {
-
public let servant: BlobjectAsync
public init(_ servant: BlobjectAsync) {
diff --git a/swift/src/Ice/Object.swift b/swift/src/Ice/Object.swift
index 0bda967e50a..60df4b4e63f 100644
--- a/swift/src/Ice/Object.swift
+++ b/swift/src/Ice/Object.swift
@@ -4,15 +4,19 @@
import IceObjc
+/// A Dispatcher (Disp) is a helper struct used by object adapters to dispatch requests
+/// to servants. Its dispatch method should not be called directly by user applications.
public protocol Disp {
func dispatch(incoming: Incoming, current: Current) throws
}
+/// An InterfacesTraits struct describes a Slice interface.
public protocol InterfaceTraits {
static var staticIds: [String] { get }
static var staticId: String { get }
}
+/// The base class for servants.
public protocol Object {
/// Returns the Slice type ID of the most-derived interface supported by this object.
///
@@ -85,6 +89,8 @@ public extension Object {
}
}
+/// class DefaultObjectImpl provides the default implementation of Object operations (ice_id,
+/// ice_ping etc.) for a given Slice interface.
public class DefaultObjectImpl<T: InterfaceTraits>: Object {
public init() {}
@@ -105,14 +111,15 @@ public class DefaultObjectImpl<T: InterfaceTraits>: Object {
}
}
-struct ObjectDisp: Disp {
- let servant: Object
+/// Dispatcher for plain Object servants.
+public struct ObjectDisp: Disp {
+ public let servant: Object
- init(_ servant: Object) {
+ public init(_ servant: Object) {
self.servant = servant
}
- func dispatch(incoming: Incoming, current: Current) throws {
+ public func dispatch(incoming: Incoming, current: Current) throws {
switch current.operation {
case "ice_id":
try servant._iceD_ice_id(incoming: incoming, current: current)