ptolemy.domains.fsm.modal
Class Case
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.kernel.CompositeEntity
ptolemy.actor.CompositeActor
ptolemy.actor.TypedCompositeActor
ptolemy.domains.ct.kernel.CTCompositeActor
ptolemy.domains.fsm.modal.ModalModel
ptolemy.domains.fsm.modal.Case
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, CTDynamicActor, CTEventGenerator, CTStatefulActor, CTStepSizeControlActor, CTWaveformGenerator, Changeable, ChangeListener, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
Deprecated. Use ptolemy.actor.lib.hoc.Case instead.
public class Case
- extends ModalModel
An actor that executes one of several refinements depending on the
value provided by the control port-parameter. To use this,
look inside, add refinement cases, and populate them with computations.
Each refinement is a composite that is required to have its own director.
The name of the refinement is value that the control must have to
execute this refinement.
This actor always provides one case called "default". This is
the refinement that is executed if no other refinement matches
the control input. All refinements have the same ports,
and adding ports to any one refinement or to the case actor
itself results in identical ports being added to all refinements.
- Since:
- Ptolemy II 5.2
- Version:
- $Id: Case.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Edward A. Lee
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
Case(CompositeEntity container,
java.lang.String name)
Deprecated. Construct
a modal model with a name and a container. |
Method Summary |
protected void |
_addEntity(ComponentEntity entity)
Deprecated. Override the base class to create the transition associated
with this refinement if the argument is an instance of Refinement. |
private void |
_init()
Deprecated. Initialize the model with a single state. |
java.lang.Object |
clone(Workspace workspace)
Deprecated. Override the base class to ensure that the _default member
points to the default refinement. |
Methods inherited from class ptolemy.actor.CompositeActor |
_actorFiring, _actorFiring, _finishedAddEntity, _getPublishedPort, _setDirector, addActorFiringListener, addInitializable, addPiggyback, connectionsChanged, createReceivers, createSchedule, fire, getDirector, getExecutiveDirector, getManager, inferringWidths, inferWidths, initialize, inputPortList, isFireFunctional, isOpaque, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, notifyConnectivityChange, outputPortList, postfire, prefire, preinitialize, recordFiring, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, wrapup |
Methods inherited from class ptolemy.kernel.CompositeEntity |
_adjustDeferrals, _deepOpaqueEntityList, _description, _exportMoMLContents, _recordDecoratedAttributes, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allCompositeEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepEntityList, deepGetEntities, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName |
Methods inherited from class ptolemy.kernel.ComponentEntity |
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, attributeTypeChanged, clone, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
control
public PortParameter control
- Deprecated.
- The input port-parameter on which the control token is provided.
This can have any type, and is initialized with a default value
of true.
_state
protected State _state
- Deprecated.
- The one and only state.
_default
protected Refinement _default
- Deprecated.
- The default refinement.
Case
public Case(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Deprecated.
- Construct
a modal model with a name and a container.
The container argument must not be null, or a
NullPointerException will be thrown.
- Parameters:
container
- The container.name
- The name of this actor.
- Throws:
IllegalActionException
- If the container is incompatible
with this actor.
NameDuplicationException
- If the name coincides with
an actor already in the container.
clone
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
- Deprecated.
- Override the base class to ensure that the _default member
points to the default refinement.
- Overrides:
clone
in class ModalModel
- Parameters:
workspace
- The workspace for the new object.
- Returns:
- A new Case.
- Throws:
java.lang.CloneNotSupportedException
- If any of the attributes
cannot be cloned.- See Also:
NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
_addEntity
protected void _addEntity(ComponentEntity entity)
throws IllegalActionException,
NameDuplicationException
- Deprecated.
- Override the base class to create the transition associated
with this refinement if the argument is an instance of Refinement.
- Overrides:
_addEntity
in class TypedCompositeActor
- Parameters:
entity
- Entity to contain.
- Throws:
IllegalActionException
- If the entity has no name, or the
action would result in a recursive containment structure.
NameDuplicationException
- If the name collides with a name
already in the entity.
_init
private void _init()
throws IllegalActionException,
NameDuplicationException
- Deprecated.
- Initialize the model with a single state.
- Throws:
IllegalActionException
NameDuplicationException