commonMain.ru.casperix.signals.concrete.NotifyProperty.kt Maven / Gradle / Ivy
package ru.casperix.signals.concrete
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
class NotifyProperty(private var self: Custom, private val signal: EmptySignal) : ReadWriteProperty {
override fun getValue(thisRef: Any, property: KProperty<*>): Custom {
return self
}
override fun setValue(thisRef: Any, property: KProperty<*>, value: Custom) {
if (self == value) return
self = value
signal.set()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy