ptolemy.domains.sr.lib
Class NonStrictTokenToExpression
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.lib.Transformer
ptolemy.actor.lib.conversions.Converter
ptolemy.actor.lib.conversions.TokenToExpression
ptolemy.domains.sr.lib.NonStrictTokenToExpression
- All Implemented Interfaces:
- Actor, Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, Executable, Instantiable, ModelErrorHandler, MoMLExportable, Nameable, java.io.Serializable, TypedActor
- public class NonStrictTokenToExpression
- extends TokenToExpression
This actor is a non-strict version of the TokenToExpression actor.
When its input is unknown, it ouptuts "unknown". When its input is
known but has no token, it outputs "absent". Otherwise, it
does the same thing as TokenToExpression actor does.
- Since:
- Ptolemy II 4.0
- Version:
- $Id: NonStrictTokenToExpression.java,v 1.9.2.1 2004/06/20 03:10:45 cxh Exp $
- Author:
- Haiyang Zheng
- See Also:
TokenToExpression,
Serialized Form
- Accepted Rating:
- Proposed Rating:
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
|
Method Summary |
void |
fire()
Output a string token whose value is an expression representing
the value of the input token. |
boolean |
prefire()
Return true. |
void |
pruneDependencies()
Override the base class to declare that the output
does not depend on the input in a firing. |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, clone, connectionsChanged, getDirector, getExecutiveDirector, getFunctionDependency, getManager, initialize, inputPortList, iterate, newReceiver, outputPortList, postfire, preinitialize, removeDependency, setContainer, stop, stopFire, terminate, wrapup |
| Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName, validateSettables |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NonStrictTokenToExpression
public NonStrictTokenToExpression(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Construct an actor with the given container and name.
- Parameters:
container - The container.name - The name of this actor.
- Throws:
IllegalActionException - If the actor cannot be contained
by the proposed container.
NameDuplicationException - If the container already has an
actor with this name.
fire
public void fire()
throws IllegalActionException
- Output a string token whose value is an expression representing
the value of the input token.
- Specified by:
fire in interface Executable- Overrides:
fire in class TokenToExpression
- Throws:
IllegalActionException - If there's no director.
prefire
public boolean prefire()
throws IllegalActionException
- Return true.
- Specified by:
prefire in interface Executable- Overrides:
prefire in class TokenToExpression
- Throws:
IllegalActionException - If there is no director, or
if no connection has been made to the input.
pruneDependencies
public void pruneDependencies()
- Override the base class to declare that the output
does not depend on the input in a firing.
- Overrides:
pruneDependencies in class AtomicActor
- See Also:
TimedDelay,
AtomicActor.removeDependency(IOPort, IOPort),
FunctionDependencyOfAtomicActor