Panda3D
asyncTaskPause.h
1 // Filename: asyncTaskPause.h
2 // Created by: drose (04Oct08)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef ASYNCTASKPAUSE_H
16 #define ASYNCTASKPAUSE_H
17 
18 #include "pandabase.h"
19 
20 #include "asyncTask.h"
21 
22 class AsyncTaskManager;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : AsyncTaskPause
26 // Description : A special kind of task that simple returns DS_pause,
27 // to pause for a specified number of seconds and then
28 // finish. It's intended to be used within an
29 // AsyncTaskSequence.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDA_EVENT AsyncTaskPause : public AsyncTask {
32 PUBLISHED:
33  AsyncTaskPause(double delay);
34  ALLOC_DELETED_CHAIN(AsyncTaskPause);
35 
36 protected:
37  virtual DoneStatus do_task();
38 
39 public:
40  static TypeHandle get_class_type() {
41  return _type_handle;
42  }
43  static void init_type() {
44  AsyncTask::init_type();
45  register_type(_type_handle, "AsyncTaskPause",
46  AsyncTask::get_class_type());
47  }
48  virtual TypeHandle get_type() const {
49  return get_class_type();
50  }
51  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
52 
53 private:
54  static TypeHandle _type_handle;
55 };
56 
57 #include "asyncTaskPause.I"
58 
59 #endif
60 
A special kind of task that simple returns DS_pause, to pause for a specified number of seconds and t...
A class to manage a loose queue of isolated tasks, which can be performed either synchronously (in th...
This class represents a concrete task performed by an AsyncManager.
Definition: asyncTask.h:43
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85