task axis delegation

This commit is contained in:
Mark Harrah 2011-05-23 08:13:13 -04:00
parent 3cc8c52dea
commit dd5177bc2b
1 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import Types._
sealed trait AttributeKey[T] {
def label: String
def description: Option[String]
def extend: Seq[AttributeKey[_]]
override final def toString = label
}
object AttributeKey
@ -18,10 +19,17 @@ object AttributeKey
def apply[T](name: String): AttributeKey[T] = new AttributeKey[T] {
def label = name
def description = None
def extend = Nil
}
def apply[T](name: String, description0: String): AttributeKey[T] = new AttributeKey[T] {
def label = name
def description = Some(description0)
def extend = Nil
}
def apply[T](name: String, description0: String, extend0: Seq[AttributeKey[_]]): AttributeKey[T] = new AttributeKey[T] {
def label = name
def description = Some(description0)
def extend = extend0
}
}