Panda3D
|
00001 // Filename: pStatThread.h 00002 // Created by: drose (11Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PSTATTHREAD_H 00016 #define PSTATTHREAD_H 00017 00018 #include "pandabase.h" 00019 00020 #include "pStatClient.h" 00021 00022 class Thread; 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : PStatThread 00026 // Description : A lightweight class that represents a single thread 00027 // of execution to PStats. It corresponds one-to-one 00028 // with Panda's Thread instance. 00029 //////////////////////////////////////////////////////////////////// 00030 class EXPCL_PANDA_PSTATCLIENT PStatThread { 00031 private: 00032 INLINE PStatThread(); 00033 INLINE PStatThread(PStatClient *client, int index); 00034 00035 PUBLISHED: 00036 INLINE PStatThread(Thread *thread, PStatClient *client = NULL); 00037 00038 INLINE PStatThread(const PStatThread ©); 00039 INLINE void operator = (const PStatThread ©); 00040 00041 INLINE void new_frame(); 00042 00043 Thread *get_thread() const; 00044 INLINE int get_index() const; 00045 00046 private: 00047 PStatClient *_client; 00048 int _index; 00049 00050 friend class PStatClient; 00051 friend class PStatCollector; 00052 }; 00053 00054 #include "pStatThread.I" 00055 00056 #endif 00057