simulink

edu.tum.cs.simulink.model
Class SimulinkElementBase

java.lang.Object
  extended by edu.tum.cs.simulink.model.ParameterizedElement
      extended by edu.tum.cs.simulink.model.SimulinkElementBase
Direct Known Subclasses:
SimulinkAnnotation, SimulinkBlock

public abstract class SimulinkElementBase
extends ParameterizedElement

Base class for Simulink elements. This is either a SimulinkAnnotation or a SimulinkBlock. The common aspect is that they have a name and a parent.

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

Constructor Summary
protected SimulinkElementBase()
          Create element.
protected SimulinkElementBase(SimulinkElementBase other)
          Create element from other element (for deep cloning).
 
Method Summary
 java.lang.String getId()
          Get id of this element.
 SimulinkModel getModel()
          Get the model this element belongs to.
 java.lang.String getName()
          Returns the name.
 SimulinkBlock getParent()
          Returns the parent block (may be null).
 void remove()
          Remove this element from the model.
protected  void setParent(SimulinkBlock parent)
          Sets the parent for this block.
 java.lang.String toString()
          Get string representation of this block.
 
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

SimulinkElementBase

protected SimulinkElementBase()
Create element.


SimulinkElementBase

protected SimulinkElementBase(SimulinkElementBase other)
Create element from other element (for deep cloning).

Method Detail

getId

public java.lang.String getId()
Get id of this element.


getModel

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


getName

public java.lang.String getName()
Returns the name.


getParent

public SimulinkBlock getParent()
Returns the parent block (may be null).


remove

public void remove()
Remove this element from the model.


toString

public java.lang.String toString()
Get string representation of this block.

Overrides:
toString in class java.lang.Object

setParent

protected void setParent(SimulinkBlock parent)
Sets the parent for this block.

Throws:
PreconditionException - if element already has parent or the new parent is null.

simulink

simulink - 2.7