de.sciss.lucre.impl.MutableImpl.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lucre-base_sjs1_2.13 Show documentation
Show all versions of lucre-base_sjs1_2.13 Show documentation
Extension of Scala-STM, adding optional durability layer, and providing API for confluent and reactive event layers
/*
* MutableImpl.scala
* (Lucre 4)
*
* Copyright (c) 2009-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* [email protected]
*/
package de.sciss.lucre.impl
import de.sciss.lucre.{Exec, Mutable}
import de.sciss.serial.DataOutput
trait MutableImpl[T <: Exec[T]] extends Mutable[T] {
final override def dispose()(implicit tx: T): Unit = {
id.dispose()
disposeData()
}
final override def write(out: DataOutput): Unit = {
id.write(out)
writeData(out)
}
protected def disposeData()(implicit tx: T): Unit
protected def writeData(out: DataOutput): Unit
override def toString = s"${super.toString}$id"
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy