public abstract class Operation extends GTIngredient
GTIngredient.FieldIterator
Modifier and Type | Field and Description |
---|---|
protected ParseTreeWriter |
_parseTreeWriter
A parse tree writer to output the contents of a parse tree.
|
FIELD_SEPARATOR
Constructor and Description |
---|
Operation(GTIngredientList owner,
int elementCount)
Construct an operation within the given list as its owner containing a
given number of elements.
|
Modifier and Type | Method and Description |
---|---|
protected ASTPtLeafNode |
_evaluate(ASTPtRootNode parseTree,
ParseTreeEvaluator evaluator,
ParserScope scope)
Given a parse tree of a Ptolemy expression, evaluate it in the given
scope and return a new constant AST node that has the result as its
value.
|
abstract ChangeRequest |
getChangeRequest(Pattern pattern,
Replacement replacement,
MatchResult matchResult,
NamedObj patternObject,
NamedObj replacementObject,
NamedObj hostObject)
Get the change request to update the object in the host model.
|
_decodeBooleanField, _decodeStringField, _encodeBooleanField, _encodeStringField, _escapeElementString, _findMatchingParen, _findSeparator, _unescapeElementString, disableAll, enableAll, getElements, getOwner, getValue, getValues, isApplicable, isEnabled, setEnabled, setValue, setValues, toString, validate
protected ParseTreeWriter _parseTreeWriter
public Operation(GTIngredientList owner, int elementCount)
owner
- The list as the owner of the constructed GTIngredientList.elementCount
- The number of elements that the GTIngredient has.public abstract ChangeRequest getChangeRequest(Pattern pattern, Replacement replacement, MatchResult matchResult, NamedObj patternObject, NamedObj replacementObject, NamedObj hostObject) throws IllegalActionException
pattern
- The pattern of the transformation rule.replacement
- The replacement of the transformation rule.matchResult
- The match result.patternObject
- The object in the pattern, or null.replacementObject
- The object in the replacement that corresponds
to the object in the pattern.hostObject
- The object in the host model corresponding to the
object in the replacement.IllegalActionException
- If error occurs in generating the
change request.protected ASTPtLeafNode _evaluate(ASTPtRootNode parseTree, ParseTreeEvaluator evaluator, ParserScope scope) throws IllegalActionException
parseTree
- The parse tree.evaluator
- The evaluator to be used.scope
- The scope.IllegalActionException
- If an error occurs during the
evaluation.