DaisyOption.scala 729 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Copyright 2015 EPFL, Lausanne */

package daisy

abstract class OptionDef {
  val name: String
  val usage: String
  val description: String
}

case class FlagOptionDef(name: String, usage: String, description: String) extends OptionDef
case class NumericOptionDef(name: String, usage: String, description: String) extends OptionDef
case class ListOptionDef(name: String, usage: String, description: String) extends OptionDef




abstract class DaisyOption {
  val name: String
}

/** Boolean option, present means on. **/
case class FlagOption(name: String) extends DaisyOption
case class NumericOption(name: String, value: Int) extends DaisyOption
case class ListOption(name: String, value: List[String]) extends DaisyOption