Creating composite types
You can create composite types that are modeled using structural features
instead of verbatim, language-specific text.
In addition, the product includes classes
wherever types are used to increase the maintainability of models: if you change the name of a
class, the change is propagated automatically throughout all the references to it.
Procedure
Results
See the appropriate data type to continue the creation process.
The following table shows the mapping of composite types to the different languages.
Type Kind | Ada | C and C++ | Java |
---|---|---|---|
Language | As in previous versions | As in previous versions | As in previous versions |
Structure | Not supported | struct The generated struct is a simple C-style struct that contains only
public data members. |
N/A |
Union | Not supported | union |
N/A |
Enumeration | Enumeration types | enum |
N/A |
Typedef | Subtypes (in simple cases) or subtype | typedef |
N/A |
The generated struct is a simple C-style struct that contains only public data members.
Code generation analyzes the types to automatically generate:
- Dependencies in the code (
#include
) - Type descriptions
- Field descriptions
Each field in a structure and union has an attribute annotation.