Panda3D
 All Classes Functions Variables Enumerations
pStatMonitor.I
00001 // Filename: pStatMonitor.I
00002 // Created by:  drose (14Jul00)
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 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: PStatMonitor::get_server
00018 //       Access: Public
00019 //  Description: Returns the server that owns this monitor.
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE PStatServer *PStatMonitor::
00022 get_server() {
00023   return _server;
00024 }
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: PStatMonitor::get_client_data
00028 //       Access: Public
00029 //  Description: Returns the client data associated with this monitor.
00030 ////////////////////////////////////////////////////////////////////
00031 INLINE const PStatClientData *PStatMonitor::
00032 get_client_data() const {
00033   return _client_data;
00034 }
00035 
00036 ////////////////////////////////////////////////////////////////////
00037 //     Function: PStatMonitor::get_collector_name
00038 //       Access: Public
00039 //  Description: Returns the name of the indicated collector, if it is
00040 //               known.
00041 ////////////////////////////////////////////////////////////////////
00042 INLINE string PStatMonitor::
00043 get_collector_name(int collector_index) {
00044   if (!_client_data.is_null() &&
00045       _client_data->has_collector(collector_index)) {
00046     return _client_data->get_collector_name(collector_index);
00047   }
00048   return "Unknown";
00049 }
00050 
00051 ////////////////////////////////////////////////////////////////////
00052 //     Function: PStatMonitor::is_client_known
00053 //       Access: Public
00054 //  Description: Returns true if we've yet received the "hello"
00055 //               message from the client indicating its name, etc.
00056 ////////////////////////////////////////////////////////////////////
00057 INLINE bool PStatMonitor::
00058 is_client_known() const {
00059   return _client_known;
00060 }
00061 
00062 ////////////////////////////////////////////////////////////////////
00063 //     Function: PStatMonitor::get_client_hostname
00064 //       Access: Public
00065 //  Description: Returns the hostname of the client we're connected
00066 //               to, if known.  This may not be known immediately at
00067 //               creation time, but should be learned shortly
00068 //               thereafter when we receive the client's "hello"
00069 //               message.  See is_client_known().
00070 ////////////////////////////////////////////////////////////////////
00071 INLINE string PStatMonitor::
00072 get_client_hostname() const {
00073   return _client_hostname;
00074 }
00075 
00076 ////////////////////////////////////////////////////////////////////
00077 //     Function: PStatMonitor::get_client_progname
00078 //       Access: Public
00079 //  Description: Returns the program name of the client we're
00080 //               connected to, if known.  This may not be known
00081 //               immediately at creation time, but should be learned
00082 //               shortly thereafter when we receive the client's
00083 //               "hello" message.  See is_client_known().
00084 ////////////////////////////////////////////////////////////////////
00085 INLINE string PStatMonitor::
00086 get_client_progname() const {
00087   return _client_progname;
00088 }
 All Classes Functions Variables Enumerations