Panda3D
|
00001 // Filename: textMonitor.h 00002 // Created by: drose (12Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef TEXTMONITOR_H 00016 #define TEXTMONITOR_H 00017 00018 #include "pandatoolbase.h" 00019 #include "pStatMonitor.h" 00020 00021 //[PECI] 00022 #include <iostream> 00023 #include <fstream> 00024 00025 class TextStats; 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Class : TextMonitor 00029 // Description : A simple, scrolling-text stats monitor. Guaranteed 00030 // to compile on every platform. 00031 //////////////////////////////////////////////////////////////////// 00032 class TextMonitor : public PStatMonitor { 00033 public: 00034 TextMonitor(TextStats *server, ostream *outStream, bool show_raw_data); 00035 TextStats *get_server(); 00036 00037 virtual string get_monitor_name(); 00038 00039 virtual void got_hello(); 00040 virtual void got_bad_version(int client_major, int client_minor, 00041 int server_major, int server_minor); 00042 virtual void new_data(int thread_index, int frame_number); 00043 virtual void lost_connection(); 00044 virtual bool is_thread_safe(); 00045 00046 void show_ms(const PStatViewLevel *level, int indent_level); 00047 void show_level(const PStatViewLevel *level, int indent_level); 00048 00049 private: 00050 ostream *_outStream; //[PECI] 00051 bool _show_raw_data; 00052 }; 00053 00054 #include "textMonitor.I" 00055 00056 #endif