| Did you know ... | Search Documentation: |
| Predicate pce_class_directive/1 |
pce_class_directive(+Goal)XPCE classes are not created immediately when a Prolog file holding a class definition is loaded. Instead, the specification is translated into Prolog facts; if a reference is later made to the class, the XPCE class counterpart is created. This means it is not possible to invoke behaviour on the class being defined using ordinary Prolog directives.
A goal declared with pce_class_directive/1
is stored with the Prolog class definition. When the class object is
actually created the declared class-directives are executed. During the
execution
@class is a var object referring to the class being built.
The preprocessor automatically tags directives of the form
:- send(@class, ...) with this directive.