|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.actor.ptalon.NamedTree<PtalonEvaluator.ActorTree>
ptolemy.actor.ptalon.PtalonEvaluator.ActorTree
private class PtalonEvaluator.ActorTree
This class is a tree whose structure mimics that of a nested actor declaration. For instance, Foo(a := Foo(a: = Bar(), b := Bar()), b := Bar()) might have a tree that looks something like:
Foo_0
/ \
Foo_1 Bar_0
/ \
Bar_1 Bar_2
| Field Summary | |
|---|---|
private java.lang.String |
_actorParameter
The left hand side in the Ptalon expression param := ... |
private java.util.Map<java.lang.String,java.lang.String> |
_parameters
Each key is a parameter in this actor declaration, and each value is an expression to be passed to the parameter. |
private java.util.Map<java.lang.String,java.lang.String> |
_ports
Each key is a port in this actor declaration, and each value is a port in its container to be connected to at runtime. |
private java.util.Map<java.lang.String,java.lang.String> |
_relations
Each key is a port in this actor declaration, and each value is a relation in its container to be connected to at runtime. |
private java.lang.String |
_symbol
This is the symbol stored with the AbstractPtalonEvaluator that this actor declaration refers to. |
private java.util.Map<java.lang.String,java.lang.String> |
_transparencies
Each key is a port in this actor declaration, and each value is a transparent relation in its container to be connected to at runtime. |
private java.util.Map<java.lang.String,java.lang.String> |
_transparentLeftHandSides
Each member of this set is a transparent relation assigned a value in a this statement, like this(transparentRelation := someOtherRelation); |
private java.util.Map<java.lang.String,java.lang.String> |
_unknownExpressions
The _unknownPrefixes maps port names in this actor declaration instance to prefixes of unknown connection points, and _unknownExpressions maps the same keys to the expressions for these unknown connection points. |
private java.util.Map<java.lang.String,java.lang.String> |
_unknownLeftSides
Each key is a prefix and value is an expression corresponding to a left hand side of an assignment which may change dynamically. |
private java.util.Map<java.lang.String,java.lang.String> |
_unknownPrefixes
The _unknownPrefixes maps port names in this actor declaration instance to prefixes of unknown connection points, and _unknownExpressions maps the same keys to the expressions for these unknown connection points. |
boolean |
created
This becomes true after the this actor declaration has been created. |
int |
createdIteration
This takes a nonzero value in the iteration it gets set. |
| Fields inherited from class ptolemy.actor.ptalon.NamedTree |
|---|
_children, _name, _parent |
| Constructor Summary | |
|---|---|
PtalonEvaluator.ActorTree(PtalonEvaluator.ActorTree parent,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
PtalonEvaluator.ActorTree |
addChild(java.lang.String name)
Create a new child tree to this tree with the specified name and return it. |
void |
addParameterAssign(java.lang.String parameterName,
java.lang.String expression)
Add an assignment of the specified port of this actor declaration to the containing Ptalon actor connection point, which is either a port or a relation. |
void |
addPortAssign(java.lang.String portName,
java.lang.String connectPoint)
Add an assignment of the specified port of this actor declaration to the containing Ptalon actor connection point, which is either a port or a relation. |
void |
addPortAssign(java.lang.String portName,
java.lang.String connectPointPrefix,
java.lang.String connectPointExpression)
Add an assignment of the specified port of this actor declaration to the containing Ptalon actor connection point, which is either a port or a relation. |
void |
addUnknownLeftSide(java.lang.String prefix,
java.lang.String expression)
Add the unknown left side to this actor declaration. |
void |
assignNonPtalonParameters(ComponentEntity actor)
Assign all non-Ptalon parameters of the specified non-Ptalon actor their corresponding value. |
void |
assignPtalonParameters(PtalonActor actor)
Assign all Ptalon paramters of the specified actor their corresponding value. |
java.lang.String |
getActorParameter()
Get the name of the actor parameter, or throw an exception if there is none. |
java.lang.String |
getExpression()
Get an expression representing this actor tree, like a := b(c := d())(n := <2/>) |
java.lang.String |
getSymbol()
Get the AbstractPtalonEvaluator symbol. |
boolean |
isReady()
Return true if this nested actor is ready to be created. |
void |
makeConnections(ComponentEntity actor)
Make all connections for this nested actor. |
void |
makeThisConnections()
Make all connections for this nested actor. |
void |
removeDynamicLeftHandSides()
Clean up any dynamic left hand sides added. |
void |
setActorParameter(java.lang.String paramName)
Set the parameter name for the current actor declaration, if any, to the given parameter name. |
void |
setSymbol(java.lang.String symbol)
Set the symbol in the AbstractPtalonEvaluator this actor declaration refers to. |
| Methods inherited from class ptolemy.actor.ptalon.NamedTree |
|---|
getChild, getChildren, getName, getParent, getProperAncestors |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean created
public int createdIteration
private java.lang.String _actorParameter
private java.util.Map<java.lang.String,java.lang.String> _parameters
private java.util.Map<java.lang.String,java.lang.String> _ports
private java.util.Map<java.lang.String,java.lang.String> _relations
private java.lang.String _symbol
private java.util.Map<java.lang.String,java.lang.String> _transparencies
private java.util.Map<java.lang.String,java.lang.String> _transparentLeftHandSides
private java.util.Map<java.lang.String,java.lang.String> _unknownExpressions
private java.util.Map<java.lang.String,java.lang.String> _unknownLeftSides
private java.util.Map<java.lang.String,java.lang.String> _unknownPrefixes
| Constructor Detail |
|---|
public PtalonEvaluator.ActorTree(PtalonEvaluator.ActorTree parent,
java.lang.String name)
| Method Detail |
|---|
public PtalonEvaluator.ActorTree addChild(java.lang.String name)
addChild in class NamedTree<PtalonEvaluator.ActorTree>name - The name of the child.
public void addParameterAssign(java.lang.String parameterName,
java.lang.String expression)
parameterName - The name of the parameter.expression - The expression to assign to the parameter.
public void addPortAssign(java.lang.String portName,
java.lang.String connectPoint)
throws PtalonScopeException
portName - The name of the port in the specified actor.connectPoint - The name of the container's port or
relation.
PtalonScopeException - If this is not a top-level
actor declaration with respect to the assignment, or if
connectPoint is not a port or relation.
public void addPortAssign(java.lang.String portName,
java.lang.String connectPointPrefix,
java.lang.String connectPointExpression)
throws PtalonScopeException
portName - The name of the port in thisconnectPointPrefix - The name of the container's port
or relation.connectPointExpression - The name of the container's
port or relation.
PtalonScopeException - If this is not a top-level
actor declaration with respect to the assignment, or if
connectPoint is not a port or relation.
public void addUnknownLeftSide(java.lang.String prefix,
java.lang.String expression)
prefix - The prefix for the unknown left side.expression - The suffix expression for the unknown
left side.
public void assignNonPtalonParameters(ComponentEntity actor)
throws PtalonRuntimeException
actor - The actor that contains these parameters.
PtalonRuntimeException - If thrown trying to
access the parameter, or if unable to set the token for
the corresponding parameter.
public void assignPtalonParameters(PtalonActor actor)
throws PtalonRuntimeException
actor - The actor that contains these parameters.
PtalonRuntimeException - If thrown trying to
access the parameter, or if unable to set the token for
the corresponding parameter.
public java.lang.String getActorParameter()
throws PtalonRuntimeException
PtalonRuntimeException - If no parameter name has
been assigned to this actor.
public java.lang.String getExpression()
throws PtalonRuntimeException
PtalonRuntimeException - If no parameter name has
been assigned to this actor.public java.lang.String getSymbol()
public boolean isReady()
throws PtalonRuntimeException
PtalonRuntimeException - If there is problem
accessing any parameters.
public void makeConnections(ComponentEntity actor)
throws PtalonRuntimeException
actor - The actor to connect to others.
PtalonRuntimeException - If thrown trying to
access the parameter, or if unable to set the token for
the corresponding parameter.
public void makeThisConnections()
throws PtalonRuntimeException
PtalonRuntimeException - If thrown trying to
access the parameter, or if unable to set the token for
the corresponding parameter.public void removeDynamicLeftHandSides()
public void setActorParameter(java.lang.String paramName)
throws PtalonScopeException
paramName - The name of the parameter.
PtalonScopeExceptionpublic void setSymbol(java.lang.String symbol)
symbol - The symbol to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||