Reputation: 2864
I'm using Visual Paradigm for UML
I'm drawing a class diagram and I want to mark a struct (instead of a class). There is no such thing there, but instead I found smt called <<primitive>>
.
What is it?
Is it a dumb-data-holder?
Kind regards
Upvotes: 5
Views: 5035
Reputation: 49311
The «primitive» stereotype means the type has no internal structure, and is defined externally to UML. An integer would be a primitive; its operations are defined by the implementation language.
The «datatype» stereotype is analogous to a C# struct or a value type - instances of the type may have internal structure, but do not have identity and are considered equal if the values of all their properties are equal. A complex number, with real and imaginary parts, would be a data type.
Upvotes: 7