de.cau.cs.kieler.sim.kivi
Class StateActivityTrigger

java.lang.Object
  extended by de.cau.cs.kieler.core.kivi.AbstractTrigger
      extended by de.cau.cs.kieler.sim.kivi.StateActivityTrigger
All Implemented Interfaces:
ITrigger

public class StateActivityTrigger
extends AbstractTrigger

A trigger notifying the view management about the active states during simulation.

Rating red

Nested Class Summary
static class StateActivityTrigger.ActiveStates
          Contains the currently active states.
 
Constructor Summary
StateActivityTrigger()
           
 
Method Summary
static StateActivityTrigger getInstance()
          Convenience method to get the current instance of this trigger.
 void register()
          Called when the trigger is activated, e.g., if KIVi is (re-)activated or the first ICombination being fired by such a trigger is loaded.
 void step(List<List<EObject>> aS, org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor editor)
          Give map of active states to the view management.
 void synchronizedStep(List<List<EObject>> aS, org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor editor)
          Give map of active states to the view management.
 void unregister()
          Called when the trigger is deactivated, e.g., if the whole KIVi is deactivated.
 
Methods inherited from class de.cau.cs.kieler.core.kivi.AbstractTrigger
isActive, setActive, synchronizedTrigger, trigger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateActivityTrigger

public StateActivityTrigger()
Method Detail

getInstance

public static StateActivityTrigger getInstance()
Convenience method to get the current instance of this trigger.

Returns:
instance of this trigger

step

public void step(List<List<EObject>> aS,
                 org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor editor)
Give map of active states to the view management.

Parameters:
aS - map of active states
editor - the diagram editor

synchronizedStep

public void synchronizedStep(List<List<EObject>> aS,
                             org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor editor)
Give map of active states to the view management. Same as step(List, DiagramEditor), but the thread will block until all KiVi effects corresponding to this triggering have been finished executing. So this can be used to create back pressure.

Parameters:
aS - map of active states
editor - the diagram editor

register

public void register()
Description copied from class: AbstractTrigger
Called when the trigger is activated, e.g., if KIVi is (re-)activated or the first ICombination being fired by such a trigger is loaded. Registers itself where necessary.

Specified by:
register in interface ITrigger
Specified by:
register in class AbstractTrigger

unregister

public void unregister()
Description copied from class: AbstractTrigger
Called when the trigger is deactivated, e.g., if the whole KIVi is deactivated. Unregisters itself where necessary.

Specified by:
unregister in interface ITrigger
Specified by:
unregister in class AbstractTrigger