Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ProfilerCheckControl.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_ProfilerCheckControl_h_
00003 #define INCLUDED_ProfilerCheckControl_h_
00004 
00005 #include "ControlBase.h"
00006 #include "Shared/Profiler.h"
00007 
00008 //! causes the WorldState::mainProfile and WorldState::motionProfile to display reports to #sout
00009 class ProfilerCheckControl : public ControlBase {
00010 public:
00011   //! Constructor
00012   ProfilerCheckControl() : ControlBase("Profiler Check","Reports time spent in all of the profiled sections in all processes") {}
00013 
00014   //! Prints a report to sout
00015   virtual ControlBase * activate(MotionManager::MC_ID, Socket *) {
00016     sout->printf("~~~ Main: ~~~\n%s\n",mainProfiler==NULL?"Main profile unavailable":mainProfiler->report().c_str());
00017     sout->printf("~~~ Motion: ~~~\n%s\n",motionProfiler==NULL?"Motion profile unavailable":motionProfiler->report().c_str());
00018     sout->printf("~~~ Sound: ~~~\n%s\n",soundProfiler==NULL?"Sound profile unavailable":soundProfiler->report().c_str());
00019     return NULL;
00020   }
00021 };
00022 
00023 /*! @file
00024  * @brief Defines ProfilerCheckControl, which causes the WorldState::mainProfile and WorldState::motionProfile to display reports to #sout
00025  * @author ejt (Creator)
00026  *
00027  * $Author: ejt $
00028  * $Name: tekkotsu-4_0 $
00029  * $Revision: 1.7 $
00030  * $State: Exp $
00031  * $Date: 2006/07/13 17:25:50 $
00032  */
00033 
00034 #endif

Tekkotsu v4.0
Generated Thu Nov 22 00:54:55 2007 by Doxygen 1.5.4