Panda3D
textMonitor.h
1 // Filename: textMonitor.h
2 // Created by: drose (12Jul00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef TEXTMONITOR_H
16 #define TEXTMONITOR_H
17 
18 #include "pandatoolbase.h"
19 #include "pStatMonitor.h"
20 
21 //[PECI]
22 #include <iostream>
23 #include <fstream>
24 
25 class TextStats;
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : TextMonitor
29 // Description : A simple, scrolling-text stats monitor. Guaranteed
30 // to compile on every platform.
31 ////////////////////////////////////////////////////////////////////
32 class TextMonitor : public PStatMonitor {
33 public:
34  TextMonitor(TextStats *server, ostream *outStream, bool show_raw_data);
36 
37  virtual string get_monitor_name();
38 
39  virtual void got_hello();
40  virtual void got_bad_version(int client_major, int client_minor,
41  int server_major, int server_minor);
42  virtual void new_data(int thread_index, int frame_number);
43  virtual void lost_connection();
44  virtual bool is_thread_safe();
45 
46  void show_ms(const PStatViewLevel *level, int indent_level);
47  void show_level(const PStatViewLevel *level, int indent_level);
48 
49 private:
50  ostream *_outStream; //[PECI]
51  bool _show_raw_data;
52 };
53 
54 #include "textMonitor.I"
55 
56 #endif
virtual string get_monitor_name()
Should be redefined to return a descriptive name for the type of PStatsMonitor this is...
Definition: textMonitor.cxx:50
virtual void lost_connection()
Called whenever the connection to the client has been lost.
TextStats * get_server()
Returns the server that owns this monitor.
Definition: textMonitor.cxx:39
This is a single level value, or band of color, within a View.
A simple, scrolling-text stats server.
Definition: textStats.h:31
This is an abstract class that presents the interface to any number of different front-ends for the s...
Definition: pStatMonitor.h:43
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...
Definition: textMonitor.cxx:79
A simple, scrolling-text stats monitor.
Definition: textMonitor.h:32
virtual void got_hello()
Called when the "hello" message has been received from the client.
Definition: textMonitor.cxx:62
virtual bool is_thread_safe()
Should be redefined to return true if this monitor class can handle running in a sub-thread.
virtual void new_data(int thread_index, int frame_number)
Called as each frame&#39;s data is made available.