|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ptolemy.kernel.util.NamedObj ptolemy.kernel.InstantiableNamedObj ptolemy.kernel.Entity ptolemy.kernel.ComponentEntity ptolemy.domains.modal.kernel.State ptolemy.actor.gt.StateMatcher
public class StateMatcher
A matcher to match a state in an FSM controller or an event in a Ptera controller.
Red (tfeng) |
Yellow (tfeng) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary | |
---|---|
private CausalityInterface |
_causalityInterface
The causality interface, if it has been created. |
private Director |
_causalityInterfaceDirector
The director for which the causality interface was created. |
private static java.util.List<?> |
_EMPTY_LIST
An empty list. |
private static java.util.Set<Inequality> |
_EMPTY_SET
An empty set. |
private java.util.Set<java.lang.String> |
_labelSet
Cache of the label set. |
private long |
_version
The workspace version the last time when _labelSet was updated. |
GTIngredientsAttribute |
criteria
The attribute containing all the criteria in a list ( GTIngredientList ). |
GTIngredientsEditor.Factory |
editorFactory
The editor factory for ingredients in this matcher. |
GTIngredientsAttribute |
operations
The attribute containing all the operations in a list ( GTIngredientList ). |
PatternObjectAttribute |
patternObject
The attribute that specifies the name of the corresponding entity in the pattern. |
Fields inherited from class ptolemy.domains.modal.kernel.State |
---|
incomingPort, isFinalState, isInitialState, outgoingPort, refinementName, saveRefinementsInConfigurer |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
StateMatcher(CompositeEntity container,
java.lang.String name)
Construct a state with the given name contained by the specified composite entity. |
Method Summary | |
---|---|
void |
addInitializable(Initializable initializable)
Do nothing because a state matcher is not supposed to contain any initializable. |
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace. |
void |
createReceivers()
Create receivers for all necessary ports. |
void |
fire()
Do nothing. |
CausalityInterface |
getCausalityInterface()
Return a causality interface for this actor. |
GTIngredientsAttribute |
getCriteriaAttribute()
Return the attribute that stores all the criteria for this matcher. |
java.lang.String |
getDefaultIconDescription()
Return null. |
Director |
getDirector()
Return null. |
Director |
getExecutiveDirector()
Return null. |
Manager |
getManager()
Return null. |
GTIngredientsAttribute |
getOperationsAttribute()
Return the attribute that stores all the operations for this matcher. |
PatternObjectAttribute |
getPatternObjectAttribute()
Return the attribute that stores the name of the corresponding entity in the pattern of the same TransformationRule , if this entity is in
the replacement, or null otherwise. |
void |
initialize()
Do nothing. |
java.util.List<?> |
inputPortList()
Return an empty list. |
boolean |
isFireFunctional()
Return true because prefire and fire do nothing. |
boolean |
isStrict()
Return false. |
int |
iterate(int count)
Do nothing and return 0. |
java.util.Set<java.lang.String> |
labelSet()
Return the set of names of ingredients contained in this entity that can be resolved. |
boolean |
match(NamedObj object)
Return true if the given object is an instance of State (either the one in the deprecated FSM domain or the one in modal model since Ptolemy 8.0). |
Receiver |
newReceiver()
Return null. |
java.util.List<?> |
outputPortList()
Return an empty list. |
boolean |
postfire()
Do nothing and return false. |
boolean |
prefire()
Do nothing and return false. |
void |
preinitialize()
Do nothing. |
void |
removeInitializable(Initializable initializable)
Do nothing. |
void |
setContainer(CompositeEntity container)
Specify the container, adding the entity to the list of entities in the container. |
void |
stop()
Do nothing. |
void |
stopFire()
Do nothing. |
void |
terminate()
Do nothing. |
java.util.Set<Inequality> |
typeConstraints()
Return an empty list. |
void |
updateAppearance(GTIngredientsAttribute attribute)
Update appearance of this entity. |
void |
valueChanged(Settable settable)
React to the fact that the specified Settable has changed. |
void |
wrapup()
Do nothing. |
Methods inherited from class ptolemy.domains.modal.kernel.State |
---|
_exportMoMLContents, attributeChanged, configure, dropObject, getConfigurer, getConfigureSource, getConfigureText, getIncomingPort, getObjectInRefinement, getOutgoingPort, getRefinement, nonpreemptiveTransitionList, preemptiveTransitionList |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_addPort, _adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_description, _removePort, _validateSettables, connectedPortList, connectedPorts, connectionsChanged, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
public GTIngredientsAttribute criteria
GTIngredientList
).
public GTIngredientsEditor.Factory editorFactory
public GTIngredientsAttribute operations
GTIngredientList
).
public PatternObjectAttribute patternObject
private static final java.util.List<?> _EMPTY_LIST
private static final java.util.Set<Inequality> _EMPTY_SET
private CausalityInterface _causalityInterface
private Director _causalityInterfaceDirector
private java.util.Set<java.lang.String> _labelSet
private long _version
Constructor Detail |
---|
public StateMatcher(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the state.
IllegalActionException
- If the state cannot be contained
by the proposed container.
NameDuplicationException
- If the name coincides with
that of an entity already in the container.Method Detail |
---|
public void addInitializable(Initializable initializable)
addInitializable
in interface Initializable
initializable
- The initializable.Initializable.removeInitializable(Initializable)
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class State
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If a derived class has
has an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void createReceivers() throws IllegalActionException
createReceivers
in interface Actor
IllegalActionException
- If any port throws it.AtomicActor.createReceivers()
,
CompositeActor.createReceivers()
public void fire() throws IllegalActionException
fire
in interface Executable
IllegalActionException
- Not thrown in this class.public CausalityInterface getCausalityInterface()
getCausalityInterface
in interface Actor
public GTIngredientsAttribute getCriteriaAttribute()
getCriteriaAttribute
in interface GTEntity
public java.lang.String getDefaultIconDescription()
getDefaultIconDescription
in interface GTEntity
public Director getDirector()
getDirector
in interface Actor
public Director getExecutiveDirector()
getExecutiveDirector
in interface Actor
public Manager getManager()
getManager
in interface Actor
public GTIngredientsAttribute getOperationsAttribute()
getOperationsAttribute
in interface GTEntity
public PatternObjectAttribute getPatternObjectAttribute()
TransformationRule
, if this entity is in
the replacement, or null otherwise.
getPatternObjectAttribute
in interface GTEntity
labelSet()
public void initialize() throws IllegalActionException
initialize
in interface Initializable
IllegalActionException
- Not thrown in this class.public java.util.List<?> inputPortList()
inputPortList
in interface Actor
public boolean isFireFunctional()
isFireFunctional
in interface Executable
public boolean isStrict()
isStrict
in interface Executable
public int iterate(int count) throws IllegalActionException
iterate
in interface Executable
count
- The number of iteration.
IllegalActionException
- Not thrown in this class.public java.util.Set<java.lang.String> labelSet()
labelSet
in interface GTEntity
public boolean match(NamedObj object)
match
in interface GTEntity
object
- The object to be tested.
public Receiver newReceiver() throws IllegalActionException
newReceiver
in interface Actor
IllegalActionException
- Not thrown in this class.public java.util.List<?> outputPortList()
outputPortList
in interface Actor
public boolean postfire() throws IllegalActionException
postfire
in interface Executable
IllegalActionException
- Not thrown in this class.public boolean prefire() throws IllegalActionException
prefire
in interface Executable
IllegalActionException
- Not thrown in this class.public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
IllegalActionException
- Not thrown in this class.public void removeInitializable(Initializable initializable)
removeInitializable
in interface Initializable
initializable
- The initializable.Initializable.addInitializable(Initializable)
public void setContainer(CompositeEntity container) throws IllegalActionException, NameDuplicationException
setContainer
in class ComponentEntity
container
- The proposed container.
IllegalActionException
- If the action would result in a
recursive containment structure, or if
this entity and container are not in the same workspace, or
if the protected method _checkContainer() throws it, or if
a contained Settable becomes invalid and the error handler
throws it.
NameDuplicationException
- If the name of this entity
collides with a name already in the container.ComponentEntity.getContainer()
public void stop()
stop
in interface Executable
public void stopFire()
stopFire
in interface Executable
public void terminate()
terminate
in interface Executable
public java.util.Set<Inequality> typeConstraints() throws IllegalActionException
typeConstraints
in interface TypedActor
IllegalActionException
- Not thrown in this class.Inequality
public void updateAppearance(GTIngredientsAttribute attribute)
updateAppearance
in interface GTEntity
attribute
- The attribute containing ingredients of this entity.GTEntityUtils.updateAppearance(GTEntity, GTIngredientsAttribute)
public void valueChanged(Settable settable)
valueChanged
in interface ValueListener
settable
- The object that has changed value.GTEntityUtils.valueChanged(GTEntity, Settable)
public void wrapup() throws IllegalActionException
wrapup
in interface Initializable
IllegalActionException
- Not thrown in this class.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |