de.sciss.lucre.impl.ConstObjImpl.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lucre-core_3 Show documentation
Show all versions of lucre-core_3 Show documentation
Extension of Scala-STM, adding optional durability layer, and providing API for confluent and reactive event layers
The newest version!
/*
* ConstObjImpl.scala
* (Lucre 4)
*
* Copyright (c) 2009-2024 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
package impl
import de.sciss.serial.DataOutput
trait ConstObjImpl[T <: Txn[T], A] extends Obj[T] with Publisher[T, A] {
private[lucre] def event(slot: Int): Event[T, Any] = throw new UnsupportedOperationException
final def changed: EventLike[T, A] = DummyEvent()
final def write(out: DataOutput): Unit = {
out.writeInt(tpe.typeId)
out.writeByte(3)
id.write(out)
writeData(out)
}
final def dispose()(implicit tx: T): Unit = id.dispose()
protected def writeData(out: DataOutput): Unit
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy