end
class OptionText
-special Option
+ super Option
init(text: String) do init_opt(text, null, null)
redef fun pretty(off) do return to_s
end
class OptionBool
-special Option
+ super Option
redef type VALUE: Bool
init(help: String, names: String...) do init_opt(help, false, names)
end
class OptionCount
-special Option
+ super Option
redef type VALUE: Int
init(help: String, names: String...) do init_opt(help, 0, names)
# Option with one mandatory parameter
class OptionParameter
-special Option
+ super Option
protected fun convert(str: String): VALUE is abstract
redef fun read_param(it)
end
class OptionString
-special OptionParameter
+ super OptionParameter
redef type VALUE: nullable String
init(help: String, names: String...) do init_opt(help, null, names)
end
class OptionEnum
-special OptionParameter
+ super OptionParameter
redef type VALUE: Int
var _values: Array[String]
end
class OptionInt
-special OptionParameter
+ super OptionParameter
redef type VALUE: Int
init(help: String, default: Int, names: String...) do init_opt(help, default, names)
end
class OptionArray
-special OptionParameter
+ super OptionParameter
redef type VALUE: Array[String]
init(help: String, names: String...)