Class Definition Reference
Describes the structure of a class definition.
In InterSystems IRIS, a class can include familiar class elements such as properties, methods, and parameters (known as constants in other class languages). It can also include items not usually defined in classes, including triggers, queries, and indexes.
A class definition has the following structure:
Class package.shortclassname Extends superclass_list [ class_keyword_list ]
This option, if specified, is either the name of a single package or is a comma-separated list of multiple packages, enclosed in parentheses.
If a class imports any packages, that class does not
automatically import the User
Imported packages are inherited from all superclasses. If a subclass specifies one or more import packages, those are added to any import packages defined by the superclasses.
(optional) specifies InterSystems IRIS include (.inc
) files used when compiling this class.
This option, if specified, is either the name of a single include file (without the .inc
extension) or is a comma-separated list of multiple include files, enclosed in parentheses.
Include files are inherited from all superclasses. If a subclass specifies one or more include files, those are added to any include files defined by the superclasses.
For general comments, see the previous item.
(optional) specifies the class or classes from which this class inherits. This option, if specified, is either the name of a single class (without the .cls
extension) or is a comma-separated list of classes, enclosed in parentheses.
(optional) is a comma-separated list of keywords that (in most cases) affect how the compiler generates code for this class definition.
If this list is omitted, also omit the square brackets.