14#ifndef ASYNCTASKCOLLECTION_H
15#define ASYNCTASKCOLLECTION_H
27class EXPCL_PANDA_EVENT AsyncTaskCollection {
29 AsyncTaskCollection();
30 AsyncTaskCollection(
const AsyncTaskCollection ©);
31 void operator = (
const AsyncTaskCollection ©);
32 INLINE ~AsyncTaskCollection();
48 AsyncTask *operator [] (
size_t index)
const;
50 INLINE
void operator += (
const AsyncTaskCollection &other);
51 INLINE AsyncTaskCollection operator + (
const AsyncTaskCollection &other)
const;
53 void output(std::ostream &out)
const;
54 void write(std::ostream &out,
int indent_level = 0)
const;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A list of tasks, for instance as returned by some of the AsyncTaskManager query functions.
void write(std::ostream &out, int indent_level=0) const
Writes a complete multi-line description of the AsyncTaskCollection to the indicated output stream.
bool has_task(AsyncTask *task) const
Returns true if the indicated AsyncTask appears in this collection, false otherwise.
void output(std::ostream &out) const
Writes a brief one-line description of the AsyncTaskCollection to the indicated output stream.
get_num_tasks
Returns the number of AsyncTasks in the collection.
void add_task(AsyncTask *task)
Adds a new AsyncTask to the collection.
size_t size() const
Returns the number of tasks in the collection.
get_task
Returns the nth AsyncTask in the collection.
void add_tasks_from(const AsyncTaskCollection &other)
Adds all the AsyncTasks indicated in the other collection to this task.
void clear()
Removes all AsyncTasks from the collection.
AsyncTask * find_task(const std::string &name) const
Returns the task in the collection with the indicated name, if any, or NULL if no task has that name.
void remove_duplicate_tasks()
Removes any duplicate entries of the same AsyncTasks on this collection.
void remove_tasks_from(const AsyncTaskCollection &other)
Removes from this collection all of the AsyncTasks listed in the other collection.
bool remove_task(AsyncTask *task)
Removes the indicated AsyncTask from the collection.
This class represents a concrete task performed by an AsyncManager.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.