05 - Chapter 4. Code Import and Code Generation
05 - Chapter 4. Code Import and Code Generation
Code Generation
Generating Code
Code Import
Umbrello UML Modeller is a UML modelling tool, and as such its main
purpose is to help you in the analysis and design of your systems.
However, to make the transition between your design and your
implementation, Umbrello UML Modeller allows you to generate source
code in different programming languages to get you started. Also, if
you want to start using UML in an already started C++ project,
Umbrello UML Modeller can help you create a model of your system
from the source code by analysing your source code and importing the
classes found in it.
Code Generation
Umbrello UML Modeller can generate source code for various
programming languages based on your UML Model to help you
get started with the implementation of your project. The code
generated consists of the class declarations, with their
methods and attributes so you can “fill in the blanks” by
providing the functionality of your classes' operations.
Generating Code
The first step is to select the classes for which you want to
1 of 4 7/27/19, 4:01 PM
Chapter 4. Code Import and Code Generation https://docs.kde.org/stable5/en/kdesdk/u...
2 of 4 7/27/19, 4:01 PM
Chapter 4. Code Import and Code Generation https://docs.kde.org/stable5/en/kdesdk/u...
Generation Options
Comment Verbosity
Folders
Write all generated files to folder. Here you should select the
folder where you want Umbrello UML Modeller to put the
generated sources.
Overwrite Policy
3 of 4 7/27/19, 4:01 PM
Chapter 4. Code Import and Code Generation https://docs.kde.org/stable5/en/kdesdk/u...
Language
The third and last step of the wizard shows the status of the
Code Generation process. You need only to click on the
Generate button to get your classes written for you.
Note that the Options you select during the Code Generation
Wizard are only valid for the current generation. The next time
you run the wizard you will need to re-select all the options
(your headings folder, overwrite policy, and so on). You can set
the defaults used by Umbrello UML Modeller in the Code
Generation section of the Umbrello UML Modeller settings,
available at Settings → Configure Umbrello UML Modeller...
4 of 4 7/27/19, 4:01 PM