add-event-function |
| function
&key slot-names paths permanent priority | [Function] |
Purpose
Add an event function for one or more event classes.
Package :gbbopen
Module :gbbopen-core
Arguments and values
function | A function designator | |
event-class-specifier | An extended event-class specification
(see below; default is t )
| |
unit-class-or-instance-specifier | An
extended unit-class or instance specification
(see below; default is t )
| |
slot-names or slot-name | A slot-name or list
of slot-names (default is t )
| |
paths or path | A space-instance path
regular expression
(default is (*) )
| |
permanent | A generalized boolean (default is nil )
| |
priority | An integer between -127 and 127, inclusive (default is 0 )
|
Detailed syntax
| atomic-event-class |
( atomic-event-class subeventing-specifier)
| t |
| event-class | event-class-name |
| :plus-subevents | :no-subevents
+ | = |
The shorthand +
subevents specifier is equivalent to
:plus-subevents
and =
to :no-subevents
.
| unit-instance |
( unit-instance*) | |
atomic-unit-class | | |
( atomic-unit-class subclassing-specifier) |
t | |
| unit-class | unit-class-name |
| :plus-subclasses | :no-subclasses |
+ | = |
The shorthand +
subclasses specifier is equivalent to
:plus-subclasses
and =
to :no-subclasses
.
Description
The specified function must accept the arguments associated with every
event class to which it is added. In addition, function
should accept additional arguments that are associated with all
subevents of the specified event classes. (This can be
achieved by specifying &allow-other-keys
The paths argument is either the symbol t
(indicating
all space instances) or a list representing a regular
expression where the following reserved symbols are interpreted as
follows:
= | matches one occurrence in a space-instance path | ||
? | matches zero or one occurrence in a space-instance path | ||
+ | matches one or more occurrences in a space-instance path | ||
* | matches zero or more occurrences in a space-instance path | ||
^ | move to parent | ||
See also
remove-event-function
remove-all-event-functions
Examples
Add the event function evfn-printv to the set of functions
to be invoked when instance-created-event
hyp
unit instance:
(add-event-function 'evfn-printv 'instance-created-event 'hyp)Add the event function evfn-printv to the set of functions to be invoked when
instance-created-event
hyp
unit instance or its subclasses:
(add-event-function 'evfn-printv 'instance-created-event '(hyp :plus-subclasses))or simply:
(add-event-function 'evfn-printv 'instance-created-event '(hyp +))
Note
Unit-instance-specific event functions
are not yet implemented in GBBopen.
The GBBopen Project
add-event-function |