|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.gt.GTIngredient
ptolemy.actor.gt.ingredients.operations.Operation
ptolemy.actor.gt.ingredients.operations.PortCreationOperation
public class PortCreationOperation
An operation to create a port.
Red (tfeng) |
Yellow (tfeng) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.actor.gt.GTIngredient |
---|
GTIngredient.FieldIterator |
Field Summary | |
---|---|
private boolean |
_autoRename
Value of the autoRename element. |
private static OperationElement[] |
_ELEMENTS
The elements. |
private boolean |
_input
Value of the input element. |
private boolean |
_multiport
Value of the multiport element. |
private boolean |
_output
Value of the output element. |
private java.lang.String |
_portClass
Value of the portClass element. |
private java.lang.String |
_portName
Value of the portName element. |
private PtolemyExpressionString |
_portType
Value of the portType element. |
Fields inherited from class ptolemy.actor.gt.ingredients.operations.Operation |
---|
_parseTreeWriter |
Fields inherited from class ptolemy.actor.gt.GTIngredient |
---|
FIELD_SEPARATOR |
Constructor Summary | |
---|---|
PortCreationOperation(GTIngredientList owner)
Construct an operation within the given list as its owner. |
|
PortCreationOperation(GTIngredientList owner,
java.lang.String values)
Construct an operation within the given list as its owner and initialize all the elements with the given values, which are a string encoding of those elements. |
|
PortCreationOperation(GTIngredientList owner,
java.lang.String portName,
java.lang.String portClass,
java.lang.String portType,
boolean input,
boolean output,
boolean multiport,
boolean autoRename)
Construct an operation within the given list as its owner and with the given value to each of its elements.. |
Method Summary | |
---|---|
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. |
GTIngredientElement[] |
getElements()
Get the array of elements defined in this GTIngredient. |
java.lang.Object |
getValue(int index)
Get the value of the index-th elements. |
java.lang.String |
getValues()
Get a string that describes the values of all the elements. |
boolean |
isApplicable(NamedObj object)
Check whether this GTIngredient is applicable to the object. |
boolean |
isPortClassEnabled()
Return whether the portClass element is enabled. |
boolean |
isPortTypeEnabled()
Return whether the portType element is enabled. |
void |
setValue(int index,
java.lang.Object value)
Set the value of the index-th element. |
void |
setValues(java.lang.String values)
Set the values of all the elements with a string that describes them. |
void |
validate()
Validate the enablements and values of all the elements. |
Methods inherited from class ptolemy.actor.gt.ingredients.operations.Operation |
---|
_evaluate |
Methods inherited from class ptolemy.actor.gt.GTIngredient |
---|
_decodeBooleanField, _decodeStringField, _encodeBooleanField, _encodeStringField, _escapeElementString, _findMatchingParen, _findSeparator, _unescapeElementString, disableAll, enableAll, getOwner, isEnabled, setEnabled, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final OperationElement[] _ELEMENTS
private boolean _autoRename
private boolean _input
private boolean _multiport
private boolean _output
private java.lang.String _portClass
private java.lang.String _portName
private PtolemyExpressionString _portType
Constructor Detail |
---|
public PortCreationOperation(GTIngredientList owner)
owner
- The list as the owner of the constructed GTIngredientList.public PortCreationOperation(GTIngredientList owner, java.lang.String values)
owner
- The list as the owner of the constructed GTIngredientList.values
- The string encoding of the values of the elements.public PortCreationOperation(GTIngredientList owner, java.lang.String portName, java.lang.String portClass, java.lang.String portType, boolean input, boolean output, boolean multiport, boolean autoRename)
owner
- The list as the owner of the constructed GTIngredientList.portName
- Value of the portName element.portClass
- Value of the portClass element.portType
- Value of the portType element.input
- Value of the input element.output
- Value of the output element.multiport
- Value of the multiport element.autoRename
- Value of the autoRename element.Method Detail |
---|
public ChangeRequest getChangeRequest(Pattern pattern, Replacement replacement, MatchResult matchResult, NamedObj patternObject, NamedObj replacementObject, NamedObj hostObject) throws IllegalActionException
getChangeRequest
in class Operation
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.public GTIngredientElement[] getElements()
getElements
in class GTIngredient
public java.lang.Object getValue(int index)
getValue
in class GTIngredient
index
- The index.
setValue(int, Object)
public java.lang.String getValues()
getValues
in class GTIngredient
setValues(String)
public boolean isApplicable(NamedObj object)
isApplicable
in class GTIngredient
object
- The object.
public boolean isPortClassEnabled()
public boolean isPortTypeEnabled()
public void setValue(int index, java.lang.Object value)
setValue
in class GTIngredient
index
- The index.value
- The value.getValue(int)
public void setValues(java.lang.String values)
setValues
in class GTIngredient
values
- A string that describes the new values of all the
elements.getValues()
public void validate() throws ValidationException
validate
in class GTIngredient
ValidationException
- If some elements are invalid.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |