diff options
Diffstat (limited to 'swift/src')
-rw-r--r-- | swift/src/Ice/IceSwift.h | 10 | ||||
-rw-r--r-- | swift/src/Ice/UnknownSlicedValue.swift | 13 | ||||
-rw-r--r-- | swift/src/Ice/Value.swift | 39 |
3 files changed, 32 insertions, 30 deletions
diff --git a/swift/src/Ice/IceSwift.h b/swift/src/Ice/IceSwift.h index 03fe0c41b9a..a3f63e82da4 100644 --- a/swift/src/Ice/IceSwift.h +++ b/swift/src/Ice/IceSwift.h @@ -1,17 +1,9 @@ // -// Ice.h -// Ice -// -// Created by Joe George on 10/5/18. -// Copyright © 2018 ZeroC. All rights reserved. +// Copyright (c) ZeroC, Inc. All rights reserved. // #import <Cocoa/Cocoa.h> -//! Project version number for Ice. FOUNDATION_EXPORT double IceVersionNumber; - -//! Project version string for Ice. FOUNDATION_EXPORT const unsigned char IceVersionString[]; -// In this header, you should import all the public headers of your framework using statements like #import <Ice/PublicHeader.h> diff --git a/swift/src/Ice/UnknownSlicedValue.swift b/swift/src/Ice/UnknownSlicedValue.swift index 9a8981f939e..95534d4705c 100644 --- a/swift/src/Ice/UnknownSlicedValue.swift +++ b/swift/src/Ice/UnknownSlicedValue.swift @@ -11,6 +11,19 @@ * Unknown sliced value holds an instance of an unknown Slice class type. **/ public final class UnknownSlicedValue: Value { + public func iceReadImpl(from _: InputStream) throws { + // TODO: + } + + public func iceWriteImpl(to _: OutputStream) { + // TODO: + } + + public static func ice_staticId() -> String { + // TODO: + return "" + } + private let unknownTypeId: String private var slicedData: SlicedData? diff --git a/swift/src/Ice/Value.swift b/swift/src/Ice/Value.swift index 43d3b4f7b5d..d29a90d3030 100644 --- a/swift/src/Ice/Value.swift +++ b/swift/src/Ice/Value.swift @@ -13,37 +13,34 @@ public protocol Value: StreamableValue, AnyObject { func ice_postUnmarshal() func ice_getSlicedData() -> SlicedData? - func iceReadImpl(from: InputStream) throws; - func iceWriteImpl(to: OutputStream); + func iceReadImpl(from: InputStream) throws + func iceWriteImpl(to: OutputStream) static func ice_staticId() -> String } public extension Value { - - public func ice_id() -> String { + func ice_id() -> String { return Self.ice_staticId() } - public func ice_preMarshal() { - } + func ice_preMarshal() {} - public func ice_postUnmarshal() { - } - - public func ice_getSlicedData() -> SlicedData?{ - return nil; + func ice_postUnmarshal() {} + + func ice_getSlicedData() -> SlicedData? { + return nil } - - public func ice_read(from: InputStream) throws { - from.startValue(); - try self.iceReadImpl(from: from); - _ = try from.endValue(preserve: false); + + func ice_read(from: InputStream) throws { + from.startValue() + try iceReadImpl(from: from) + _ = try from.endValue(preserve: false) } - - public func ice_write(to: OutputStream) { - to.startValue(data: nil); - self.iceWriteImpl(to: to); - to.endValue(); + + func ice_write(to: OutputStream) { + to.startValue(data: nil) + iceWriteImpl(to: to) + to.endValue() } } |