systemcomposer.interaction.AltFragment
说明
AltFragment 对象是序列图中操作数的容器,用于指定所含元素的行为。
一个 Alt 片段 表示一个交互中的多个互斥条件,在这些条件下,预计会出现不同的消息集(操作数)。替代片段类似于软件程序中的 IF-ELSEIF-THEN 子句。
另一个片段在序列图中画为方框,方框标题中标有 Alt。然后将每个操作数作为一个单独的部分画在这个框内。
创建对象
通过相应 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

