fr.emn.reactiveinput
Class AbstractMutableDevice

java.lang.Object
  extended byfr.emn.reactiveinput.AbstractDevice
      extended byfr.emn.reactiveinput.AbstractMutableDevice
All Implemented Interfaces:
Device, MutableDevice, Processor
Direct Known Subclasses:
DAdapter, DAutoRepeat, DChanged, DConst, DCursor, DCycle, DDelay, DDelta, DFirstThen, DFreeze, DHasSignal, DInertia, DInputRecorder, DLastValue, DLinearFunc, DMinus, DMul, DMultiOr, DPass, DPlus, DPoller, DPrint, DScript, DSignalUpdated, DSum, DSwitch, DTablet, DThreshold, DToolglass, DTyper, DVirtualUser, DWatcher

public abstract class AbstractMutableDevice
extends AbstractDevice
implements MutableDevice


Field Summary
 
Fields inherited from class fr.emn.reactiveinput.AbstractDevice
currIndex, ins, outs
 
Fields inherited from interface fr.emn.reactiveinput.Device
AUTO_PROPERTIES
 
Constructor Summary
AbstractMutableDevice(java.lang.String name)
           
 
Method Summary
protected  In addMutableIn(java.lang.String name, int type)
          Adds a mutable inSlot to the device (obligatory=false).
protected  In addMutableIn(java.lang.String name, int type, boolean obligatory)
          Adds a mutable inSlot to the device.
protected  In addMutableIn(java.lang.String name, int type, boolean obligatory, boolean dynamic)
          Adds a mutable dynamic inSlot to the device.
protected  Out addMutableOut(java.lang.String name, int type)
          Adds a mutable outSlot to the device.
protected  Out addMutableOut(java.lang.String name, int type, boolean dynamic)
          Adds a mutable dynamic outSlot to the device.
abstract  Slot[] getMutationTriggers()
          Returns the mutation triggers for this mutable device, i.e. all input or output slots that trigger a mutation when it is connected to another type.
abstract  void mutate()
          Perform a mutation on this device.
protected  void remove(Slot s)
          Removes a slot from the device.
 
Methods inherited from class fr.emn.reactiveinput.AbstractDevice
addIn, addIn, addOut, close, copy, doDisable, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, hasExternalInput, hasExternalOutput, init, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, open, setEnabled, setInfo, setInfo, setLastError, setName, update
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.emn.reactiveinput.Device
close, copy, getError, getInfo, getIns, getName, getOuts, getProperties, hasExternalInput, hasExternalOutput, isCopiable, isOpenable, open, setEnabled
 

Constructor Detail

AbstractMutableDevice

public AbstractMutableDevice(java.lang.String name)
Method Detail

addMutableIn

protected final In addMutableIn(java.lang.String name,
                                int type)
Adds a mutable inSlot to the device (obligatory=false).


addMutableIn

protected final In addMutableIn(java.lang.String name,
                                int type,
                                boolean obligatory)
Adds a mutable inSlot to the device.


addMutableIn

protected final In addMutableIn(java.lang.String name,
                                int type,
                                boolean obligatory,
                                boolean dynamic)
Adds a mutable dynamic inSlot to the device.


addMutableOut

protected final Out addMutableOut(java.lang.String name,
                                  int type)
Adds a mutable outSlot to the device.


addMutableOut

protected final Out addMutableOut(java.lang.String name,
                                  int type,
                                  boolean dynamic)
Adds a mutable dynamic outSlot to the device.


getMutationTriggers

public abstract Slot[] getMutationTriggers()
Returns the mutation triggers for this mutable device, i.e. all input or output slots that trigger a mutation when it is connected to another type.

Specified by:
getMutationTriggers in interface MutableDevice

mutate

public abstract void mutate()
Perform a mutation on this device. This method is called when a connection is made (or deleted) on an entry point.

Add mutation code here.

Specified by:
mutate in interface MutableDevice

remove

protected final void remove(Slot s)
Removes a slot from the device.