RFerwerda
RFerwerda

Reputation: 1277

How to show a published property in a class diagram

At the moment I am busy creating UML diagrams for my application and I ran into this question. I know in a class diagram a class member (field, attribute, operation etc..) can only have the following visibility options:

The question that I have is regarding class members in Delphi that are published; how do you show this in your Class Diagram?

Published members have the same visibility as Public members, but they have RTTI available, so there is a slight difference between the two... So in my opinion it is not completely correct to just put them in as public members, anybody have any ideas?

Upvotes: 2

Views: 276

Answers (1)

RvdV79
RvdV79

Reputation: 2022

As far as I know, this cannot be done by UML. The published keyword is (as far as I currently know of) Delphi only, whereas UML is a standard to use with all languages.

So what I would do, is to create a custom flag when designing the UML classes. These would show that you actually mean published instead of public. However, the visibility is the same, so is it actually necessary for you?

On the other hand, the differences are not that significant, the visibility is the same and you are right about the fact that published properties have RunTime Type Information available.

Upvotes: 1

Related Questions