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.AbstractProjectionOpens in a new window 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).
A projection definition has the following structure:
/// description Projection name As projection_class (parameter_list) ;
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 Defining and Using Classes.
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.AbstractProjectionOpens in a new window.
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.
“Projection Keywords” in this book
“Defining Class Projections” in Defining and Using Classes