| |
Writing models for AXgen |
|
| |
AXgen makes no special prerequisites about the model. Though, the UML
abstraction layer may represent some limitations as it is not a 1:1 implementation of
the UML specification but it reflects those parts of the UML class diagram elements, that
are commonly used for code generation. See the API doc
for details on the metamodel abstraction layer. |
|
| |
Of course, the use of AXgen's abstraction layer is not limited to the use
for code generation. Use it anywhere you need to access UML metamodel data. |
|
| |
For information on modelling for OJB, see the AXgen
and OJB section. |
|
| |
Merging models |
|
| |
AXgen's UML abstraction layer can merge models referencing one another
automatically resolving references. The figure below shows the general behaviour. |
|
| |
 |
|
| |
Just write two separate models (Model 1 and Model 2 in the figure above). Duplicate a type
in both models and give it the stereotype <<reference>> (or any other stereotype, in which case you
need to configure AXgen to use your own stereotype to resolve references). Do not declare any attributes, operations
or any other properties in the duplicated type. AXgen will replace the duplicate by the corresponding real type
in the first model. The resulting model will be equivalent to the Resulting Model in the figure above. |
|
| |
This technique is especially usefull to split big models into logical parts allowing
modularisation and thus simplified file handling and maintenance. |
|