ptolemy.backtrack.automatic.ptolemy.actor.lib
Class Commutator.WidthDependentParameter
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.AbstractSettableAttribute
ptolemy.data.expr.Variable
ptolemy.data.expr.Parameter
ptolemy.backtrack.automatic.ptolemy.actor.lib.Commutator.WidthDependentParameter
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Rollbackable, HasTypeConstraints, Typeable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable, Settable, ValueListener
- Enclosing class:
- Commutator
private static class Commutator.WidthDependentParameter
- extends Parameter
- implements Rollbackable
This class will set _port.getWidth() + " * blockSize" as expression
of the parameter, but will only do it when the token is requested to
delay the triggering of the width.
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Method Summary |
private IOPort |
$ASSIGN$_port(IOPort newValue)
|
void |
$COMMIT(long timestamp)
Commit changes up to the given timestamp, but not including changes
made at timestamp and afterward. |
Checkpoint |
$GET$CHECKPOINT()
Get the checkpoint object that monitors this rollbackable object. |
void |
$RESTORE(long timestamp,
boolean trim)
Restore a previous state to all the private fields of this rollbackable
object. |
java.lang.Object |
$SET$CHECKPOINT(Checkpoint checkpoint)
Set the checkpoint object of this rollbackable object. |
Token |
getToken()
Get the token contained by this variable. |
(package private) void |
setPort(IOPort port)
|
Methods inherited from class ptolemy.data.expr.Variable |
_description, _evaluate, _notifyValueListeners, _parseIfNecessary, _propagate, _propagateToValueListeners, _propagateValue, _setToken, _setTokenAndNotify, addValueListener, clone, getDeclaredType, getExpression, getFreeIdentifiers, getParserScope, getScope, getScope, getType, getTypeTerm, getValueAsString, getVariable, getVisibility, invalidate, isKnown, isLazy, isStringMode, isTypeAcceptable, removeValueListener, reset, setContainer, setExpression, setLazy, setName, setParseTreeEvaluator, setStringMode, setToken, setToken, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, setUnknown, setVisibility, stringRepresentation, toString, typeConstraintList, typeConstraints, validate, valueChanged |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
$CHECKPOINT
protected transient Checkpoint $CHECKPOINT
_port
private IOPort _port
$RECORD$$CHECKPOINT
protected transient CheckpointRecord $RECORD$$CHECKPOINT
$RECORD$_port
private transient FieldRecord $RECORD$_port
$RECORDS
private transient FieldRecord[] $RECORDS
Commutator.WidthDependentParameter
public Commutator.WidthDependentParameter(NamedObj container,
java.lang.String name,
IOPort port)
throws IllegalActionException,
NameDuplicationException
- Throws:
IllegalActionException
NameDuplicationException
getToken
public Token getToken()
throws IllegalActionException
- Description copied from class:
Variable
- Get the token contained by this variable. The type of the returned
token is always that returned by getType(). Calling this method
will trigger evaluation of the expression, if the value has been
given by setExpression(). Notice the evaluation of the expression
can trigger an exception if the expression is not valid, or if the
result of the expression violates type constraints specified by
setTypeEquals() or setTypeAtMost(), or if the result of the expression
is null and there are other variables that depend on this one.
The returned value will be null if neither an expression nor a
token has been set, or either has been set to null.
- Overrides:
getToken
in class Variable
- Returns:
- The token contained by this variable converted to the
type of this variable, or null if there is none.
- Throws:
IllegalActionException
- If the expression cannot
be parsed or cannot be evaluated, or if the result of evaluation
violates type constraints, or if the result of evaluation is null
and there are variables that depend on this one.- See Also:
Variable.setToken(String)
,
Variable.setToken(ptolemy.data.Token)
setPort
void setPort(IOPort port)
$ASSIGN$_port
private final IOPort $ASSIGN$_port(IOPort newValue)
$COMMIT
public void $COMMIT(long timestamp)
- Description copied from interface:
Rollbackable
- Commit changes up to the given timestamp, but not including changes
made at timestamp and afterward.
- Specified by:
$COMMIT
in interface Rollbackable
- Parameters:
timestamp
- The timestamp.
$RESTORE
public void $RESTORE(long timestamp,
boolean trim)
- Description copied from interface:
Rollbackable
- Restore a previous state to all the private fields of this rollbackable
object.
- Specified by:
$RESTORE
in interface Rollbackable
- Parameters:
timestamp
- The timestamp taken at the time when the previous
state was recorded.trim
- Whether to delete the records used for the rollback.- See Also:
Checkpoint.rollback(long, boolean)
$GET$CHECKPOINT
public final Checkpoint $GET$CHECKPOINT()
- Description copied from interface:
Rollbackable
- Get the checkpoint object that monitors this rollbackable object.
- Specified by:
$GET$CHECKPOINT
in interface Rollbackable
- Returns:
- The checkpoint object.
$SET$CHECKPOINT
public final java.lang.Object $SET$CHECKPOINT(Checkpoint checkpoint)
- Description copied from interface:
Rollbackable
- Set the checkpoint object of this rollbackable object. A merge
operation is performed on the current checkpoint object and the new
checkpoint object, so that the two checkpoint objects monitor the same
set of objects when this function returns.
- Specified by:
$SET$CHECKPOINT
in interface Rollbackable
- Parameters:
checkpoint
- The new checkpoint object.
- Returns:
- This rollbackable object itself.
- See Also:
Checkpoint.setCheckpoint(Checkpoint)