BeltJNI

This class is a wrapper around a C++ belt.

This can be transformed into LiveData and Kotlin Flow (in gui module) using the asLiveData() and asFlow() methods. After you are done with the belt, you should call the close method to free the resources held in C++. After closing, any subsequent attempt to subscribe to the belt (either by calling asLiveData() or collecting on any Flow created by the asFlow() methods) will result in an exception.

NOTE: This also affects any Flow that you previously created!

NOTE: This does not affect existing subscriptions to Flows that you've previously created.

Parameters

<T>

The type on the belt. This has to match with the declaration in C++!

Constructors

Link copied to clipboard
constructor(actualType: Class<T>, ptr: Long)

Functions

Link copied to clipboard
Link copied to clipboard
open fun close()
Link copied to clipboard
open fun dispose()
Link copied to clipboard
open fun disposed(): Disposable
Link copied to clipboard
Link copied to clipboard
open fun getActualType(): Class<T>
Link copied to clipboard
open fun getBeltPtr(): Long
Link copied to clipboard
open fun isDisposed(): Boolean
Link copied to clipboard
open fun isOnMyThread(): Boolean