src/Pure/PIDE/document_id.scala
author wenzelm
Sun Mar 10 14:19:30 2019 +0100 (4 months ago ago)
changeset 70070 be04e9a053a7
parent 66416 96ad7d5ff613
permissions -rw-r--r--
markup and document markers for some meta data from "Dublin Core Metadata Element Set";
wenzelm@52530
     1
/*  Title:      Pure/PIDE/document_id.scala
wenzelm@52530
     2
    Author:     Makarius
wenzelm@52530
     3
wenzelm@52530
     4
Unique identifiers for document structure.
wenzelm@52530
     5
wenzelm@52530
     6
NB: ML ticks forwards > 0, JVM ticks backwards < 0.
wenzelm@52530
     7
*/
wenzelm@52530
     8
wenzelm@52530
     9
package isabelle
wenzelm@52530
    10
wenzelm@52530
    11
wenzelm@52530
    12
object Document_ID
wenzelm@52530
    13
{
wenzelm@52531
    14
  type Generic = Long
wenzelm@52531
    15
  type Version = Generic
wenzelm@52531
    16
  type Command = Generic
wenzelm@52531
    17
  type Exec = Generic
wenzelm@52530
    18
wenzelm@52531
    19
  val none: Generic = 0
wenzelm@52537
    20
  val make = Counter.make()
wenzelm@52530
    21
wenzelm@63805
    22
  def apply(id: Generic): String = Value.Long.apply(id)
wenzelm@63805
    23
  def unapply(s: String): Option[Generic] = Value.Long.unapply(s)
wenzelm@52530
    24
}