Skip to content

Commit 8d610eb

Browse files
Merge pull request #3 from HammerMaximilian/development
development --> master v2.0.0
2 parents 7e13d7e + 9606f4b commit 8d610eb

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<img src="logo.png" width="300"/>
2+
13
# fUML Reference Implementation for *C++*
24
This software is an open source reference implementation of the *Semantics of a Foundational Subset for Executable UML Models* (fUML)
35
specification by the *Object Management Group* (OMG) (see [here](https://www.omg.org/spec/FUML/1.5/About-FUML)). This implementation is based on the Java fUML reference implementation developed by
@@ -6,8 +8,57 @@ specification by the *Object Management Group* (OMG) (see [here](https://www.omg
68
## Licensing
79
For licensing information, please see the [LICENSE.md](https://github.com/HammerMaximilian/fUML-CPP/blob/master/LICENSE) file.
810

11+
## Prerequisites
12+
For detailed information, please see the [User Guide](fUML-C++_User_Guide.pdf) section *1. Prerequisites*.
13+
### 1. Required Software
14+
* Compiler: *GCC* (Linux) or *MinGW-w64* (Windows)
15+
* *Java Runtime Environment*
16+
* *Eclipse CDT* or any Eclipse IDE with *C++-Development Tools* installed
17+
### 2. Recommended but optional Software
18+
* *Eclipse Modeling Tools* for creating UML models
19+
* *Eclipse Papyrus* for more sophisticated and graphical modeling of UML models
20+
* *Acceleo* to be able to use the code generator for executable models
21+
22+
## Setup
23+
For detailed information, please see the [User Guide](fUML-C++_User_Guide.pdf) section *2. Setup*.
24+
### 1. Setting up Eclipse
25+
* Import fUML-C++ root project *fUML-CPP* into your workspace
26+
* Import nested projects *uml* and *fuml*
27+
### 2. Environment Variables
28+
* Add binary directories paths of *uml* and *fuml* to your system's environment variables (e.g. add them to PATH in Windows)
29+
* Depending on whether you want to build debug version, release version or both versions of the dynamic libraries:
30+
* `"<fUML-C++-rootdir>\uml\Debug"` for debug version of uml
31+
* `"<fUML-C++-rootdir>\uml\Release"` for release version of uml
32+
* `"<fUML-C++-rootdir>\fuml\Debug"` for debug version of fuml
33+
* `"<fUML-C++-rootdir>\fuml\Release"` for release version of fuml
34+
935
## Building
10-
TBD
36+
For detailed information, please see the [User Guide](fUML-C++_User_Guide.pdf) section *3. Build*.
37+
* Build dynamic libraries for *uml* and *fuml* (**in that order**) using Eclipse C++-Development Tools managed build
38+
* Depending on your preferences and needs, build debug, release or both
1139

1240
## Usage
13-
TBD
41+
For detailed information, please see the [User Guide](fUML-C++_User_Guide.pdf) section *4. Usage*.
42+
### 1. Creating executable models using source code
43+
* Create new C++ project (see `"<fUML-C++-rootdir>\examples\helloworld"` as a reference project)
44+
* NOTE: it is suggested to store user-defined source code projects in common directory `"<fUML-C++-rootdir>\usersrc"`
45+
* The *usersrc* directory may contain arbitrary nested subdirectories
46+
* Add include directories for uml and fuml to your project
47+
* Add uml and fuml binaries to the linker options of your projects
48+
* Create a `<model-name>Environment` class by deriving from class `fuml::environment::Environment`
49+
* Create a `<model-name>Model` class by deriving from class `uml::environment::InMemoryModel` (this class will contain all of your model elements)
50+
* Create a class containing a main method and call `<model-name>Environment::Instance()->execute("<behavior-name>");` for each behavior you want to execute in subsequent order
51+
* Build project and run executable
52+
### 2. Generating executable models from *.uml* models (*Acceleo* plugin for Eclipse has to be installed)
53+
* Create new *.uml* model with a modeling tool of your choice (*Eclipse Papyrus* is suggested)
54+
* NOTE: it is suggested to store user-defined models in common directory `"<fUML-C++-rootdir>\usermodels"`
55+
* The *usermodels* directory may contain arbitrary nested subdirectories
56+
* Import nested project *generator* within fUML-C++ root project
57+
* Navigate to file `\generator\src\fuml.generator.main\generate.mtl` in the project explorer
58+
* Right click `generate.mtl` and choose `Run as`-->`Run configurations...`
59+
* Configure and run Acceleo Application accordingly:
60+
* Choose `fuml.generator.main.Generate`
61+
* Choose your model file
62+
* Choose a target directory for the generated source code (`"<fUML-C++-rootdir>\usersrc\<model-name>"` is suggested)
63+
* Import newly generated C++ project within fUML-C++ root project and build executable(s)
64+
* Run executable from command line using `<executable-name> <behavior-name> [<behavior-name> <behavior-name> <behavior-name> <...>]`

fUML-C++_User_Guide.pdf

546 KB
Binary file not shown.

logo.png

556 KB
Loading

0 commit comments

Comments
 (0)