abstract class ScalaBlackBoxFactory extends AnyRef
For each instantiation of an ExtModule the engine needs a separate instance of a BlackBoxImplementation. This factory provides it.
class ExampleBBFactory extends BlackBoxFactory { override def createInstance(instanceName: String, blackBoxName: String): Option[BlackBoxImplementation] = { instanceName match { case "bb1" => Some(add(new BB1Impl)) case "bb2" => Some(add(new BB2Impl)) case "bb3" => Some(add(new BB3Impl)) case _ => throw Exception(s"ExampleBBBFactory does not know how to create " + instanceName) } } }
Example:
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- ScalaBlackBoxFactory
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new ScalaBlackBoxFactory()
Abstract Value Members
- abstract def createInstance(instanceName: String, blackBoxName: String): Option[ScalaBlackBox]
This function will be called during treadle compilation.
This function will be called during treadle compilation.
- instanceName
The name of the specific instance being created
- blackBoxName
The BlackBox implementation name
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def add(blackBox: ScalaBlackBox): ScalaBlackBox
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val boxes: HashMap[String, ScalaBlackBox]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated