Changeset 858
- Timestamp:
- 07/29/07 15:13:54 (1 year ago)
- Files:
-
- branches/fcptr_stable_jun07/Source/System/Statistics/Foregrounds/OSGPerfMonitorForeground.cpp (modified) (1 diff)
- branches/fcptr_stable_jun07/Source/System/Statistics/Foregrounds/OSGPerfMonitorForeground.h (modified) (1 diff)
- branches/fcptr_stable_jun07/Source/System/Statistics/Foregrounds/testPerfMonitorForeground.cpp (modified) (1 diff)
- branches/fcptr_stable_jun07/Source/System/Statistics/PerfMonitor/OSGPerfMonitor.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/fcptr_stable_jun07/Source/System/Statistics/Foregrounds/OSGPerfMonitorForeground.cpp
r857 r858 119 119 120 120 /*----------------------------- class specific ----------------------------*/ 121 122 void PerfMonitorForeground::cycleMode(int increment) 123 { 124 int next_mode(getMode()); 125 next_mode += increment; 126 if (next_mode >= PerfMonitorForeground::MODE_END) 127 { next_mode = 0; } 128 if (next_mode < 0) 129 { next_mode = PerfMonitorForeground::MODE_END-1; } 130 131 setMode(unsigned(next_mode)); 132 } 133 121 134 122 135 void PerfMonitorForeground::changed(ConstFieldMaskArg whichField, UInt32 origin) branches/fcptr_stable_jun07/Source/System/Statistics/Foregrounds/OSGPerfMonitorForeground.h
r857 r858 91 91 typedef PointerBuilder<PerfMonitorForeground>::ObjPtrConstArg ObjPtrConstArg; 92 92 93 94 /** Cycle to the next display mode. */ 95 void cycleMode(int increment=1); 96 93 97 /*---------------------------------------------------------------------*/ 94 98 /*! \name Sync */ branches/fcptr_stable_jun07/Source/System/Statistics/Foregrounds/testPerfMonitorForeground.cpp
r857 r858 80 80 } 81 81 case 'm': 82 perfmon_fg->cycleMode(-1); 83 break; 82 84 case 'M': 83 { 84 std::map<unsigned, std::string> name_map = boost::assign::map_list_of 85 (PerfMonitorForeground::Text, "Text") 86 (PerfMonitorForeground::PercentLines, "PercentLines") 87 (PerfMonitorForeground::PercentTotalLines, "PercentTotalLines") 88 (PerfMonitorForeground::MaxLines, "MaxLines") 89 (PerfMonitorForeground::ThreadTiming, "ThreadTiming"); 90 unsigned next_mode = perfmon_fg->getMode(); 91 next_mode += 1; 92 if (next_mode >= PerfMonitorForeground::MODE_END) 93 { next_mode = 0; } 94 perfmon_fg->setMode(next_mode); 95 std::cout << "Set mode to: " << name_map[next_mode] << std::endl; 96 } 97 break; 85 perfmon_fg->cycleMode(); 86 break; 98 87 99 88 // Output help about the controls branches/fcptr_stable_jun07/Source/System/Statistics/PerfMonitor/OSGPerfMonitor.cpp
r857 r858 125 125 } 126 126 127 unsigned PerfMonitorBase::max_samples = 100;127 unsigned PerfMonitorBase::max_samples = 500; 128 128 129 129 OSG_END_NAMESPACE
