Skip to main content
Previous section   Next section

Projection Definitions

Describes the structure of a projection definition.

Introduction

A projection definition instructs the class compiler to perform specified operations when a class definition is compiled or removed. A projection defines the name of a projection class (derived from the %Projection.AbstractProjection class) that implements methods that are called when the compilation of a class is complete and when a class definition is removed (either because it is being deleted or because the class is about to be recompiled).

Details

A projection definition has the following structure:

/// description Projection name As projection_class (parameter_list) ;

Where:

  • description (optional) is intended for display in the Class Reference (but note that projections are not currently shown in the Class Reference). The description is blank by default. See “Creating Class Documentation” in Using Caché Objects.

  • name (required) is the name of the projection. This must be a valid class member name, and must not conflict with any other class member names.

  • projection_class (required) is the name of the projection class, which is a subclass of %Projection.AbstractProjection.

  • parameter_list (optional) is a comma-separated list of parameters and their values. If specified, these should be parameters used by projection_class.

    If this list is omitted, also omit the parentheses.

  • keyword_list (optional) is a comma-separated list of keywords that further define the projection.

    See the section “Projection Keywords.”

    If this list is omitted, also omit the square brackets.

See Also