Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PStatThread Class Reference

A lightweight class that represents a single thread of execution to PStats. More...

#include <pStatThread.h>

List of all members.

Public Member Functions

 PStatThread (const string &name, PStatClient *client=NULL)
 Creates a new named thread.

 PStatThread (const PStatThread &copy)
void operator= (const PStatThread &copy)
void new_frame ()
 This must be called at the start of every "frame", whatever a frame may be deemed to be, to accumulate all the stats that have collected so far for the thread and ship them off to the server.


Private Member Functions

 PStatThread ()
 Normally, this constructor is called only from PStatClient.

 PStatThread (PStatClient *client, int index)
 Normally, this constructor is called only from PStatClient.


Private Attributes

PStatClient_client
int _index

Friends

class PStatClient
class PStatCollector


Detailed Description

A lightweight class that represents a single thread of execution to PStats.

It doesn't have any real connection to any actual threads, but it's used to differentiate tasks which run in different threads, so we can measure them properly. It is presently the user's responsibility to correctly differentiate the various threads.

Definition at line 48 of file pStatThread.h.


Constructor & Destructor Documentation

PStatThread::PStatThread  )  [inline, private]
 

Normally, this constructor is called only from PStatClient.

Use one of the constructors below to create your own Thread.

Definition at line 36 of file pStatThread.I.

References INLINE.

PStatThread::PStatThread PStatClient client,
int  index
[inline, private]
 

Normally, this constructor is called only from PStatClient.

Use one of the constructors below to create your own Thread.

Definition at line 52 of file pStatThread.I.

References _client, _index, INLINE, and NULL.

PStatThread::PStatThread const string &  name,
PStatClient client = NULL
[inline]
 

Creates a new named thread.

This will be used to unify tasks that share a common thread, and differentiate tasks that occur in different threads. If any two different PStatThread objects share the same name, then they are really the same thread.

Definition at line 75 of file pStatThread.I.

PStatThread::PStatThread const PStatThread &  copy  )  [inline]
 

Definition at line 96 of file pStatThread.I.

References _client, _index, and INLINE.


Member Function Documentation

void PStatThread::new_frame  )  [inline]
 

This must be called at the start of every "frame", whatever a frame may be deemed to be, to accumulate all the stats that have collected so far for the thread and ship them off to the server.

Definition at line 130 of file pStatThread.I.

void PStatThread::operator= const PStatThread &  copy  )  [inline]
 

Definition at line 110 of file pStatThread.I.


Friends And Related Function Documentation

friend class PStatClient [friend]
 

Definition at line 65 of file pStatThread.h.

friend class PStatCollector [friend]
 

Definition at line 66 of file pStatThread.h.


Member Data Documentation

PStatClient* PStatThread::_client [private]
 

Definition at line 62 of file pStatThread.h.

Referenced by PStatThread().

int PStatThread::_index [private]
 

Definition at line 63 of file pStatThread.h.

Referenced by PStatThread().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:54:31 2003 for Panda by doxygen1.3