SegmentReferenceConverter
public class SegmentReferenceConverter
extension SegmentReferenceConverter: NativeBase
extension SegmentReferenceConverter: Hashable
A SegmentReferenceConverter provides possibility to convert mapmatched instances of
SegmentReference to corresponding instances of DirectedOCMSegmentId.
Note: Loading map data can be time-consuming, so SegmentReferenceConverter can be used
in a background thread to avoid blocking the main thread. However, this class is not
thread-safe, and each instance should be used exclusively by a single thread.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Creates a new instance of this class.
Throws
InstantiationErrorIndicates what went wrong when the instantiation was attempted.Declaration
Swift
public init(sdkEngine: SDKNativeEngine) throwsParameters
sdkEngineA SDKEngine instance.
-
The
DirectedOCMSegmentIdfor providedSegmentReference.Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.30.0. Use `getLocalSegmentId(﹚` instead.") public func getOCMSegmentId(segmentReference: SegmentReference) -> DirectedOCMSegmentId?Parameters
segmentReferenceSegmentReferenceto convert.Return Value
DirectedOCMSegmentIdcorresponding to providedSegmentReference. -
The
DirectedLocalSegmentIdfor providedSegmentReference.Declaration
Swift
public func getLocalSegmentId(segmentReference: SegmentReference) -> DirectedLocalSegmentId?Parameters
segmentReferenceSegmentReferenceto convert.Return Value
DirectedLocalSegmentIdcorresponding to providedSegmentReference.