DittoUpdateResultObjC
@objc
public class DittoUpdateResultObjC : NSObject
An Objective-C compatible equivalent to DittoUpdateResult
. Describes the result of an update
operation performed on a DittoMutableDocument
.
- set: Describes the
set
update that was performed. - removed: Describes the
remove
update that was performed. - replacedWithCounter: Describes the
replaceWithCounter
update that was performed. - incremented: Describes the
increment
update that was performed. - replacedText: Describes the
replaceText
update that was performed. - pushed: Describes the
push
update that was performed. - popped: Describes the
pop
update that was performed.
You can switch on the type
and then get the value of the result as the appropriate type using the relevant
function out of:
asSet
asRemoved
asReplacedWithCounter
asIncremented
asReplacedText
asPushed
asPopped
-
The type of the update result.
Declaration
Swift
@objc public let type: DittoUpdateResultTypeObjC
-
Get the update result’s value as a
DittoUpdateResultSet
, if it is of that type.Declaration
Swift
@objc public func asSet() -> DittoUpdateResultSet?
Return Value
A
DittoUpdateResultSet
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DittoUpdateResultRemoved
, if it is of that type.Declaration
Swift
@objc public func asRemoved() -> DittoUpdateResultRemoved?
Return Value
A
DittoUpdateResultRemoved
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DittoUpdateResultReplacedWithCounter
, if it is of that type.Declaration
Swift
@objc public func asReplacedWithCounter() -> DittoUpdateResultReplacedWithCounter?
Return Value
A
DittoUpdateResultReplacedWithCounter
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DittoUpdateResultIncremented
, if it is of that type.Declaration
Swift
@objc public func asIncremented() -> DittoUpdateResultIncremented?
Return Value
A
DittoUpdateResultIncremented
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DittoUpdateResultReplacedText
, if it is of that type.Declaration
Swift
@objc public func asReplacedText() -> DittoUpdateResultReplacedText?
Return Value
A
DittoUpdateResultReplacedText
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DittoUpdateResultPushed
, if it is of that type.Declaration
Swift
@objc public func asPushed() -> DittoUpdateResultPushed?
Return Value
A
DittoUpdateResultPushed
if the value is of that type, otherwisenil
. -
Get the update result’s value as a
DittoUpdateResultPopped
, if it is of that type.Declaration
Swift
@objc public func asPopped() -> DittoUpdateResultPopped?
Return Value
A
DittoUpdateResultPopped
if the value is of that type, otherwisenil
.