The UML2c Plug-in generates C source code and Google C++ Mocking Framework (Google Mock) from Astah’s UML Class models.
Latest Version
0.9.0 (Updated: Mar 31, 2016)
Support
No technical support is provided.
How to Install
- Download the UML2C Plug-in file and unzip it.
- Copy “uml2c-x.x.x.jar” and the “uml2c” folder to userhome/.astah/professional(community)/plugins.

Launch Astah. If you find [UML2C plugin] menu under the [Tools], that means the installation has completed successfully!

Template Files
-
- All the .vm-extension files are the template files that are necessary to generate code and need to be placed as below.
Windows |
%USERPROFILE%\.astah\professional(community)\plugins\uml2c\header.vm |
Mac and Linux |
$HOME/.astah/professional(community)/plugins/uml2c/header.vm |
-
- Encoding of template files needs to be in UTF-8.
How to Use
-
- Open a class diagram and select a class you want to generate code for. (Click here for sample output.)
- Go to [Tools] – [UML2C plugin] – [Generate C skeleton code] or [Generate GoogleMock code].

- Specify the output directory.

- If you get this dialog, the source code is generated successfully!

Sample Code
This is a sample diagram in “uml2c-plugin-sample.asta” included in the .zip file.

Single Instance Module
Classes with <> stereotype will be exported as single instance module.

Foo.c

Foo.h

Multi Instance Modules
Multi Instance Modules Standard classes will be exported as multi instance modules.

Bar.c

Bar.h

BarPrivate.h

Per-type dynamic interface (Super Class)
Abstract Classes will be exported as per-type dynamic interface.

Abstract.c

Abstract.h

AbstractPrivate.h

Back to Plugin List
What are you looking for?