Panda3D
 All Classes Functions Variables Enumerations
gtkStatsMonitor.I
1 // Filename: gtkStatsMonitor.I
2 // Created by: drose (16Jan06)
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: GtkStatsMonitor::MenuDef::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 GtkStatsMonitor::MenuDef::
22 MenuDef(int thread_index, int collector_index, bool show_level) :
23  _thread_index(thread_index),
24  _collector_index(collector_index),
25  _show_level(show_level),
26  _monitor(NULL)
27 {
28 }
29 
30 ////////////////////////////////////////////////////////////////////
31 // Function: GtkStatsMonitor::MenuDef::operator <
32 // Access: Public
33 // Description:
34 ////////////////////////////////////////////////////////////////////
35 bool GtkStatsMonitor::MenuDef::
36 operator < (const MenuDef &other) const {
37  if (_thread_index != other._thread_index) {
38  return _thread_index < other._thread_index;
39  }
40  if (_collector_index != other._collector_index) {
41  return _collector_index < other._collector_index;
42  }
43  return (int)_show_level < (int)other._show_level;
44 }