public class Wait extends CfgNode
The object contains a EventList
events collection and a Node
"until"
condition. While entering this node the model simulator should stop the
execution until at least one event from the sensitivity list. When the
sensitivity list is empty or at least one event appears, the "until"
condition should be checked rather it is true
.
childNode, parentNode
Constructor and Description |
---|
Wait(EventList list)
Constructs object with the specified
EventList events collection. |
Wait(EventList list,
ru.ispras.fortress.expression.Node node)
Constructs object with the specified event list and node condition.
|
Wait(ru.ispras.fortress.expression.Node node)
Constructs node object with the specified
Node condition. |
Modifier and Type | Method and Description |
---|---|
boolean |
containsCondition()
Checks rather object contains condition,
|
CfgModelNode |
deepCopy()
Returns a copy of this node.
|
ru.ispras.fortress.expression.Node |
getCondition()
Returns the
Node condition. |
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getDefines()
Returns a set of defined variables.
|
java.lang.String |
getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
Returns node string description in the format of the specified printer.
|
EventList |
getEventList()
Returns the
EventList object. |
CfgModelNode |
getOnlyChild()
Returns the only child node.
|
CfgModelNode |
getOnlyParent()
Returns the only parent node.
|
CfgNodeType |
getType()
Returns node type.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getUses()
Returns a set of used variables.
|
boolean |
hasOnlyChild()
Checks rather node has exactly one child node.
|
boolean |
hasOnlyParent()
Checks rather node has exactly one parent node.
|
void |
setCondition(ru.ispras.fortress.expression.Node node)
Sets condition.
|
addChild, addParent, equals, getChildren, getId, getParents, hasChildren, hashCode, hasParents, removeChild, removeParent
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo
public Wait(EventList list)
EventList
events collection.list
- event listjava.lang.IllegalArgumentException
- when EventList
argument is null
.public Wait(ru.ispras.fortress.expression.Node node)
Node
condition.node
- conditionjava.lang.IllegalArgumentException
- when condition data type
is not equal to ru.ispras.fortress.data.DataTypeId.BOOLEAN
.public Wait(EventList list, ru.ispras.fortress.expression.Node node)
Constructs node object with the specified
EventList
that is non-empty collection
of Event
events
and the specified Node
condition.
list
- event listnode
- conditionjava.lang.IllegalArgumentException
- in one of the following situations:
(1) EventList
argument is either null
or empty; (2) condition data type is not DataTypeId.BOOLEAN
.public boolean containsCondition()
true
when this object contains not-null
condition,
false
otherwise.public ru.ispras.fortress.expression.Node getCondition()
Node
condition.public void setCondition(ru.ispras.fortress.expression.Node node)
node
- conditionpublic CfgModelNode deepCopy()
CfgModelNode
The copy does not keep the same links to parent or child nodes as this has.
public CfgNodeType getType()
CfgModelNode
By default, node has CfgNodeType.UNKNOWN
type.
public boolean hasOnlyParent()
CfgModelNode
true
if node has exactly one parent at the moment, false
otherwise.public boolean hasOnlyChild()
CfgModelNode
true
if node has exactly one child at the moment, false
otherwise.public CfgModelNode getOnlyParent()
CfgModelNode
public CfgModelNode getOnlyChild()
CfgModelNode
public java.lang.String getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
CfgModelNode
getDescription
in interface CfgModelNode
getDescription
in class CfgNode
printer
- printerpublic java.util.Set<ru.ispras.fortress.expression.NodeVariable> getUses()
UseDef
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getDefines()
UseDef