systemcomposer.interaction.LoopFragment
说明
LoopFragment 对象是序列图中操作数的容器,用于指定所含元素的行为。
一个 Loop 片段 包含一个重复一定次数的操作。迭代次数有最小和最大迭代次数之分。
循环片段在序列图中绘制为一个方框,方框标题中标有 Loop。标签下方标注了预期迭代的最小和最大次数。然后将操作数作为一个单独的部分画在这个框内。
创建对象
通过相应 systemcomposer.interaction.Interaction 对象的 RootFragment 属性访问 Fragment 对象。访问根操作数片段的 Operand 属性,然后,如果片段位于根操作数内,则访问根操作数的 Fragment 属性并遍历它,以查看每个片段的详细信息。
属性
对象函数
addOperand | 在片段中添加操作数 |
move | 在交互中移动片段 |
destroy | 移除模型元素 |
示例
详细信息
版本历史记录
在 R2024a 中推出
另请参阅
工具
函数
openViews|sim|addInteraction|getInteraction|getInteractions|open|addLifeline|addFragment|addOperand|addMessage|addDurationConstraint|addAnnotation|findLifeline|findElement|move|move|move|destroy|next|current|reset
对象
systemcomposer.arch.Model|systemcomposer.interaction.Interaction|systemcomposer.interaction.Iterator|systemcomposer.interaction.Lifeline|systemcomposer.interaction.MessageEvent|systemcomposer.interaction.FormalGate|systemcomposer.interaction.Message|systemcomposer.interaction.Fragment|systemcomposer.interaction.Operand|systemcomposer.interaction.DurationConstraint|systemcomposer.interaction.Annotation

