Is there a way to configure uml-designer
to understand standard C and C++ library types (like uint32_t
or std::string
)? Right now it refuses to let me assign a type to a variable if this type doesn't exist in the model.
Using standard types
438 views Asked by ilya1725 At
1
No, you need to define them. To do so you can provide your own profile in which you define all the Datatypes you need, this will be your types library model. And then you can use this types in any other model by referencing the types from your libray. To define the types you juste create a model as you do usually and then to use them in another model you can reference the profile by clicking on
Project Dependencies
in the Model Explorer and then onAdd Model
:A dialog box opens, and then you have to select on your file system the .uml model which definies the types:
In my example this file is named types.uml:
Then you validate and you can see in the Model Explorer your profiles un the
Project Dependencies
.Now you can use the types in your model. For example, I created a class with a property and I want to set the property type to
Date
. Then I clixk on the + utton in the properties view and this open a dialog which by default is on the Model REsource tab. I select the All Resources tab and then I am able to select the Date type.In the end I got a property with Date as type: