Panda3D
winStatsMonitor.I
1 // Filename: winStatsMonitor.I
2 // Created by: drose (09Jan04)
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: WinStatsMonitor::MenuDef::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 WinStatsMonitor::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 {
27 }
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function: WinStatsMonitor::MenuDef::operator <
31 // Access: Public
32 // Description:
33 ////////////////////////////////////////////////////////////////////
34 bool WinStatsMonitor::MenuDef::
35 operator < (const MenuDef &other) const {
36  if (_thread_index != other._thread_index) {
37  return _thread_index < other._thread_index;
38  }
39  if (_collector_index != other._collector_index) {
40  return _collector_index < other._collector_index;
41  }
42  return (int)_show_level < (int)other._show_level;
43 }