Package ptolemy.actor.ptalon.gt
Class TransformationEvaluator
- java.lang.Object
-
- ptolemy.actor.ptalon.AbstractPtalonEvaluator
-
- ptolemy.actor.ptalon.PtalonEvaluator
-
- ptolemy.actor.ptalon.gt.TransformationEvaluator
-
public class TransformationEvaluator extends PtalonEvaluator
Parse transformation actor or values and set parameters of actors.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Thomas Huining Feng
- Pt.AcceptedRating:
- Red (tfeng)
- Pt.ProposedRating:
- Red (tfeng)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.actor.ptalon.AbstractPtalonEvaluator
AbstractPtalonEvaluator.IfTree, AbstractPtalonEvaluator.PtalonExpressionScope
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.ptalon.AbstractPtalonEvaluator
_actor, _currentIfTree, _imports, _scope, _transparentRelations
-
-
Constructor Summary
Constructors Constructor Description TransformationEvaluator(PtalonActor actor)Construct transformation evaluator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_processAttributes(NamedObj object)Process an attribute.voidenterTransformation(boolean incremental)Enter the transformation.voidexitTransformation()Exit the transformation.voidnegateObject(java.lang.String name)Negate an object.voidoptionalObject(java.lang.String name)Mark a NamedObj as optional.voidpreserveObject(java.lang.String name)Preserve an object.voidremoveObject(java.lang.String name)Remove an object.voidstartAtTop()Prepare the compiler to start at the outermost scope of the Ptalon program during run time.-
Methods inherited from class ptolemy.actor.ptalon.PtalonEvaluator
addActor, addParameterAssign, addPortAssign, addPortAssign, addSymbol, addUnknownLeftSide, enterActorDeclaration, exitActorDeclaration, isActorReady, popActorDeclaration, pushActorDeclaration, setActorParameter, setActorSymbol, setDanglingPortsOkay
-
Methods inherited from class ptolemy.actor.ptalon.AbstractPtalonEvaluator
_getIndentPrefix, _getTimesEntered, _getType, _getTypeForScope, _inNewWhileIteration, _isPreservingTransformation, _resetParameters, _setPreservingTransformation, addActorParameter, addActorParameter, addInPort, addOutPort, addParameter, addParameter, addPort, addRelation, addTransparentRelation, assignInternalParameters, enterForScope, enterIfScope, evaluateBoolean, evaluateExpression, evaluateForScope, evaluateString, exitForScope, exitIfScope, getMappedName, hasUnassignedParameters, inScope, isCreated, isForReady, isIfReady, isReady, popForStatement, popIfStatement, pushForStatement, pushIfStatement, setActiveBranch, setCurrentBranch, setNextExpression
-
-
-
-
Constructor Detail
-
TransformationEvaluator
public TransformationEvaluator(PtalonActor actor)
Construct transformation evaluator.- Parameters:
actor- the Ptalon actor
-
-
Method Detail
-
enterTransformation
public void enterTransformation(boolean incremental) throws PtalonRuntimeExceptionEnter the transformation.- Overrides:
enterTransformationin classAbstractPtalonEvaluator- Parameters:
incremental- True if this is an incremental transformation.- Throws:
PtalonRuntimeException- Not thrown in this baseclass.
-
exitTransformation
public void exitTransformation() throws PtalonRuntimeExceptionExit the transformation.- Overrides:
exitTransformationin classAbstractPtalonEvaluator- Throws:
PtalonRuntimeException- Not thrown in this baseclass.
-
negateObject
public void negateObject(java.lang.String name) throws PtalonRuntimeExceptionNegate an object. A negated object is a NamedObj with aNegationAttribute.- Overrides:
negateObjectin classAbstractPtalonEvaluator- Parameters:
name- The name of the NamedObj to be negated.- Throws:
PtalonRuntimeException- If we are in a transformation or if the object has already been negated.
-
optionalObject
public void optionalObject(java.lang.String name) throws PtalonRuntimeExceptionMark a NamedObj as optional. An optional object is a NamedObj with anOptionAttribute.- Overrides:
optionalObjectin classAbstractPtalonEvaluator- Parameters:
name- The name of the NamedObj to be marked optional.- Throws:
PtalonRuntimeException- If we are in a transformation or if the object has already been marked optional
-
preserveObject
public void preserveObject(java.lang.String name) throws PtalonRuntimeExceptionPreserve an object. A preserved object is a NamedObj with anOptionAttribute.- Overrides:
preserveObjectin classAbstractPtalonEvaluator- Parameters:
name- The name of the NamedObj to be preserved- Throws:
PtalonRuntimeException- If we are in a transformation or if the object has already been preserved.
-
removeObject
public void removeObject(java.lang.String name) throws PtalonRuntimeExceptionRemove an object.- Overrides:
removeObjectin classAbstractPtalonEvaluator- Parameters:
name- The name of the NamedObj to be removed.- Throws:
PtalonRuntimeException- If we are in a transformation or if the object has already been marked as removed.
-
startAtTop
public void startAtTop()
Prepare the compiler to start at the outermost scope of the Ptalon program during run time.- Overrides:
startAtTopin classPtalonEvaluator
-
_processAttributes
protected void _processAttributes(NamedObj object) throws PtalonRuntimeException
Process an attribute.- Overrides:
_processAttributesin classAbstractPtalonEvaluator- Parameters:
object- The NamedObj to be processed.- Throws:
PtalonRuntimeException- If thrown while processing the attribute.
-
-