For example my cpp implementation looks like:
class B {
int value;
}
typedef MyB B;
class A {
MyB b;
}
My plantuml code:
class B {
int value;
}
class A {
MyB b;
}
A o-- B
How to represent this alias in plantuml. How it should be done in right way. I can't find this in plantuml tutorial.
Aliases are merely referred to in the UML specs along with imports (though aliases may be used in namespaces as well). P. 30 gives an example which also addresses your 2nd issue with typedef
:
In Figure 7.8, the ElementImport is combined with aliasing, meaning that the DataType Types::Real will be referred to by name as Double in the package Shapes.
I don't know plantUML but if it is UML compliant (which it should be) then you can do as described above.
来源:https://stackoverflow.com/questions/46718471/how-to-write-typedef-and-alias-in-plantuml