threads are typed
This commit is contained in:
parent
d1a921a9ab
commit
80f29041f5
|
|
@ -20,6 +20,7 @@
|
|||
#include "config_express.h"
|
||||
#include "datagram.h"
|
||||
#include "referenceCount.h"
|
||||
#include "thread.h"
|
||||
#include "typedObject.h"
|
||||
#include "typedReferenceCount.h"
|
||||
#include "virtualFile.h"
|
||||
|
|
@ -40,6 +41,7 @@ extern void init_system_type_handles();
|
|||
ConfigureFn(config_express) {
|
||||
Datagram::init_type();
|
||||
ReferenceCount::init_type();
|
||||
Thread::init_type();
|
||||
TypedObject::init_type();
|
||||
TypedReferenceCount::init_type();
|
||||
VirtualFile::init_type();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "thread.h"
|
||||
|
||||
TypeHandle Thread::_type_handle;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Thread::Destructor
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#define THREAD_H
|
||||
|
||||
#include "pandabase.h"
|
||||
#include "referenceCount.h"
|
||||
#include "typedReferenceCount.h"
|
||||
#include "threadPriority.h"
|
||||
#include "threadImpl.h"
|
||||
#include "notify.h"
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
// will automatically be destructed if no other pointers
|
||||
// are referencing it.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class EXPCL_PANDAEXPRESS Thread : public ReferenceCount {
|
||||
class EXPCL_PANDAEXPRESS Thread : public TypedReferenceCount {
|
||||
public:
|
||||
INLINE Thread(const string &name);
|
||||
virtual ~Thread();
|
||||
|
|
@ -66,6 +66,20 @@ private:
|
|||
string _name;
|
||||
ThreadImpl _impl;
|
||||
friend ThreadImpl;
|
||||
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
TypedReferenceCount::init_type();
|
||||
register_type(_type_handle, "Thread",
|
||||
TypedReferenceCount::get_class_type());
|
||||
}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
#include "thread.I"
|
||||
|
|
|
|||
Loading…
Reference in New Issue