
IPXACT2022ScalaCases.autoConfigure.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spinalhdl-schema-gen_2.11 Show documentation
Show all versions of spinalhdl-schema-gen_2.11 Show documentation
SpinalHDL Schemetic Generator
The newest version!
// Generated by IPXACT2022scalaxb.
package IPXACT2022ScalaCases
sealed trait FormatType
object FormatType {
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: IPXACT2022scalaxb.XMLFormat[IPXACT2022ScalaCases.FormatType]): FormatType = fmt.reads(scala.xml.Text(value), Nil) match {
case Right(x: FormatType) => x
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value")
}
lazy val values: Seq[FormatType] = Seq(Bit, ByteType, Shortint, IntTypeValue2, Longint, Shortreal, Real, StringType)
}
case object Bit extends FormatType { override def toString = "bit" }
case object ByteType extends FormatType { override def toString = "byte" }
case object Shortint extends FormatType { override def toString = "shortint" }
case object IntTypeValue2 extends FormatType { override def toString = "int" }
case object Longint extends FormatType { override def toString = "longint" }
case object Shortreal extends FormatType { override def toString = "shortreal" }
case object Real extends FormatType { override def toString = "real" }
case object StringType extends FormatType { override def toString = "string" }
sealed trait SignType
object SignType {
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: IPXACT2022scalaxb.XMLFormat[IPXACT2022ScalaCases.SignType]): SignType = fmt.reads(scala.xml.Text(value), Nil) match {
case Right(x: SignType) => x
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value")
}
lazy val values: Seq[SignType] = Seq(Signed, Unsigned)
}
case object Signed extends SignType { override def toString = "signed" }
case object Unsigned extends SignType { override def toString = "unsigned" }
sealed trait DelayValueUnitType
object DelayValueUnitType {
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: IPXACT2022scalaxb.XMLFormat[IPXACT2022ScalaCases.DelayValueUnitType]): DelayValueUnitType = fmt.reads(scala.xml.Text(value), Nil) match {
case Right(x: DelayValueUnitType) => x
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value")
}
lazy val values: Seq[DelayValueUnitType] = Seq(Ps, Ns)
}
case object Ps extends DelayValueUnitType { override def toString = "ps" }
case object Ns extends DelayValueUnitType { override def toString = "ns" }
case class Enumeration(value: String,
attributes: Map[String, IPXACT2022scalaxb.DataRecord[Any]] = Map.empty) extends ComplexBaseExpressionable {
lazy val text = attributes.get("@text") map { _.as[String]}
lazy val help = attributes.get("@help") map { _.as[String]}
lazy val xmlid = attributes.get("@{http://www.w3.org/XML/1998/namespace}id") map { _.as[String]}
}
case class Choice(name: String,
enumeration: Seq[IPXACT2022ScalaCases.Enumeration] = Nil,
attributes: Map[String, IPXACT2022scalaxb.DataRecord[Any]] = Map.empty) {
lazy val xmlid = attributes.get("@{http://www.w3.org/XML/1998/namespace}id") map { _.as[String]}
}
case class Choices(choice: Seq[IPXACT2022ScalaCases.Choice] = Nil)
/** Contains the xml:id attribute used for annotating elements with a unique identifiers. See http://www.w3.org/TR/xml-id for more information.
*/
case class Idu46att(xmlid: Option[String] = None)
case class Anyu46att(attributes: Map[String, IPXACT2022scalaxb.DataRecord[Any]] = Map.empty)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy