Package org.brightify.hyperdrive.multiplatformx

Types

Link copied to clipboard
annotation class AutoFactory

Enables automatic factory generation for the annotated class, or a class containing the annotated constructor.

Link copied to clipboard
Link copied to clipboard
abstract class BaseObservableObject : ObservableObject

Base for implementing observable objects. It comes with basic operators for observable properties.

Link copied to clipboard
abstract class BaseViewModel : BaseObservableManageableObject, ManageableViewModel

This class inherits property delegates for change tracking and observing from BaseObservableManageableObject and BaseObservableObject. As a single point of interaction with the native code for both Android and iOS (and possible other platforms), view models have to provide an easy way for the native code to consume them. Thanks to the behavior described below, developers of the view models can work directly with values without asynchronicity.

Link copied to clipboard
interface CancellationToken

Implemented by classes that contain some form of cancellation logic.

Link copied to clipboard
annotation class ComputedObservable
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class EnhanceMultiplatform
Link copied to clipboard
class InterfaceLock(lifecycle: Lifecycle, group: InterfaceLock.Group = Group())

Locking for user interface operations.

Link copied to clipboard
typealias Lifecycle = LifecycleGraph.Node
Link copied to clipboard
sealed class LifecycleGraph

This class is NOT thread-safe. Attaching and detaching from scopes should be performed from the main thread.

Link copied to clipboard
interface LifecycleListener
Link copied to clipboard
interface ManageableObject

An object that can be managed and a part of the lifecycle graph.

Link copied to clipboard
interface ManageableViewModel : ObservableManageableObject
Link copied to clipboard
annotation class Managed
Link copied to clipboard
annotation class Model
Link copied to clipboard
interface ObservableManageableObject : ObservableObject, ManageableObject
Link copied to clipboard
interface ObservableObject

An observable object that provides a ChangeTracking instance.

Link copied to clipboard
annotation class Provided

Marks a constructor parameter as provided.

Link copied to clipboard
annotation class Published
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ViewModel(val observableDelegates: Array<String> = arrayOf( "published", "collected", "collectedFlatMap", "collectedFlatMapLatest", "binding", "managed", "managedList", ))

Enables generating enhancements for the annotated class.

Functions

Link copied to clipboard
fun LifecycleGraph.Root.attachToMainScope(): CancellationToken
fun LifecycleGraph.Root.attachToMainScope(unhandledExceptionHandler: (CoroutineContext, Throwable) -> Unit): CancellationToken
Link copied to clipboard
fun <T : Any> NonNullFlowWrapper<T>.collectWhileAttached(lifecycle: Lifecycle, collection: (T) -> Unit)
Link copied to clipboard
fun Iterable<CancellationToken>.concat(): CancellationToken

Combine all contained CancellationToken instances into one.

Link copied to clipboard
fun LifecycleRoot(owner: Any? = null): LifecycleGraph.Root

Properties

Link copied to clipboard
val MultiplatformGlobalScope: CoroutineScope