Skip to content

FlakeRepresentable

Protocol to define a domain specific Object that can be registerd with a Flake Client

swift
protocol FlakeRepresentable : AnyObject, Sendable

Overview

Since in most use cases a specific service is expected this protocol allows you to have a simpler approach to handle objects from that service. User the PropertyWrappers ReadOnlyFlakePropertyWrapper or FlakePropertyWrapper to define the Service Properties

Initializers

init(underlyingFlakeObject:)

swift
init(underlyingFlakeObject: FlakeObject)

Initialiser used by SDK

Instance Properties

objectAddress

swift
var objectAddress: Address

Direct access to the Address of the underlying Flake Object

underlyingFlakeObject

swift
var underlyingFlakeObject: FlakeObject

Access to the underlying FlakeObject

Instance Methods

bindProperties()

swift
func bindProperties()

Function used by the FlakeClient to bind settable Properties to Flake Properties

didUpdate(_😃-280ys

swift
func didUpdate([FlakePropertyProtocol])

Optional Function to hook into update lifecycle, will be triggered after updates have been propagated to all PropertyWrappers

registerForUpdates()

swift
func registerForUpdates() async throws

Function used by the FlakeClient to register FlakeRepresentable objects to receive property updates.

updateWith(_😃

swift
func updateWith([FlakePropertyProtocol])

Function used to match received changes to domain specific properties with reflection

willUpdate(_😃-5zbsu

swift
func willUpdate([FlakePropertyProtocol])

Optional Function to hook into update lifecycle, will be triggered befor any updates have been propagated to PropertyWrappers

Type Properties

objectType

swift
static var objectType: UUID

UUID of the Flake Service represented by this FlakeRepresentable