Types and Typing
When generating code, there will be a check and subsequent warning if a type of a UML element (Attribute, Operations & Parameter) is not one of the standard types or linked to an UML element.
When generating code, Embedded Engineer offers the possibility to check if all types are correctly typed (either standard types or linked UML elements). This is enabled by default, but can be disabled via the "Use strict data typing" settings.
Standard (predefined) Types
Embedded Engineer supports a list of standard/generic types. These are used when the language for an element is set to none
or the user uses platform independent model elements.
Embedded Engineer supports the base AnsiC types of void
, int
, char
, double
and float
.
When entered into the type field, the standard types will automatically be converted into the base AnsiC types or other Embedded Engineer supported types.
These will not trigger a Use strict data typing
warning.
UML Element types
Alternatively, the type can also be selected via the Select Type...
point in the dropdown menu when selecting types. This makes it possible to set the type to any valid UML element.
An example for that would be Primitive elements which can be used all over your model. Typedefs for these can be easily created by addig a Class/Interface and adding attributes or Primitive elements with the Stereotype typedef
.
Primitive Elements
Primitive elements are another way to use/reference your own types inside the model.