UML datatype supported in plantUML?

0 votes
asked Jun 14 in Wanted features by LArch (150 points)
Hi plantUML authors,

 

I was trying to find if plantUML support representing UML datatype in graphic, but did not find it.

It seem to me that plantUML supports "class", "interface", "abstract class", "enum", but not "datatype".

 

I read the toturial, and think the "specific sport" function might be a way to represent "datatype". Is there any other suggested way to do this?

 

Thank you very much!

1 Answer

0 votes
answered Jun 14 by plantuml (134,570 points)

Hi,

You can use something like

@startuml
class Address << (D,#FF7700) DataType>> {
  house: String
  street: String
}
@enduml

Using the preprocessor, you can also have:

@startuml
!define datatype(x) class x << (D,#FF7700) DataType>>
datatype(Address) {
  house: String
  street: String
}
@enduml

Is this what you are looking for ?

 

 

...