Declaring Runtime Relations

A server relation can be declared as a runtime relation, that is, a relation of a runtime type, which can be referenced in a dynamic view type specification. Not all relations of a class must be declared as runtime relations, but only those that will be used in dynamic view type specifications.

To declare a relation, you can choose either a basic macro, which associates the runtime relation with the accessors and optional modifier supplied in the server relation templates, or the extended macros that let you redefine your own accessor and/or modifier functions to be associated with the runtime relation.

  • The accessor of a runtime relation is required for interpretation of any dynamic view type specification in which the relation is referenced, such as:

    • propagation clauses,

    • expression of representation attributes,

    • expression of propagation and representation conditions.

See Expression of Representation Attributes and Representation and Propagation Conditions for more information.

  • The modifier is used by the view interpreter to provide the server with feedback about representation updates, such as:

    • adding or removing an object to/from a collector associated with the relation,

    • modifying a reference attribute.

See Collectors and References for more information.

A relation macro should always be enclosed between the BEGIN and END macros for the type that holds the attribute.