Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

UML datatype supported in plantUML?

0 votes
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!
asked Jun 14 in Wanted features by LArch (150 points)

1 Answer

0 votes

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 ?

 

 

answered Jun 14 by plantuml (126,850 points)
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...