de.sciss.lucre.impl.DummyTFormat.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
/*
* DummyTFormat.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.{AnyExec, Exec}
import de.sciss.serial.{DataInput, DataOutput, TFormat}
object DummyTFormat {
def apply[T <: Exec[T], A]: TFormat[T, A] = anyFmt.asInstanceOf[TFormat[T, A]]
private val anyFmt = new Impl[AnyExec, Nothing]
private class Impl[T <: Exec[T], A]
extends TFormat[T, A] {
def write(v: A, out: DataOutput): Unit = ()
def readT(in: DataInput)(implicit tx: T): A =
sys.error("DummyTFormat.readT: Operation not supported")
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy