Frobby
0.9.5
|
This is the super class of all facades. More...
#include <Facade.h>
Protected Member Functions | |
Facade (bool printActions) | |
Constructs a facade that prints out what it is doing if printActions is true. More... | |
virtual | ~Facade () |
void | printMessage (const char *message) |
Prints message to standard error if printing is turned on. More... | |
void | beginAction (const char *message) |
Prints message to standard error if printing is turned on, and records the time when the action started. More... | |
void | endAction () |
Prints to standard error the time since the last call to beginAction. More... | |
bool | isPrintingActions () const |
Returns true if printing actions. More... | |
Private Attributes | |
Timer | _timer |
Keeps track of the time between calls to beginAction() and endAction(). More... | |
bool | _printActions |
Keeps track of whether we are printing. More... | |
This is the super class of all facades.
It offers protected methods that are convenient for derived classes to print out what they are doing and how long it took, and to be able to turn this on and off with a boolean flag.
|
protected |
Constructs a facade that prints out what it is doing if printActions is true.
Definition at line 20 of file Facade.cpp.
|
protectedvirtual |
Definition at line 28 of file Facade.cpp.
|
protected |
Prints message to standard error if printing is turned on, and records the time when the action started.
endAction() must be called in-between two calls to beginAction.
Definition at line 38 of file Facade.cpp.
|
protected |
Prints to standard error the time since the last call to beginAction.
endAction() can only be called once after each call to beginAction.
Definition at line 51 of file Facade.cpp.
|
protected |
Returns true if printing actions.
Definition at line 66 of file Facade.cpp.
|
protected |
Prints message to standard error if printing is turned on.
Definition at line 31 of file Facade.cpp.
|
private |
|
private |
Keeps track of the time between calls to beginAction() and endAction().