Panda3D
 All Classes Functions Variables Enumerations
externalThread.h
1 // Filename: externalThread.h
2 // Created by: drose (30Jan06)
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 EXTERNALTHREAD_H
16 #define EXTERNALTHREAD_H
17 
18 #include "pandabase.h"
19 #include "thread.h"
20 
21 ////////////////////////////////////////////////////////////////////
22 // Class : ExternalThread
23 // Description : The special "external thread" class. There is one
24 // instance of these in the world, and it is returned by
25 // Thread::get_external_thread().
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDA_PIPELINE ExternalThread : public Thread {
28 private:
30  ExternalThread(const string &name, const string &sync_name);
31  virtual void thread_main();
32 
33 PUBLISHED:
34  static TypeHandle get_class_type() {
35  return _type_handle;
36  }
37 public:
38  static void init_type() {
39  Thread::init_type();
40  register_type(_type_handle, "ExternalThread",
41  Thread::get_class_type());
42  }
43  virtual TypeHandle get_type() const {
44  return get_class_type();
45  }
46  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
47 
48 private:
49  static TypeHandle _type_handle;
50 
51  friend class Thread;
52 };
53 
54 #endif
The special "external thread" class.
A thread; that is, a lightweight process.
Definition: thread.h:51
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85