A DoerCmd is a helper object that stores a single command match template for a Doer object. A given Doer can match multiple commands; each match is represented by one of these objects.
class
DoerCmd : object
Superclass Tree (in declaration order)
DoerCmd
object
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
cmd
doer
doerTab
seqno
Summary of Methods
compareTo
construct
findDoers
matchCmd
matchConditions
Properties
The parsed command template. This is a list consisting of the Action we match plus the objects or classes we match for the noun phrases, in the canonical order (direct object, indirect object, accessory). The action can also be the Action class itself, to indicate that we match all actions. We only match a command with the same number of noun phrases as in the template.
the Doer I'm associated with
Class member: the master table of DoerCmd objects. The library builds this automatically during preinitialization. This is a lookup table indexed by Action. Each Action entry has a list of DoerCmd objects associated with that Action. Note that the generic all-verb handlers are listed under Action.
My global sequence number. During initialization, we set this to reflect our position in the global list of DoerCmd objects after the list is sorted into priority order. This makes it easy to sort a new list of DoerCmd objects into the original priority order.
Methods
Get the processing priority sorting order relative to another DoerCmd. (See Doer.priority for a discussion of the priority rules.)
Class method: Get a list of Doer objects matching the given command. 'cmdLst' is the command's action and object list in canonical format: [action, dobj, iobj, accessory].
Check for a match to a command list. 'cmdLst' is the command object list in canonical format: [action, dobj, iobj, ...]. This routine determines if our Doer is a handler for the given command.
Check whether a Doer matches its where, when, who and during conditions.
Adv3Lite Library Reference Manual
Generated on 03/07/2024 from adv3Lite version 2.1