Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UML: the meaning of <<primitive>>

Tags:

class

uml

diagram

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

like image 449
Queequeg Avatar asked Dec 09 '11 10:12

Queequeg


1 Answers

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.

like image 146
Pete Kirkham Avatar answered Sep 23 '22 17:09

Pete Kirkham