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

PStatCollector Class Reference

A lightweight class that represents a single element that may be timed and/or counted via stats. More...

#include <pStatCollector.h>

List of all members.

Public Member Functions

 PStatCollector (const string &name, PStatClient *client=NULL)
 This bogus version of the function is only defined if DO_PSTATS is not defined, meaning all these functions should compile to nothing.

 PStatCollector (const PStatCollector &parent, const string &name)
 This bogus version of the function is only defined if DO_PSTATS is not defined, meaning all these functions should compile to nothing.

bool is_active ()
void start ()
void stop ()
void clear_level ()
void set_level (float)
void add_level (float)
void sub_level (float)
float get_level ()
bool is_active (const PStatThread &)
void start (const PStatThread &)
void start (const PStatThread &, float)
void stop (const PStatThread &)
void stop (const PStatThread &, float)
void clear_level (const PStatThread &)
void set_level (const PStatThread &, float)
void add_level (const PStatThread &, float)
void sub_level (const PStatThread &, float)
float get_level (const PStatThread &)


Detailed Description

A lightweight class that represents a single element that may be timed and/or counted via stats.

Collectors can be used to measure two different kinds of values: elapsed time, and "other".

To measure elapsed time, call start() and stop() as appropriate to bracket the section of code you want to time (or use a PStatTimer to do this automatically).

To measure anything else, call set_level() and/or add_level() to set the "level" value associated with this collector. The meaning of the value set for the "level" is entirely up to the user; it may represent the number of triangles rendered or the kilobytes of texture memory consumed, for instance. The level set will remain fixed across multiple frames until it is reset via another set_level() or adjusted via a call to add_level(). It may also be completely removed via clear_level().

Definition at line 79 of file pStatCollector.h.


Constructor & Destructor Documentation

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

This bogus version of the function is only defined if DO_PSTATS is not defined, meaning all these functions should compile to nothing.

Definition at line 513 of file pStatCollector.I.

PStatCollector::PStatCollector const PStatCollector &  parent,
const string &  name
[inline]
 

This bogus version of the function is only defined if DO_PSTATS is not defined, meaning all these functions should compile to nothing.

Definition at line 536 of file pStatCollector.I.


Member Function Documentation

void PStatCollector::add_level const PStatThread ,
float 
[inline]
 

Definition at line 150 of file pStatCollector.h.

void PStatCollector::add_level float   )  [inline]
 

Definition at line 137 of file pStatCollector.h.

Referenced by GraphicsStateGuardian::bind_light(), GLGraphicsStateGuardian::draw_point(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_prim_inner_loop_coordtexonly(), GLGraphicsStateGuardian::draw_quad(), GraphicsStateGuardian::enable_clip_planes(), GraphicsStateGuardian::end_bind_lights(), GLGraphicsStateGuardian::prepare_geom_node(), CRGraphicsStateGuardian::prepare_lens(), and GraphicsStateGuardian::slot_new_clip_plane().

void PStatCollector::clear_level const PStatThread  )  [inline]
 

Definition at line 148 of file pStatCollector.h.

void PStatCollector::clear_level  )  [inline]
 

Definition at line 135 of file pStatCollector.h.

Referenced by GraphicsStateGuardian::set_ambient_light().

float PStatCollector::get_level const PStatThread  )  [inline]
 

Definition at line 152 of file pStatCollector.h.

float PStatCollector::get_level  )  [inline]
 

Definition at line 139 of file pStatCollector.h.

bool PStatCollector::is_active const PStatThread  )  [inline]
 

Definition at line 142 of file pStatCollector.h.

bool PStatCollector::is_active  )  [inline]
 

Definition at line 131 of file pStatCollector.h.

void PStatCollector::set_level const PStatThread ,
float 
[inline]
 

Definition at line 149 of file pStatCollector.h.

void PStatCollector::set_level float   )  [inline]
 

Definition at line 136 of file pStatCollector.h.

void PStatCollector::start const PStatThread ,
float 
[inline]
 

Definition at line 144 of file pStatCollector.h.

void PStatCollector::start const PStatThread  )  [inline]
 

Definition at line 143 of file pStatCollector.h.

void PStatCollector::start void   )  [inline]
 

Definition at line 132 of file pStatCollector.h.

Referenced by GLGraphicsStateGuardian::draw_quad().

void PStatCollector::stop const PStatThread ,
float 
[inline]
 

Definition at line 146 of file pStatCollector.h.

void PStatCollector::stop const PStatThread  )  [inline]
 

Definition at line 145 of file pStatCollector.h.

void PStatCollector::stop void   )  [inline]
 

Definition at line 133 of file pStatCollector.h.

void PStatCollector::sub_level const PStatThread ,
float 
[inline]
 

Definition at line 151 of file pStatCollector.h.

void PStatCollector::sub_level float   )  [inline]
 

Definition at line 138 of file pStatCollector.h.

Referenced by GraphicsStateGuardian::bind_light(), and GraphicsStateGuardian::slot_new_light().


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