Class LoopNode
A LoopNode is a StructuredActivityNode that represents an iterative loop with setup, test, and body sections. <p>From package UML::Actions.</p>
[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//LoopNode")]
public class LoopNode : StructuredActivityNode, ILoopNode, IStructuredActivityNode, IActivityGroup, INamespace, IAction, IExecutableNode, IActivityNode, IActivityContent, IRedefinableElement, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
LoopNode
- Implements
- Inherited Members
Constructors
LoopNode()
Creates a new instance
public LoopNode()
Properties
BodyOutput
The OutputPins on Actions within the bodyPart, the values of which are moved to the loopVariable OutputPins after the completion of each execution of the bodyPart, before the next iteration of the loop begins or before the loop exits. <p>From package UML::Actions.</p>
[XmlElementName("bodyOutput")]
[XmlAttribute(true)]
public IOrderedSetExpression<IOutputPin> BodyOutput { get; }
Property Value
BodyPart
The set of ExecutableNodes that perform the repetitive computations of the loop. The bodyPart is executed as long as the test section produces a true value. <p>From package UML::Actions.</p>
[XmlElementName("bodyPart")]
[XmlAttribute(true)]
public ISetExpression<IExecutableNode> BodyPart { get; }
Property Value
Children
Gets the child model elements of this model element
public override IEnumerableExpression<IModelElement> Children { get; }
Property Value
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
Decider
An OutputPin on an Action in the test section whose Boolean value determines whether to continue executing the loop bodyPart. <p>From package UML::Actions.</p>
[XmlElementName("decider")]
[XmlAttribute(true)]
public IOutputPin Decider { get; set; }
Property Value
IsTestedFirst
If true, the test is performed before the first execution of the bodyPart. If false, the bodyPart is executed once before the test is performed. <p>From package UML::Actions.</p>
[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlElementName("isTestedFirst")]
[XmlAttribute(true)]
public bool IsTestedFirst { get; set; }
Property Value
LoopVariable
A list of OutputPins that hold the values of the loop variables during an execution of the loop. When the test fails, the values are moved to the result OutputPins of the loop. <p>From package UML::Actions.</p>
[Browsable(false)]
[XmlElementName("loopVariable")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IOutputPin> LoopVariable { get; }
Property Value
LoopVariableInput
A list of InputPins whose values are moved into the loopVariable Pins before the first iteration of the loop. <p>From package UML::Actions.</p>
[Browsable(false)]
[XmlElementName("loopVariableInput")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IInputPin> LoopVariableInput { get; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Result
A list of OutputPins that receive the loopVariable values after the last iteration of the loop and constitute the output of the LoopNode. <p>From package UML::Actions.</p>
[Browsable(false)]
[XmlElementName("result")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IOutputPin> Result { get; }
Property Value
SetupPart
The set of ExecutableNodes executed before the first iteration of the loop, in order to initialize values or perform other setup computations. <p>From package UML::Actions.</p>
[XmlElementName("setupPart")]
[XmlAttribute(true)]
public ISetExpression<IExecutableNode> SetupPart { get; }
Property Value
Test
The set of ExecutableNodes executed in order to provide the test result for the loop. <p>From package UML::Actions.</p>
[LowerBound(1)]
[XmlElementName("test")]
[XmlAttribute(true)]
public ISetExpression<IExecutableNode> Test { get; }
Property Value
Methods
Body_output_pins(object, object)
The bodyOutput pins are OutputPins on Actions in the body of the LoopNode. bodyPart.oclAsType(Action).allActions().output->includesAll(bodyOutput)
public bool Body_output_pins(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Executable_nodes(object, object)
The union of the ExecutableNodes in the setupPart, test and bodyPart of a LoopNode must be the same as the subset of nodes contained in the LoopNode (considered as a StructuredActivityNode) that are ExecutableNodes. setupPart->union(test)->union(bodyPart)=node->select(oclIsKindOf(ExecutableNode)).oclAsType(ExecutableNode)->asSet()
public bool Executable_nodes(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
GetAttributeValue(string, int)
Resolves the given attribute name
protected override object GetAttributeValue(string attribute, int index)
Parameters
Returns
- object
The attribute value or null if it could not be found
GetClass()
Gets the Class for this model element
public override IClass GetClass()
Returns
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
feature
stringThe requested feature
Returns
- IList
A non-generic list of elements
GetCompositionName(object)
Gets the property name for the given container
protected override string GetCompositionName(object container)
Parameters
container
objectThe container object
Returns
- string
The name of the respective container reference
GetExpressionForAttribute(string)
Gets the property expression for the given attribute
protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)
Parameters
attribute
stringThe requested attribute in upper case
Returns
- INotifyExpression<object>
An incremental property expression
GetExpressionForReference(string)
Gets the property expression for the given reference
protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)
Parameters
reference
stringThe requested reference in upper case
Returns
- INotifyExpression<IModelElement>
An incremental property expression
GetModelElementForReference(string, int)
Resolves the given URI to a child model element
protected override IModelElement GetModelElementForReference(string reference, int index)
Parameters
Returns
- IModelElement
The model element or null if it could not be found
GetRelativePathForNonIdentifiedChild(IModelElement)
Gets the relative URI fragment for the given child model element
protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)
Parameters
element
IModelElementThe element that should be looked for
Returns
- string
A fragment of the relative URI
Input_edges(object, object)
The loopVariableInputs must not have outgoing edges. loopVariableInput.outgoing->isEmpty()
public bool Input_edges(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Loop_variable_outgoing(object, object)
All ActivityEdges outgoing from loopVariable OutputPins must have targets within the LoopNode. allOwnedNodes()->includesAll(loopVariable.outgoing.target)
public bool Loop_variable_outgoing(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Matching_loop_variables(object, object)
A LoopNode must have the same number of loopVariableInputs and loopVariables, and they must match in type, uniqueness and multiplicity. loopVariableInput->size()=loopVariable->size() and loopVariableInput.type=loopVariable.type and loopVariableInput.isUnique=loopVariable.isUnique and loopVariableInput.lower=loopVariable.lower and loopVariableInput.upper=loopVariable.upper
public bool Matching_loop_variables(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Matching_output_pins(object, object)
A LoopNode must have the same number of bodyOutput Pins as loopVariables, and each bodyOutput Pin must be compatible with the corresponding loopVariable (by positional order) in type, multiplicity, ordering and uniqueness. bodyOutput->size()=loopVariable->size() and Sequence{1..loopVariable->size()}->forAll(i | bodyOutput->at(i).type.conformsTo(loopVariable->at(i).type) and bodyOutput->at(i).isOrdered = loopVariable->at(i).isOrdered and bodyOutput->at(i).isUnique = loopVariable->at(i).isUnique and loopVariable->at(i).includesMultiplicity(bodyOutput->at(i)))
public bool Matching_output_pins(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Matching_result_pins(object, object)
A LoopNode must have the same number of result OutputPins and loopVariables, and they must match in type, uniqueness and multiplicity. result->size()=loopVariable->size() and result.type=loopVariable.type and result.isUnique=loopVariable.isUnique and result.lower=loopVariable.lower and result.upper=loopVariable.upper
public bool Matching_result_pins(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Result_no_incoming(object, object)
The result OutputPins have no incoming edges. result.incoming->isEmpty()
public bool Result_no_incoming(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)
Parameters
Setup_test_and_body(object, object)
The test and body parts of a ConditionalNode must be disjoint with each other. setupPart->intersection(test)->isEmpty() and setupPart->intersection(bodyPart)->isEmpty() and test->intersection(bodyPart)->isEmpty()
public bool Setup_test_and_body(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.