|
The following table gives a short overview of the modeling primitives of the MOOSE-Editor and the code generated from these primitives by MPOK.
| Symbol | Name | Description / Generated Code |
|---|---|---|
![]() | Schema | Each group of Objecttypes can be structured in different schemas. A schema represents a software component, a library or simply a group of strongly related objects. The code for each Schema is generated into a separate VisualWorks category. |
![]() | Schema Aggregation | Schemas can aggregate other Schemas. Aggregating another Schema means, that the other Schema is needed by the first one. Thus, code generation is always done for a Schema and all its aggregates. |
![]() | Objecttype | An objecttype is a description of a class of similar objects. Therefore, MPOK generates a smalltalk class for each objecttype. |
| no graphics | Attributes | Attributes with certain types can be specified textually in the MOOSE Editor. The generated code for Attributes consists of: access methods, type checking methods (optional), and a constructor. |
![]() | IsA relation | IsA relations denote inheritance. If an objecttype is of the kind of another objecttype it inherits all the attributes, relations and methods from the first one (s. example). |
![]() | Normal Relation | A relation connects two objecttypes. It consists of a relation name and two rolenames. The rolenames are used to access connected objects. A relation can have different cardinalities (1:1, 1:n, n:1, or n:m) and relations with cardinalities greater than one can be ordered or unordered. Here is an example of some of the generated code for a normal relation: definition, access methods. |
![]() | PartOf Relation | A PartOf relation is a special relation to describe object aggregation. Thus, to express the fact that one object consists of other objects, a PartOf relation can be used. Currently, no particular code other than "Normal Relaion" code is generated to enforce this behavior. |
| Common Generated Code | ||
| Several other methods are generated to provide additional
functionality for the ADT. Data exchange between different (generated)
applications can be done with via SLANG files. SLANG is a textual data
exchange language. Methods to read and write SLANG files are generated by
MPOK. If the data structure in a SLANG file doesn't match the expected
structure, the SLANG input ignores additional data or uses default values
for unsupplied data. This way, data exchange between different ADTs can be
done.
Several other methods that are generate include printing and error handling. This example shows some of the generated code for an ADTs base class. | ||
MOOSE also provides ADT generators for other languages (like C, C++, Versant database, remote access) that provide a similar interface. Data exchange between different applications (that may be written in different languages) can be done via SLANG files.
The MOOSE ADT generators have been used in several (internal) projects and proved to be very useful.
|
|
|