Panda3D
 All Classes Functions Variables Enumerations
pStatThread.h
1 // Filename: pStatThread.h
2 // Created by: drose (11Jul00)
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 PSTATTHREAD_H
16 #define PSTATTHREAD_H
17 
18 #include "pandabase.h"
19 
20 #include "pStatClient.h"
21 #include "pStatFrameData.h"
22 
23 class Thread;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PStatThread
27 // Description : A lightweight class that represents a single thread
28 // of execution to PStats. It corresponds one-to-one
29 // with Panda's Thread instance.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDA_PSTATCLIENT PStatThread {
32 private:
33  INLINE PStatThread();
34 
35 PUBLISHED:
36  INLINE PStatThread(PStatClient *client, int index);
37  INLINE PStatThread(Thread *thread, PStatClient *client = NULL);
38 
39  INLINE PStatThread(const PStatThread &copy);
40  INLINE void operator = (const PStatThread &copy);
41 
42  INLINE void new_frame();
43  INLINE void add_frame(const PStatFrameData &frame_data);
44 
45  Thread *get_thread() const;
46  INLINE int get_index() const;
47 
48 private:
49  PStatClient *_client;
50  int _index;
51 
52 friend class PStatClient;
53 friend class PStatCollector;
54 };
55 
56 #include "pStatThread.I"
57 
58 #endif
59 
A lightweight class that represents a single element that may be timed and/or counted via stats...
Contains the raw timing and level data for a single frame.
A lightweight class that represents a single thread of execution to PStats.
Definition: pStatThread.h:31
A thread; that is, a lightweight process.
Definition: thread.h:51
Manages the communications to report statistics via a network connection to a remote PStatServer...
Definition: pStatClient.h:261