示例结构的 UML 数据流图策略
描述以下内容的最佳策略是什么:
1)A 类创建了 B 类和 C 类的实例 2)B类能够通过B类中的指针与D类中的特定成员进行通信
提前感谢您的建议,因为我不知道描述它们的正确术语以便搜索更多信息在互联网上。
What would be the best strategies to describe the following:
1) class A created instances of classes B and C
2) class B being able to communicate to class D through a pointer in class B to a specific member in class D
Thanks in advance for the suggestions, as I don't know the proper term to describe them in order to search for more information on the internet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一种图表称为“数据流图”,但这不是 UML 图之一。
可以在 UML“序列图”中显示 A 创建 B 和 C 的实例,该图显示了事情发生的时间顺序(例如,A 的实例在时间 T0 存在,在时间 T1 创建 B 的实例) ,并在时间 T2 创建 C) 的实例。
可以在 UML“类图”中显示 B 有一个指向 D 的成员,该图说明了一个或多个类的成员(方法和实例数据)。
然而,我不认为 UML 有“指向成员的指针”的符号......并且当您说“B 通过指向 D 中特定成员的指针与 D 类通信”时,我不确定您的意思:可以请举一个例子(例如在源代码中)来说明这一点?
There's a type of diagram called a "data flow diagram", but that's not one of the UML diagrams.
Showing that A creates instances of B and C can be shown in a UML 'sequence diagram', which shows the sequence in time at which things happen (e.g. an instance of A exists at time T0, at time T1 it creates an instance of B, and at time T2 it creates an instance of C).
Showing that B has a member which points to D can be shown in a UML 'class diagram', which illustrates the members (methods and instance data) of a class or classes.
However I don't think UML has a notation for "pointer to member" ... and I'm not sure what you mean when you say that "B communicates to class D through a pointer to a specific member in D": can you please give an example (e.g. in source code) to illustrate that?