2020-07-02 17:26:19 +00:00
|
|
|
package tf.bug.fancadegraph
|
|
|
|
|
2020-07-03 01:47:20 +00:00
|
|
|
import polymorphic._
|
2020-07-02 17:26:19 +00:00
|
|
|
import tf.bug.fancadescodec.{Metadata, Position}
|
|
|
|
|
2020-07-03 01:47:20 +00:00
|
|
|
case class Block(
|
2020-07-02 17:26:19 +00:00
|
|
|
position: Position,
|
2020-07-03 01:47:20 +00:00
|
|
|
template: Exists[Template]
|
2020-07-02 17:26:19 +00:00
|
|
|
) {
|
2020-07-03 01:47:20 +00:00
|
|
|
def metadata: Vector[Metadata] = {
|
|
|
|
val t = Exists.unwrap(template)
|
|
|
|
t.ev.encode(t.args)(position)
|
|
|
|
}
|
2020-07-02 17:26:19 +00:00
|
|
|
}
|