Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# AsyncTaskCollection Class Reference

A list of tasks, for instance as returned by some of the AsyncTaskManager query functions. More...

Inheritance diagram for AsyncTaskCollection:

List of all members.

## Public Member Functions
| AsyncTaskCollection ()
| AsyncTaskCollection (AsyncTaskCollection const copy)
| addTask (AsyncTask task)
| Adds a new AsyncTask to the collection.
| addTasksFrom (AsyncTaskCollection const other)
| Adds all the AsyncTasks indicated in the other collection to this task.
| clear ()
| Removes all AsyncTasks from the collection.
AsyncTask | findTask (string name)
| Returns the task in the collection with the indicated name, if any, or NULL if no task has that name.
int | getNumTasks ()
| Returns the number of AsyncTasks in the collection.
AsyncTask | getTask (int index)
| Returns the nth AsyncTask in the collection.
list | getTasks ()
bool | hasTask (AsyncTask task)
| Returns true if the indicated AsyncTask appears in this collection, false otherwise.
AsyncTaskCollection | operator+ (AsyncTaskCollection const other)
| Returns a AsyncTaskCollection representing the concatenation of the two lists.
AsyncTaskCollection | operator+= (AsyncTaskCollection const other)
| Appends the other list onto the end of this one.
AsyncTaskCollection | operator= (AsyncTaskCollection const copy)
AsyncTask | operator[] (int index)
| Returns the nth AsyncTask in the collection.
| output (ostream out)
| Writes a brief one-line description of the AsyncTaskCollection to the indicated output stream.
| removeDuplicateTasks ()
| Removes any duplicate entries of the same AsyncTasks on this collection.
| removeTask (int index)
| Removes the nth AsyncTask from the collection.
bool | removeTask (AsyncTask task)
| Removes the indicated AsyncTask from the collection.
| removeTasksFrom (AsyncTaskCollection const other)
| Removes from this collection all of the AsyncTasks listed in the other collection.
int | size ()
| Returns the number of tasks in the collection.
| write (ostream out, int indent_level)
| Writes a complete multi-line description of the AsyncTaskCollection to the indicated output stream.
| write (ostream out)
| Writes a complete multi-line description of the AsyncTaskCollection to the indicated output stream.

## Detailed Description

A list of tasks, for instance as returned by some of the AsyncTaskManager query functions.

This also serves to define an AsyncTaskSequence.

TODO: None of this is thread-safe yet.

## Constructor & Destructor Documentation

AsyncTaskCollection | ( |  | ) |

AsyncTaskCollection | ( | AsyncTaskCollection const | copy | ) |

## Member Function Documentation

addTask | ( | AsyncTask | task | ) |

Adds a new AsyncTask to the collection.

addTasksFrom | ( | AsyncTaskCollection const | other | ) |

Adds all the AsyncTasks indicated in the other collection to this task.

The other tasks are simply appended to the end of the tasks in this list; duplicates are not automatically removed.

clear | ( |  | ) |

Removes all AsyncTasks from the collection.

AsyncTask findTask | ( | string | name | ) |

Returns the task in the collection with the indicated name, if any, or NULL if no task has that name.

int getNumTasks | ( |  | ) |

Returns the number of AsyncTasks in the collection.

AsyncTask getTask | ( | int | index | ) |

Returns the nth AsyncTask in the collection.

list getTasks | ( |  | ) |

bool hasTask | ( | AsyncTask | task | ) |

Returns true if the indicated AsyncTask appears in this collection, false otherwise.

AsyncTaskCollection operator+ | ( | AsyncTaskCollection const | other | ) |

Returns a AsyncTaskCollection representing the concatenation of the two lists.

AsyncTaskCollection operator+= | ( | AsyncTaskCollection const | other | ) |

Appends the other list onto the end of this one.

AsyncTaskCollection operator= | ( | AsyncTaskCollection const | copy | ) |

AsyncTask operator[] | ( | int | index | ) |

Returns the nth AsyncTask in the collection.

This is the same as get_task(), but it may be a more convenient way to access it.

output | ( | ostream | out | ) |

Writes a brief one-line description of the AsyncTaskCollection to the indicated output stream.

removeDuplicateTasks | ( |  | ) |

Removes any duplicate entries of the same AsyncTasks on this collection.

If a AsyncTask appears multiple times, the first appearance is retained; subsequent appearances are removed.

bool removeTask | ( | AsyncTask | task | ) |

Removes the indicated AsyncTask from the collection.

Returns true if the task was removed, false if it was not a member of the collection.

removeTask | ( | int | index | ) |

Removes the nth AsyncTask from the collection.

removeTasksFrom | ( | AsyncTaskCollection const | other | ) |

Removes from this collection all of the AsyncTasks listed in the other collection.

int size | ( |  | ) |

Returns the number of tasks in the collection.

This is the same thing as get_num_tasks().

write | ( | ostream | out | ) |

Writes a complete multi-line description of the AsyncTaskCollection to the indicated output stream.

write | ( | ostream | out,
|  | int | indent_level
| ) |  |

Writes a complete multi-line description of the AsyncTaskCollection to the indicated output stream.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties