static class BooleanSignalSourceChooser.OfEnum<E extends Enum<E>> extends BooleanSignalSourceChooser
BooleanSignalSourceChooser.OfEnum<E extends Enum<E>>, BooleanSignalSourceChooser.OfEnumInt<E extends Enum<E>>, BooleanSignalSourceChooser.OfInt| Constructor and Description |
|---|
OfEnum(SignalSource<E> selector,
EnumMap<E,? extends BooleanSignalSource> cases) |
| Modifier and Type | Method and Description |
|---|---|
protected BooleanSignalSource |
choose()
Returns the chosen the input signal source for the current
value.
|
protected Consumer<CompilationContext> |
compileConvertToInt()
Returns a code generator for converting a value that represents the current
selection to an index of type
int. |
protected Map<Integer,Consumer<CompilationContext>> |
getCases(VariableContext.Variable result)
Returns a map with
int-indexed code generators for branches to
choose from. |
protected SignalSource<E> |
getSelector()
Returns an entity that can be compiled to code that outputs a
value that represents the current selection.
|
compileDefaultValue, getAsBooleanalwaysThrow, compileDataFlow, compileOrDefaultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, becoming, ceasing, choose, choose, choose, choose, choose, choose, choose, choose, choose, choose, choose, clock, compileDataFlow, compileMainSignalSource, constant, delayed, delayed, delayedFeedback, delayedFeedback, getConstantAsBoolean, getValueClass, guard, hasConstantAsBoolean, invariant, map, not, or, power, probe, publishStoredValueVariable, relateWith, sampleAndHold, stored, xor, zipWithcompileDataFlowTo, hasDataFlowIOOfEnum(SignalSource<E> selector, EnumMap<E,? extends BooleanSignalSource> cases)
protected BooleanSignalSource choose()
BooleanSignalSourceChooserchoose in class BooleanSignalSourceChooserprotected SignalSource<E> getSelector()
AbstractSignalSourceChoosergetSelector in class AbstractSignalSourceChooserCompilableDataFlow.getValueClass()protected Map<Integer,Consumer<CompilationContext>> getCases(VariableContext.Variable result)
AbstractSignalSourceChooserint-indexed code generators for branches to
choose from. The returned map should contain an entry for every valid
index. The method AbstractSignalSourceChooser.compileOrDefault(eu.bandm.tools.lljava.live.VariableContext.Variable, eu.bandm.sig.adlib2.compile.CompilableDataFlow) may be used to populate the map.getCases in class AbstractSignalSourceChooserresult - the variable that all branches should output toAbstractSignalSourceChooser.compileConvertToInt()protected Consumer<CompilationContext> compileConvertToInt()
AbstractSignalSourceChooserint.compileConvertToInt in class AbstractSignalSourceChooser