Package svs_simulation :: Package ai_lib :: Module tasks :: Class CompositeTask
[show private | hide private]
[frames | no frames]

Class CompositeTask

Task --+
       |
      CompositeTask

Known Subclasses:
TaskManager

A composite task has subtasks which it processes as part of its own behaviour.
Method Summary
  __init__(self, agent)
  activate(self)
Logic to run when the task is activated.
  addSubtask(self, subtask)
Adds new subtask.
  forwardEventToFrontSubtask(self, event)
Passes the message to the task at the front of the queue
  handleEvent(self, event)
Handles event from game system.
  process(self)
Logic to run each update-step.
  processSubtasks()
Processes subtasks.
  removeAllSubtasks(self)
Clears all subtasks.
  terminate(self)
Logic to run prior to the task's destruction.
    Inherited from Task
  activateIfInactive(self)
Reactivates the task if Task.status is task_state.INACTIVE.
  hasFailed(self)
  isActive(self)
  isComplete(self)
  isInactive(self)
  reactivateIfFailed(self)
If Task.status is task_state.FAILED this method sets it to inactive so that the task will be reactivated (replanned) on the next update-step.

Method Details

activate(self)

Logic to run when the task is activated.
Overrides:
svs_simulation.ai_lib.tasks.Task.activate

addSubtask(self, subtask)

Adds new subtask.
Overrides:
svs_simulation.ai_lib.tasks.Task.addSubtask

forwardEventToFrontSubtask(self, event)

Passes the message to the task at the front of the queue

handleEvent(self, event)

Handles event from game system.
Overrides:
svs_simulation.ai_lib.tasks.Task.handleEvent

process(self)

Logic to run each update-step.
Overrides:
svs_simulation.ai_lib.tasks.Task.process

processSubtasks()

Processes subtasks.

removeAllSubtasks(self)

Clears all subtasks.

terminate(self)

Logic to run prior to the task's destruction.
Overrides:
svs_simulation.ai_lib.tasks.Task.terminate

Generated by Epydoc 2.1 on Thu Oct 20 15:30:26 2005 http://epydoc.sf.net