CSPreset

class CSPreset<PresetListItem : CSPresetItem, PresetList : CSPresetItemList<PresetListItem>>(parent: CSHasDestruct, val parentStore: CSStore, key: String, val list: PresetList, notFoundItem: (CSStore) -> PresetListItem, defaultItemId: String? = null) : CSModel, CSHasChange<Unit>

Constructors

Link copied to clipboard
constructor(parent: CSHasDestruct, parentStore: CSStore, key: String, list: PresetList, notFoundItem: (CSStore) -> PresetListItem, defaultItemId: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
override var isDestructed: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun CSHasChange<*>.actionPausedBy(preset: CSPreset<*, *>, function: () -> Unit): CSRegistration
Link copied to clipboard
fun <T : CSPresetKeyData> add(property: T): T
Link copied to clipboard
fun clear()
Link copied to clipboard
suspend fun delete(item: PresetListItem)
Link copied to clipboard
fun Preset.itemTitle(parent: CSHasRegistrationsHasDestruct, withModified: Boolean = false, process: (String) -> String = { it }): CSHasChangeValue<String>
Link copied to clipboard
fun <T> Preset.nullArrayItemProperty(parent: CSHasRegistrationsHasDestruct, key: String, values: Array<T>, default: T? = null, onChange: (value: T?) -> Unit? = null): CSListItemNullablePresetProperty<T?>
Link copied to clipboard
Link copied to clipboard
fun Preset.nullDoubleProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: Double? = null, onChange: (value: Double?) -> Unit? = null): CSDoubleNullablePresetProperty
Link copied to clipboard
fun Preset.nullFloatProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: Float? = null, onChange: (value: Float?) -> Unit? = null): CSFloatNullablePresetProperty
Link copied to clipboard
fun Preset.nullIntProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: Int? = null, onChange: (value: Int?) -> Unit? = null): CSIntNullablePresetProperty
Link copied to clipboard
fun <T> Preset.nullListItemProperty(parent: CSHasRegistrationsHasDestruct, key: String, getValues: () -> List<T>, default: T? = null, onChange: (value: T?) -> Unit? = null): CSListItemNullablePresetProperty<T?>
fun <T> Preset.nullListItemProperty(parent: CSHasRegistrationsHasDestruct, key: String, values: List<T>, default: T? = null, onChange: (value: T?) -> Unit? = null): CSListItemNullablePresetProperty<T?>
Link copied to clipboard
fun Preset.nullStringProperty(parent: CSHasRegistrationsHasDestruct, key: String, default: String? = null, onChange: (value: String?) -> Unit? = null): CSStringNullablePresetProperty
Link copied to clipboard
fun onBeforeChange(function: () -> Unit): CSRegistration
Link copied to clipboard
open override fun onChange(function: (Unit) -> Unit): CSRegistration
Link copied to clipboard
inline fun CSHasChange<*>.onChange(preset: Preset, crossinline function: Fun): CSRegistration
Link copied to clipboard
fun CSHasChange<*>.onChangePausedBy(preset: CSPreset<*, *>, function: () -> Unit): CSRegistration
Link copied to clipboard
open override fun onDestruct()
Link copied to clipboard
inline fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, noinline onChange: ArgFun<T>? = null): CSPresetProperty<T>
fun Preset.property(parent: CSHasDestruct, key: String, default: Boolean, onChange: ArgFun<Boolean>? = null): CSBooleanValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: Double, onChange: ArgFun<Double>? = null): CSDoubleValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: Float, onChange: ArgFun<Float>? = null): CSFloatValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: () -> Int, onChange: ArgFun<Int>? = null): CSIntValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, getDefault: () -> String, onChange: ArgFun<String>? = null): CSStringValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: Int, onChange: ArgFun<Int>? = null): CSIntValuePresetProperty
fun Preset.property(parent: CSHasDestruct, key: String, default: String, onChange: ArgFun<String>? = null): CSStringValuePresetProperty
inline fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, default: List<T> = emptyList(), noinline onChange: ArgFun<List<T>>? = null): CSPresetProperty<List<T>>
fun Preset.property(parent: CSHasDestruct, key: String, default: List<Int>, onChange: ArgFun<List<Int>>? = null): CSIntListValuePresetProperty
@JvmName(name = "propertyMutableList")
inline fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, default: MutableList<T> = mutableListOf(), noinline onChange: ArgFun<MutableList<T>>? = null): CSPresetProperty<MutableList<T>>
fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, type: KClass<T>, onChange: ArgFun<T>? = null): CSPresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: Array<T>, default: T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: Array<T>, defaultIndex: Int, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T : CSHasId> Preset.property(parent: CSHasDestruct, key: String, values: Array<T>, default: List<T> = emptyList(), onChange: ArgFun<List<T>>? = null): CSHasIdListValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: () -> Collection<T>, getDefault: () -> T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, getValues: () -> List<T>, default: T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, getValues: () -> List<T>, defaultIndex: Int, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: List<T>, default: T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: List<T>, getDefault: () -> T, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T> Preset.property(parent: CSHasDestruct, key: String, values: List<T>, defaultIndex: Int, onChange: ArgFun<T>? = null): CSListItemValuePresetProperty<T>
fun <T : CSHasId> Preset.property(parent: CSHasDestruct, key: String, values: List<T>, default: List<T> = emptyList(), onChange: ArgFun<List<T>>? = null): CSHasIdListValuePresetProperty<T>
fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, listType: KClass<T>, default: List<T> = emptyList(), onChange: ArgFun<List<T>>? = null): CSPresetProperty<List<T>>
@JvmName(name = "propertyMutableList")
fun <T : CSJsonObjectStore> Preset.property(parent: CSHasDestruct, key: String, listType: KClass<T>, default: MutableList<T> = mutableListOf(), onChange: ArgFun<MutableList<T>>? = null): CSPresetProperty<MutableList<T>>
Link copied to clipboard
suspend fun reload()
fun reload(data: Map<String, Any?>)
Link copied to clipboard
Link copied to clipboard
suspend fun save(item: PresetListItem)
Link copied to clipboard
suspend fun saveAsCurrent()
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String