Panda3D
Public Member Functions

TextMonitor Class Reference

A simple, scrolling-text stats monitor. More...

#include "textMonitor.h"

Inheritance diagram for TextMonitor:
PStatMonitor ReferenceCount MemoryBase

List of all members.

Public Member Functions

 TextMonitor (TextStats *server, ostream *outStream, bool show_raw_data)
virtual string get_monitor_name ()
 Should be redefined to return a descriptive name for the type of PStatsMonitor this is.
TextStatsget_server ()
 Returns the server that owns this monitor.
virtual void got_bad_version (int client_major, int client_minor, int server_major, int server_minor)
 Like got_hello(), this is called when the "hello" message has been received from the client.
virtual void got_hello ()
 Called when the "hello" message has been received from the client.
virtual bool is_thread_safe ()
 Should be redefined to return true if this monitor class can handle running in a sub-thread.
virtual void lost_connection ()
 Called whenever the connection to the client has been lost.
virtual void new_data (int thread_index, int frame_number)
 Called as each frame's data is made available.
void show_level (const PStatViewLevel *level, int indent_level)
void show_ms (const PStatViewLevel *level, int indent_level)

Detailed Description

A simple, scrolling-text stats monitor.

Guaranteed to compile on every platform.

Definition at line 32 of file textMonitor.h.


Member Function Documentation

string TextMonitor::get_monitor_name ( ) [virtual]

Should be redefined to return a descriptive name for the type of PStatsMonitor this is.

Implements PStatMonitor.

Definition at line 50 of file textMonitor.cxx.

TextStats * TextMonitor::get_server ( )

Returns the server that owns this monitor.

Reimplemented from PStatMonitor.

Definition at line 39 of file textMonitor.cxx.

void TextMonitor::got_bad_version ( int  client_major,
int  client_minor,
int  server_major,
int  server_minor 
) [virtual]

Like got_hello(), this is called when the "hello" message has been received from the client.

At this time, the client's hostname and program name will be known. However, the client appears to be an incompatible version and the connection will be terminated; the monitor should issue a message to that effect.

Reimplemented from PStatMonitor.

Definition at line 79 of file textMonitor.cxx.

References PStatMonitor::get_client_hostname(), and PStatMonitor::get_client_progname().

void TextMonitor::got_hello ( ) [virtual]

Called when the "hello" message has been received from the client.

At this time, the client's hostname and program name will be known.

Reimplemented from PStatMonitor.

Definition at line 62 of file textMonitor.cxx.

References PStatMonitor::get_client_hostname(), and PStatMonitor::get_client_progname().

bool TextMonitor::is_thread_safe ( ) [virtual]

Should be redefined to return true if this monitor class can handle running in a sub-thread.

This is not related to the question of whether it can handle multiple different PStatThreadDatas; this is strictly a question of whether or not the monitor itself wants to run in a sub-thread.

Reimplemented from PStatMonitor.

Definition at line 186 of file textMonitor.cxx.

void TextMonitor::lost_connection ( ) [virtual]

Called whenever the connection to the client has been lost.

This is a permanent state change. The monitor should update its display to represent this, and may choose to close down automatically.

Reimplemented from PStatMonitor.

Definition at line 170 of file textMonitor.cxx.

void TextMonitor::new_data ( int  thread_index,
int  frame_number 
) [virtual]

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations