-
Notifications
You must be signed in to change notification settings - Fork 1
CPP Code Generation
Ábel Hegedüs edited this page Jul 30, 2015
·
15 revisions
Note: If you are generating CPP code from the UML model, the model elements should be in a component, because the code generation runs only on components.
- Open your UML model in Papyrus
- Right click on the root item (the model) in the Model Explorer view and select Generate CPP code for selected UML model
- Use the UML-Integration to generate xtUMLrt model from UML
- Open the xtUMLrt model (with Sample Reflective Ecore Editor)
- Right click on any XTComponent and select Generate CPP code for selected XTComponent
If you use Windows you need some extra settings to run C++ code:
- Open project's Properties and under C/C++ Build in the Tool Chain Editor setup the Current toolchain to Cygwin GCC.
- Open run configuration and add PATH as an environment variable if it does not exist (if you have CUTE for testing you can copy this variable from the test configuration).
- If you need to use the built project you also need to set dll instead of so as an Artifact extension (Project Properties → C/C++ Build → Settings → Build Artifact).
You can find a simple example that contains a single TEST class here.
You can find the PingPong example model here.
You can find more example models here.