FreeMemReportControl Class Reference#include <FreeMemReportControl.h>
Inheritance diagram for FreeMemReportControl:
[legend]List of all members.
Detailed Description
gives reports on free memory size at variable rates, can also warn if free memory drops too low.
Definition at line 12 of file FreeMemReportControl.h.
|
Public Member Functions |
virtual void | DoStart () |
| By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
|
virtual void | DoStop () |
| By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).
|
virtual void | processEvent (const EventBase &e) |
| By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.
|
virtual std::string | getName () const |
| Identifies the behavior in menus and such.
|
virtual void | refresh () |
| called when the child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed
|
void | report () |
| reports size of free memory - if this is below low_mem, also generates a warning
|
void | resetTimerFreq () |
| resets timer delays
|
|
contructor
|
| FreeMemReportControl () |
| FreeMemReportControl (const std::string &n) |
| FreeMemReportControl (const std::string &n, const std::string &d) |
virtual | ~FreeMemReportControl () |
| destructor
|
Static Public Member Functions |
static size_t | freeMem () |
| returns the size of the free memory
|
Protected Member Functions |
void | init () |
| builds the submenus
|
Protected Attributes |
int | report_freq |
| how often to report memory size (in milliseconds - negative turns off, 0 is as often as possible)
|
unsigned int | low_mem |
| threshold to trigger low memory warning (in kilobytes)
|
unsigned int | monitor_freq |
| how often to check for low memory (in milliseconds - -1U turns off, 0 is as often as possible)
|
bool | isWarning |
| true we already know we're below threshold
|
Constructor & Destructor Documentation
FreeMemReportControl::FreeMemReportControl |
( |
|
) |
[inline] |
|
FreeMemReportControl::FreeMemReportControl |
( |
const std::string & |
n |
) |
[inline] |
|
FreeMemReportControl::FreeMemReportControl |
( |
const std::string & |
n, |
|
|
const std::string & |
d |
|
) |
[inline] |
|
Member Function Documentation
virtual void FreeMemReportControl::DoStart |
( |
|
) |
[inline, virtual] |
|
virtual void FreeMemReportControl::DoStop |
( |
|
) |
[inline, virtual] |
|
size_t FreeMemReportControl::freeMem |
( |
|
) |
[static] |
|
virtual std::string FreeMemReportControl::getName |
( |
|
) |
const [inline, virtual] |
|
void FreeMemReportControl::init |
( |
|
) |
[inline, protected] |
|
void FreeMemReportControl::processEvent |
( |
const EventBase & |
e |
) |
[virtual] |
|
void FreeMemReportControl::refresh |
( |
|
) |
[virtual] |
|
|
called when the child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed
Reimplemented from ControlBase.
Definition at line 26 of file FreeMemReportControl.cc. |
void FreeMemReportControl::report |
( |
|
) |
|
|
void FreeMemReportControl::resetTimerFreq |
( |
|
) |
|
|
Member Data Documentation
The documentation for this class was generated from the following files:
|