#include <pStatClientData.h>
Inheritance diagram for PStatClientData:
Public Member Functions | |
PStatClientData (PStatReader *reader) | |
~PStatClientData () | |
bool | is_alive () const |
Returns true if the data is actively getting filled by a connected client, or false if the client has terminated. | |
void | close () |
Closes the client connection if it is open. | |
int | get_num_collectors () const |
Returns the total number of collectors the Data knows about. | |
bool | has_collector (int index) const |
Returns true if the indicated collector has been defined by the client already, false otherwise. | |
const PStatCollectorDef & | get_collector_def (int index) const |
Returns the nth collector definition. | |
string | get_collector_name (int index) const |
Returns the name of the indicated collector. | |
string | get_collector_fullname (int index) const |
Returns the "full name" of the indicated collector. | |
void | set_collector_has_level (int index, bool flag) |
Indicates whether the given collector has level data (and consequently, whether it should appear on the Levels menu). | |
bool | get_collector_has_level (int index) const |
Returns whether the given collector has level data (and consequently, whether it should appear on the Levels menu). | |
int | get_num_threads () const |
Returns the total number of threads the Data knows about. | |
bool | has_thread (int index) const |
Returns true if the indicated thread has been defined by the client already, false otherwise. | |
string | get_thread_name (int index) const |
Returns the name of the indicated thread. | |
const PStatThreadData * | get_thread_data (int index) const |
Returns the data associated with the indicated thread. | |
int | get_child_distance (int parent, int child) const |
Returns the number of Collectors between the indicated parent and the child Collector in the relationship graph. | |
void | add_collector (PStatCollectorDef *def) |
Adds a new collector definition to the dataset. | |
void | define_thread (int thread_index, const string &name=string()) |
Adds a new thread definition to the dataset. | |
void | record_new_frame (int thread_index, int frame_number, PStatFrameData *frame_data) |
Makes room for and stores a new frame's worth of data associated with some particular thread (which may or may not have already been defined). | |
int | get_major_version () const |
int | get_minor_version () const |
void | set_version (int major_version, int minor_version) |
bool | is_at_least (int major_version, int minor_version) const |
int | get_ref_count () const |
int | ref () const |
int | unref () const |
void | test_ref_count_integrity () const |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Protected Attributes | |
int | _major_version |
int | _minor_version |
int | _ref_count |
Static Protected Attributes | |
TypeHandle | _type_handle |
Private Types | |
typedef pvector< Collector > | Collectors |
typedef pvector< Thread > | Threads |
Private Member Functions | |
void | slot_collector (int collector_index) |
Makes sure there is an entry in the array for a collector with the given index number. | |
Private Attributes | |
bool | _is_alive |
PStatReader * | _reader |
Collectors | _collectors |
Threads | _threads |
Static Private Attributes | |
PStatCollectorDef | _null_collector |
Friends | |
class | PStatReader |
Definition at line 48 of file pStatClientData.h.
|
Definition at line 91 of file pStatClientData.h. |
|
Definition at line 99 of file pStatClientData.h. |
|
Definition at line 39 of file pStatClientData.cxx. References _collectors. |
|
Definition at line 53 of file pStatClientData.cxx. References _is_alive. |
|
Adds a new collector definition to the dataset. Presumably this is information just arrived from the client. The pointer will become owned by the PStatClientData object and will be freed on destruction. Definition at line 353 of file pStatClientData.cxx. |
|
Closes the client connection if it is open.
Definition at line 86 of file pStatClientData.cxx. References _collectors. |
|
Adds a new thread definition to the dataset. Presumably this is information just arrived from the client. Definition at line 378 of file pStatClientData.cxx. Referenced by get_child_distance(). |
|
Returns the number of Collectors between the indicated parent and the child Collector in the relationship graph. If child is the same as parent, returns zero. If child is an immediate child of parent, returns 1. If child is a grandchild of parent, returns 2, and so on. If child is not a descendant of parent at all, returns -1. Definition at line 319 of file pStatClientData.cxx. References _threads, define_thread(), and nassertv. Referenced by get_num_threads(). |
|
Returns the nth collector definition.
Definition at line 138 of file pStatClientData.cxx. References _collectors, PStatCollectorDef::_name, PStatCollectorDef::_parent_index, get_collector_fullname(), and has_collector(). Referenced by PStatStripChart::begin_draw(), get_num_threads(), GtkStatsStripWindow::layout_window(), GtkStatsStripWindow::mark_dead(), GtkStatsStripWindow::new_collector(), and PStatStripChart::PStatStripChart(). |
|
Returns the "full name" of the indicated collector. This will be the concatenation of all of the collector's parents' names (except Frame) and the collector's own name. Definition at line 177 of file pStatClientData.cxx. References _collectors. Referenced by get_collector_def(). |
|
Returns whether the given collector has level data (and consequently, whether it should appear on the Levels menu).
Definition at line 223 of file pStatClientData.cxx. References _threads, nassertr, and NULL. Referenced by GtkStatsStripWindow::mark_dead(). |
|
Returns the name of the indicated collector.
Definition at line 154 of file pStatClientData.cxx. References _collectors, nassertv, and slot_collector(). |
|
Returns the total number of collectors the Data knows about.
Definition at line 105 of file pStatClientData.cxx. References _collectors, _null_collector, and has_collector(). Referenced by GtkStatsStripWindow::mark_dead(), PStatStripChart::new_data(), and PStatPianoRoll::PStatPianoRoll(). |
|
Returns the total number of threads the Data knows about.
Definition at line 239 of file pStatClientData.cxx. References get_child_distance(), get_collector_def(), and has_collector(). Referenced by PStatStripChart::new_data(), and PStatPianoRoll::PStatPianoRoll(). |
|
Returns the data associated with the indicated thread. This will create a thread definition if it does not already exist. Definition at line 292 of file pStatClientData.cxx. References _threads. Referenced by PStatPianoRoll::PStatPianoRoll(). |
|
Returns the name of the indicated thread.
Definition at line 272 of file pStatClientData.cxx. References _collectors, and NULL. Referenced by GtkStatsStripWindow::layout_window(). |
|
Returns true if the indicated collector has been defined by the client already, false otherwise. It is possible for the client to start streaming data before all of the collectors have been defined. Definition at line 124 of file pStatClientData.cxx. Referenced by get_collector_def(), get_num_collectors(), get_num_threads(), GtkStatsStripWindow::layout_window(), GtkStatsStripWindow::mark_dead(), and PStatStripChart::PStatStripChart(). |
|
Returns true if the indicated thread has been defined by the client already, false otherwise. It is possible for the client to start streaming data before all of the threads have been defined. Definition at line 258 of file pStatClientData.cxx. Referenced by GtkStatsStripWindow::layout_window(). |
|
Returns true if the data is actively getting filled by a connected client, or false if the client has terminated.
Definition at line 73 of file pStatClientData.cxx. |
|
Makes room for and stores a new frame's worth of data associated with some particular thread (which may or may not have already been defined). The pointer will become owned by the PStatThreadData object and will be freed on destruction. Definition at line 416 of file pStatClientData.cxx. |
|
Indicates whether the given collector has level data (and consequently, whether it should appear on the Levels menu).
Definition at line 203 of file pStatClientData.cxx. References _threads. |
|
Makes sure there is an entry in the array for a collector with the given index number.
Definition at line 434 of file pStatClientData.cxx. Referenced by get_collector_name(). |
|
Definition at line 103 of file pStatClientData.h. |
|
Definition at line 92 of file pStatClientData.h. Referenced by close(), get_collector_def(), get_collector_fullname(), get_collector_name(), get_num_collectors(), get_thread_name(), and PStatClientData(). |
|
Definition at line 82 of file pStatClientData.h. Referenced by is_alive(), and ~PStatClientData(). |
|
Referenced by get_num_collectors(). |
|
Definition at line 83 of file pStatClientData.h. Referenced by is_alive(). |
|
Definition at line 100 of file pStatClientData.h. Referenced by get_child_distance(), get_collector_has_level(), get_thread_data(), and set_collector_has_level(). |