Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我的 cpp 实现如下所示:
class B { int value; } typedef MyB B; class A { MyB b; }
我的植物代码:
class B { int value; } class A { MyB b; } A o-- B
如何在植物中表示这个别名。应该如何以正确的方式完成。我在植物教程中找不到这个。
别名仅在 UML 规范中与导入一起引用(尽管别名也可以在名称空间中使用)。第 30 页给出了一个示例,该示例还解决了您的第二个问题typedef:
typedef
在图 7.8 中,ElementImport 与别名结合在一起,这意味着 DataType Types::Real 在包 Shapes 中将被称为 Double。
我不知道plantUML,但如果它符合UML(应该是),那么你可以按照上面的描述进行操作。