Public Member Functions |
|
| AsyncTaskSequence (const string &name) |
|
virtual TypeHandle | force_init_type () |
| int | get_current_task_index () const |
| | Returns the index of the task within the sequence that is currently being executed (or that will be executed at the next epoch).
|
| int | get_repeat_count () const |
| | Returns the repeat count of the sequence.
|
|
virtual TypeHandle | get_type () const |
| void | set_repeat_count (int repeat_count) |
| | Sets the repeat count of the sequence.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
|
static void | init_type () |
Protected Member Functions |
| virtual DoneStatus | do_task () |
| | Override this function to do something useful for the task.
|
| virtual bool | is_runnable () |
| | Override this function to return true if the task can be successfully executed, false if it cannot.
|
| virtual void | upon_birth (AsyncTaskManager *manager) |
| | Override this function to do something useful when the task has been added to the active queue.
|
| virtual void | upon_death (AsyncTaskManager *manager, bool clean_exit) |
| | Override this function to do something useful when the task has been removed from the active queue.
|
A special kind of task that serves as a list of tasks internally.
Each task on the list is executed in sequence, one per epoch.
This is similar to a Sequence interval, though it has some slightly different abilities. For instance, although you can't start at any arbitrary point in the sequence, you can construct a task sequence whose duration changes during playback.
Definition at line 37 of file asyncTaskSequence.h.
Override this function to return true if the task can be successfully executed, false if it cannot.
Mainly intended as a sanity check when attempting to add the task to a task manager.
This function is called with the lock held.
Reimplemented from AsyncTask.
Definition at line 53 of file asyncTaskSequence.cxx.
References AsyncTaskCollection::get_num_tasks().
Override this function to do something useful when the task has been removed from the active queue.
The parameter clean_exit is true if the task has been removed because it exited normally (returning DS_done), or false if it was removed for some other reason (e.g. AsyncTaskManager::remove()). By the time this method is called, _manager has been cleared, so the parameter manager indicates the original AsyncTaskManager that owned this task.
The normal behavior is to throw the done_event only if clean_exit is true.
This function is called with the lock held. You may temporarily release if it necessary, but be sure to return with it held.
Reimplemented from AsyncTask.
Definition at line 166 of file asyncTaskSequence.cxx.