14 #ifndef GENERICASYNCTASK_H 15 #define GENERICASYNCTASK_H 30 typedef void DeathFunc(
GenericAsyncTask *task,
bool clean_exit,
void *user_data);
33 GenericAsyncTask(
const std::string &name, TaskFunc *
function,
void *user_data);
36 INLINE
void set_function(TaskFunc *
function);
37 INLINE TaskFunc *get_function()
const;
39 INLINE
void set_upon_birth(BirthFunc *
function);
40 INLINE BirthFunc *get_upon_birth()
const;
42 INLINE
void set_upon_death(DeathFunc *
function);
43 INLINE DeathFunc *get_upon_death()
const;
45 INLINE
void set_user_data(
void *user_data);
46 INLINE
void *get_user_data()
const;
49 virtual bool is_runnable();
50 virtual DoneStatus do_task();
56 BirthFunc *_upon_birth;
57 DeathFunc *_upon_death;
64 static void init_type() {
65 AsyncTask::init_type();
67 AsyncTask::get_class_type());
70 return get_class_type();
72 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to manage a loose queue of isolated tasks, which can be performed either synchronously (in th...
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Associates a generic C-style function pointer with an AsyncTask object.
This class represents a concrete task performed by an AsyncManager.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.