Inheritance - modelint/types GitHub Wiki

Inheritance defines a new User Type built on top of some other Base or User Type.

For example, a Shaft ID User Type can be built on top of an unconstrained Base Type of String.

Here Shaft ID imposes a constraint via a regular expression such that only values such as "S1", "S2", etc can be defined. This is a subset of the values defined by the String Base Type.

To be more specific, the Shaft ID User Type defines a single Component that applies the regular expression.

The use of a Component seems like an extra step here, but when we try to specify a multi-component User Type, it is essential.

See the Component description for more about that.

Inheritance constrains more than just the set of assignable values. It may also exclude, override, and add operators on the new User Type.

Identifiers

  1. User type

Attributes

No non-referential attributes.