|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.domains.modal.kernel.State
ptolemy.domains.ptera.kernel.Event
ptolemy.actor.gt.controller.GTEvent
ptolemy.actor.gt.controller.Transform
public class Transform
An event to transform the model in the model parameter with the encapsulated transformation rule.
| Red (tfeng) |
| Yellow (tfeng) |
| Nested Class Summary | |
|---|---|
static class |
Transform.EmbeddedConfigurer
The configurer to be embedded in the transform event. |
| Nested classes/interfaces inherited from class ptolemy.domains.ptera.kernel.Event |
|---|
Event.EventParameter, Event.RefiringData |
| Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
|---|
Entity.ContainedObjectsIterator |
| Field Summary | |
|---|---|
private Configurer |
_configurer
The configurer. |
private java.lang.String |
_configureSource
The configure source. |
protected TransformationRule |
_transformation
The encapsulated transformation rule. |
TransformEventController.Factory |
controllerFactory
The controller factory for this event to specialize the popup menu. |
Parameter |
defer
Whether the transformation should be deferred with a change request. |
Parameter |
matched
Whether the last pattern matching was successful (read-only). |
TransformationMode |
mode
The transformation mode. |
| Fields inherited from class ptolemy.actor.gt.controller.GTEvent |
|---|
refinementExtender |
| Fields inherited from class ptolemy.domains.ptera.kernel.Event |
|---|
actions, isEndingEvent, isFinalEvent, isInitialEvent, parameters |
| 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 |
| Constructor Summary | |
|---|---|
Transform(CompositeEntity container,
java.lang.String name)
Construct an event with the given name contained by the specified composite entity. |
|
| Method Summary | |
|---|---|
private static void |
_clearURI(NamedObj object)
Clear the URI attribute of the given object. |
protected void |
_exportMoMLContents(java.io.Writer output,
int depth)
Write a MoML description of the contents of this object, which in this class are the attributes plus the ports. |
protected boolean |
_isActiveRefinement(TypedActor refinement)
Return whether the given refinement is active. |
void |
addObject(NamedObj object)
Invoked when the specified object is added to a container. |
java.lang.Object |
clone(Workspace workspace)
Clone the event into the specified workspace. |
void |
configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
Configure this event with a transformation rule (an instance of TransformationRule) stored in the moml. |
Event.RefiringData |
fire(Token arguments)
Process this event and transform (or pattern-match) the model in the model parameter depending on the transformation model mode. |
Configurer |
getConfigurer()
Get the Transform.EmbeddedConfigurer object for this entity. |
java.lang.String |
getConfigureSource()
Return the input source that was specified the last time the configure method was called. |
java.lang.String |
getConfigureText()
Return the text string that represents the current configuration of this object. |
TypedActor[] |
getRefinement()
Get the refinement of this event, which is an instance of TransformationRule. |
| Methods inherited from class ptolemy.actor.gt.controller.GTEvent |
|---|
getModelParameter, setContainer |
| Methods inherited from class ptolemy.domains.ptera.kernel.Event |
|---|
_getParserScope, addInitializable, attributeChanged, getController, initialize, isEndingEvent, isFinalEvent, isInitialEvent, preinitialize, refire, removeInitializable, scheduleEvents, stop, wrapup |
| Methods inherited from class ptolemy.domains.modal.kernel.State |
|---|
dropObject, getIncomingPort, getObjectInRefinement, getOutgoingPort, 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 |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
|---|
description, getDisplayName, getFullName, getName, getName |
| Field Detail |
|---|
public TransformEventController.Factory controllerFactory
public Parameter defer
public Parameter matched
public TransformationMode mode
protected TransformationRule _transformation
private java.lang.String _configureSource
private Configurer _configurer
| Constructor Detail |
|---|
public Transform(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 addObject(NamedObj object)
addObject in interface TransformationListenerobject - The added object.
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
clone in class Eventworkspace - The workspace for the new event.
java.lang.CloneNotSupportedException - If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String),
NamedObj.setDeferringChangeRequests(boolean)
public void configure(java.net.URL base,
java.lang.String source,
java.lang.String text)
throws java.lang.Exception
TransformationRule) stored in the moml.
configure in interface Configurableconfigure in class Statebase - The base relative to which references within the input
are found, or null if this is not known, or there is none.source - The input source, which specifies a URL, or null
if none.text - Configuration information given as text, or null if
none.
java.lang.Exception - If something goes wrong.
public Event.RefiringData fire(Token arguments)
throws IllegalActionException
mode.
fire in class Eventarguments - The arguments used to process this event, which must be
either an ArrayToken or a RecordToken.
IllegalActionException - If the model cannot be transformed, or
if thrown by the superclass.TransformationModepublic java.lang.String getConfigureSource()
getConfigureSource in interface ConfigurablegetConfigureSource in class Statepublic java.lang.String getConfigureText()
getConfigureText in interface ConfigurablegetConfigureText in class Statepublic Configurer getConfigurer()
Transform.EmbeddedConfigurer object for this entity.
getConfigurer in interface ConfigurableEntitygetConfigurer in class Statepublic TypedActor[] getRefinement()
TransformationRule.
getRefinement in class State
protected void _exportMoMLContents(java.io.Writer output,
int depth)
throws java.io.IOException
_exportMoMLContents in class Stateoutput - The output to write to.depth - The depth in the hierarchy, to determine indenting.
java.io.IOException - If an I/O error occurs.NamedObj.exportMoML(Writer, int)protected boolean _isActiveRefinement(TypedActor refinement)
TransformationRule instance.
_isActiveRefinement in class Eventrefinement - The refinement.
private static void _clearURI(NamedObj object)
throws IllegalActionException
object - The object.
IllegalActionException - If the URI attribute of the object
cannot be removed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||