Astah User's Guide

Source Code Generation in C# / C++

Generate C# Source code

[Export C#] is used to generate C# Skeleton Code from selected Diagram Elements. The Definitions of Classes and Operations are exported as Documentation Comments.

  1. Select [Tool]-[C#]-[Export C#] in the Main Menu to open the “Select” Dialog.
  2. Select the target folder, target Model, from which .cs files are to be generated and click [OK].
    Specify the charset to use upon on exporting C#.
    export_csharp

Generate C++ Source Code

“Export C++” is used to generate C++ Skeleton Code from selected Diagram Elements. The Definitions of Classes and Operations are exported as Documentation Comments.

  1. Select [Tool]-[C++]-[Export C++] in the Main Menu to open the “Select” Dialog.
  2. Select the target folder in the “Select” Dialog, the target Model and click [OK].
    export_cpp
C++ Option
LabelDescription
Export #ifndef, #define, #endif in header file.Export #ifndef, #define and #endif to a header file.
Include listExport a list divided by , (comma) to a header file and a resource file
i.e.)When expporting string、vector:
#include <string>
#include <vector>
Header file extensionSpecify the header file extension (h, hxx)
Source file extensionSpecify the source file extension (cpp, cxx)