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

PStatFrameData Class Reference

Contains the raw timing and level data for a single frame. More...

#include <pStatFrameData.h>

List of all members.

Public Member Functions

bool is_time_empty () const
 Returns true if there are no time events in the frame data, false otherwise.

bool is_level_empty () const
 Returns true if there are no levels indicated in the frame data, false otherwise.

bool is_empty () const
 Returns true if the FrameData has no time or level data.

void clear ()
 Removes all the data points from the frame data, in preparation for building up a new frame's worth.

void add_start (int index, float time)
 Adds a 'start collector' data point to the frame data.

void add_stop (int index, float time)
 Adds a 'stop collector' data point to the frame data.

void add_level (int index, float level)
 Adds a particular level value associated with a given collector to the frame data.

float get_start () const
 Returns the time of the first data point in the frame data.

float get_end () const
 Returns the time of the last data point in the frame data.

float get_net_time () const
 Returns the total time elapsed for the frame.

int get_num_events () const
 Returns the number of individual events stored in the FrameData.

int get_time_collector (int n) const
 Returns the index of the collector associated with the nth event.

bool is_start (int n) const
 Returns true if the nth event represents a start event, or false if it represents a stop event.

float get_time (int n) const
 Returns the timestamp of the nth event, in seconds elapsed since some undefined epoch (which is guaranteed to be shared among all events returned from a given client).

int get_num_levels () const
 Returns the number of individual level values stored in the FrameData.

int get_level_collector (int n) const
 Returns the index of the collector associated with the nth level value.

float get_level (int n) const
 Returns the height of the nth level value.

void write_datagram (Datagram &destination) const
 Writes the definition of the FrameData to the datagram.

void read_datagram (DatagramIterator &source, PStatClientVersion *version)
 Extracts the FrameData definition from the datagram.


Private Types

typedef pvector< DataPointData

Private Attributes

Data _time_data
Data _level_data


Detailed Description

Contains the raw timing and level data for a single frame.

This is a sequence of start/stop events, as well as a table of level values, associated with a number of collectors within a single frame.

Definition at line 48 of file pStatFrameData.h.


Member Typedef Documentation

typedef pvector<DataPoint> PStatFrameData::Data [private]
 

Definition at line 81 of file pStatFrameData.h.


Member Function Documentation

void PStatFrameData::add_level int  index,
float  level
[inline]
 

Adds a particular level value associated with a given collector to the frame data.

Definition at line 137 of file pStatFrameData.I.

References _time_data, INLINE, is_empty(), and nassertr.

void PStatFrameData::add_start int  index,
float  time
[inline]
 

Adds a 'start collector' data point to the frame data.

Definition at line 95 of file pStatFrameData.I.

References _time_data.

void PStatFrameData::add_stop int  index,
float  time
[inline]
 

Adds a 'stop collector' data point to the frame data.

Definition at line 116 of file pStatFrameData.I.

References _time_data, INLINE, is_empty(), and nassertr.

void PStatFrameData::clear void   )  [inline]
 

Removes all the data points from the frame data, in preparation for building up a new frame's worth.

Definition at line 79 of file pStatFrameData.I.

References _time_data.

float PStatFrameData::get_end  )  const [inline]
 

Returns the time of the last data point in the frame data.

This will generally be the time of the end of the frame.

Definition at line 179 of file pStatFrameData.I.

References _time_data, INLINE, and nassertr.

float PStatFrameData::get_level int  n  )  const [inline]
 

Returns the height of the nth level value.

Definition at line 307 of file pStatFrameData.I.

int PStatFrameData::get_level_collector int  n  )  const [inline]
 

Returns the index of the collector associated with the nth level value.

Definition at line 293 of file pStatFrameData.I.

float PStatFrameData::get_net_time  )  const [inline]
 

Returns the total time elapsed for the frame.

Definition at line 194 of file pStatFrameData.I.

References _time_data, INLINE, and nassertr.

int PStatFrameData::get_num_events  )  const [inline]
 

Returns the number of individual events stored in the FrameData.

Definition at line 211 of file pStatFrameData.I.

References _level_data, and INLINE.

int PStatFrameData::get_num_levels  )  const [inline]
 

Returns the number of individual level values stored in the FrameData.

Definition at line 278 of file pStatFrameData.I.

float PStatFrameData::get_start  )  const [inline]
 

Returns the time of the first data point in the frame data.

This will generally be the time of the start of the frame.

Definition at line 160 of file pStatFrameData.I.

References _time_data, and INLINE.

float PStatFrameData::get_time int  n  )  const [inline]
 

Returns the timestamp of the nth event, in seconds elapsed since some undefined epoch (which is guaranteed to be shared among all events returned from a given client).

Definition at line 262 of file pStatFrameData.I.

int PStatFrameData::get_time_collector int  n  )  const [inline]
 

Returns the index of the collector associated with the nth event.

Definition at line 226 of file pStatFrameData.I.

bool PStatFrameData::is_empty  )  const [inline]
 

Returns true if the FrameData has no time or level data.

Definition at line 64 of file pStatFrameData.I.

References PStatFrameData::DataPoint::_index, PStatFrameData::DataPoint::_value, INLINE, and nassertv.

Referenced by add_level(), and add_stop().

bool PStatFrameData::is_level_empty  )  const [inline]
 

Returns true if there are no levels indicated in the frame data, false otherwise.

Definition at line 49 of file pStatFrameData.I.

References is_time_empty().

bool PStatFrameData::is_start int  n  )  const [inline]
 

Returns true if the nth event represents a start event, or false if it represents a stop event.

Definition at line 242 of file pStatFrameData.I.

bool PStatFrameData::is_time_empty  )  const [inline]
 

Returns true if there are no time events in the frame data, false otherwise.

Definition at line 34 of file pStatFrameData.I.

References _level_data, and INLINE.

Referenced by is_level_empty().

void PStatFrameData::read_datagram DatagramIterator source,
PStatClientVersion version
 

Extracts the FrameData definition from the datagram.

Definition at line 62 of file pStatFrameData.cxx.

References _time_data.

void PStatFrameData::write_datagram Datagram destination  )  const
 

Writes the definition of the FrameData to the datagram.

Definition at line 39 of file pStatFrameData.cxx.


Member Data Documentation

Data PStatFrameData::_level_data [private]
 

Definition at line 83 of file pStatFrameData.h.

Referenced by get_num_events(), and is_time_empty().

Data PStatFrameData::_time_data [private]
 

Definition at line 83 of file pStatFrameData.h.

Referenced by add_level(), add_start(), add_stop(), clear(), get_end(), get_net_time(), get_start(), and read_datagram().


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