Add new types to metamodel: RLong and ArrayType

Issue #94 resolved
Matthias Schoettle created an issue

As per discussion in our meeting on March 12th, we decided to add RLong (due to Java imports) and array types to the metamodel.

  • RLong can just be added like RDouble and others
  • ArrayType needs to be a sub-class of PrimitiveType with the following additional properties
    • reference to ObjectType denoting the type of the array
    • attribute size for the size of the array.

Comments (11)

  1. Matthias Schoettle reporter

    References issue #74 and issue #94: Made PrimitiveType inherit from ObjectType instead of directly from Type. This makes more sense, because through inheriting from ImplementationClass it is also an ObjectType. When referring to an ObjectType, every proper type (primitive plus classes) is included.

    → <<cset a2a50c2e8667>>

  2. Matthias Schoettle reporter

    References issue #94: Added RArray as per instructions and defined getName and getInstanceClassName.

    getName is defined by the name of the referenced type and the size of the array (e.g., int[42]). If the size is not defined (default is -1) then no size is displayed.

    Multi-dimensional arrays are nested RArray instances. E.g., int[][] is an RArray with type int, and an RArray with type of RArray.

    → <<cset a541cd655742>>

  3. Matthias Schoettle reporter

    References issue #94: Fixed generation of core reference for OCL. We need to use the namespace URI instead of the CORE.ecore URI. Otherwise when loading a model in TouchRAM it cannot find the ecore file.

    Unfortunately, this will be overwritten by the next code generation.

    → <<cset e87457749760>>

  4. Matthias Schoettle reporter

    References #94: Fixes the OCL expression to retrieve the name of an array. In case of multi-dimensional arrays the order of the dimensions was wrong (e.g., int[1][2] entered by the user would appear as int[2][1]).

    → <<cset a23d1ca8abe9>>

  5. Log in to comment