Action

Class · class Action: object · Source

Defines argument requirements and the execution and reporting hooks for a command.

Audience: author

Superclass: object

Declared members

  • dobjIsTopic — property; Treat the direct argument as a topic instead of an ordinary thing.
  • exec — method; Perform the action after resolution and preconditions; c holds resolved objects.
  • iobjIsTopic — property; Treat the indirect argument as a topic instead of an ordinary thing.
  • missingDobjMsg — property; Message id used when the required direct argument is absent.
  • missingIobjMsg — property; Message id used when the required indirect argument is absent.
  • needsDobj — property; Whether the command requires a direct entity argument.
  • needsIobj — property; Whether the command requires an indirect entity argument.
  • needsReach — property; Require the selected object to be reachable for this action.
  • preCond — method; Return the preconditions needed for an argument in its resolved role.
  • rank — method; Return an action-specific candidate rank for an argument and role.
  • report — method; Produce the action's report after successful execution.

Member details

dobjIsTopic

dobjIsTopic = nil · Source

Treat the direct argument as a topic instead of an ordinary thing.

exec

exec(c) · Source

Perform the action after resolution and preconditions; c holds resolved objects.

iobjIsTopic

iobjIsTopic = nil · Source

Treat the indirect argument as a topic instead of an ordinary thing.

missingDobjMsg

missingDobjMsg ='parse.noref' · Source

Message id used when the required direct argument is absent.

missingIobjMsg

missingIobjMsg ='parse.noref' · Source

Message id used when the required indirect argument is absent.

needsDobj

needsDobj = nil · Source

Whether the command requires a direct entity argument.

needsIobj

needsIobj = nil · Source

Whether the command requires an indirect entity argument.

needsReach

needsReach = true · Source

Require the selected object to be reachable for this action.

preCond

preCond(item, role) · Source

Return the preconditions needed for an argument in its resolved role.

rank

rank(item, role) · Source

Return an action-specific candidate rank for an argument and role.

report

report(c) · Source

Produce the action's report after successful execution.