simulink

edu.tum.cs.simulink.model.stateflow
Class StateflowMachine

java.lang.Object
  extended by edu.tum.cs.simulink.model.ParameterizedElement
      extended by edu.tum.cs.simulink.model.stateflow.StateflowElementBase<P>
          extended by edu.tum.cs.simulink.model.stateflow.StateflowDeclContainerBase<IStateflowElement<?>>
              extended by edu.tum.cs.simulink.model.stateflow.StateflowMachine
All Implemented Interfaces:
IStateflowElement<IStateflowElement<?>>

public class StateflowMachine
extends StateflowDeclContainerBase<IStateflowElement<?>>

The Stateflow machine is the container element of all Stateflow elements of a Simulink model. There is only one machine per model and Stateflow machines do not have a parent element.

Version:
$Rev: 26285 $
Author:
deissenb, $Author: juergens $
Rating:
GREEN Hash: E2A81530901B4A6A0972678DFB69415F

Constructor Summary
StateflowMachine(SimulinkModel model)
          Create new machine.
StateflowMachine(StateflowMachine orig, SimulinkModel model)
          Copy constructor.
 
Method Summary
 void addChart(java.lang.String fqName, StateflowChart chart)
          Add chart to the machine.
 void addTarget(StateflowTarget target)
          Add a target.
 StateflowMachine deepClone()
          This throws a UnsupportedOperationException as the machine can only be deep cloned by cloning the SimulinkModel it belongs to.
 StateflowChart getChart(java.lang.String fqName)
          Get chart for full qualified name of the Stateflow block the chart belongs to.
  getCharts()
          Get charts of this machine.
 SimulinkModel getModel()
          Get the Simulink model this machine belongs to.
  getTargets()
          Get targets of this machine.
 void remove()
          Removes the machine from the model.
 
Methods inherited from class edu.tum.cs.simulink.model.stateflow.StateflowDeclContainerBase
addData, addEvent, getData, getEvents
 
Methods inherited from class edu.tum.cs.simulink.model.stateflow.StateflowElementBase
getParent, getStateflowId, toString
 
Methods inherited from class edu.tum.cs.simulink.model.ParameterizedElement
getDeclaredParameter, getDeclaredParameterNames, getParameter, getParameterNames, setParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateflowMachine

public StateflowMachine(SimulinkModel model)
Create new machine.


StateflowMachine

public StateflowMachine(StateflowMachine orig,
                        SimulinkModel model)
Copy constructor. This does not clone the charts as these are cloned via the StateflowBlocks they belong to.

Parameters:
orig - original machine
model - model the clone belongs to.
Method Detail

addChart

public void addChart(java.lang.String fqName,
                     StateflowChart chart)
Add chart to the machine.

Parameters:
fqName - full qualified name of the Stateflow block this chart belongs to.
chart - the chart.

addTarget

public void addTarget(StateflowTarget target)
Add a target.


deepClone

public StateflowMachine deepClone()
This throws a UnsupportedOperationException as the machine can only be deep cloned by cloning the SimulinkModel it belongs to.


getChart

public StateflowChart getChart(java.lang.String fqName)
Get chart for full qualified name of the Stateflow block the chart belongs to.


getCharts

public  getCharts()
Get charts of this machine.


getModel

public SimulinkModel getModel()
Get the Simulink model this machine belongs to.


getTargets

public  getTargets()
Get targets of this machine.


remove

public void remove()
Removes the machine from the model. The Machine can be removed from the model only after all StateflowBlocks were removed.

Specified by:
remove in interface IStateflowElement<IStateflowElement<?>>
Specified by:
remove in class StateflowElementBase<IStateflowElement<?>>

simulink

simulink - 2.7