Setting C++ in Astah

Astah supports modeling in Java, C++, and C#.
If you are modeling in C++, set so in Astah first.

  1. Select a root package on a tree and check [C++] in the bottom pane.
    C++ programming language

    2. Setting this as C# will enable you to C#-specific attributes for Classes, Attributes, and Operations in the [Language] tab.
    C++ Setting

Import C++ Source Code

You can import C# source code by using this C++ Reverse Plug-in (free).

Export C++ Source Code

Astah generates C++ Skeleton Code from selected Diagram Elements. The Definitions of Classes and Operations are exported as Documentation Comments.

1. Go to [Tools] – [C++] – [Export C++] in the Main Menu.
Export CPlus Menu

2. Select the target folder in the “Select” Dialog, the target Model and click [OK].
CPlus Export Option

C++ Options



Export #ifndef, #define, #endif in header file.
Export #ifndef, #define and #endif to a header file.
Include list
Export a list divided by , (comma) to a header file and a resource file

i.e.)When exporting string, vector:

#include <string>

#include <vector>
Header file extension
Specify the header file extension (h, hxx)
Source file extension
Specify the source file extension (cpp, cxx)