Frobby 0.10.0
Loading...
Searching...
No Matches
Facade Class Reference

#include <Facade.h>

Inheritance diagram for Facade:

Protected Member Functions

 Facade (bool printActions)
void printMessage (const char *message)
void beginAction (const char *message)
void endAction ()
bool isPrintingActions () const

Detailed Description

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.

Todo
Replace this with ActionPrinter using aggregation instead of inheritance.

Constructor & Destructor Documentation

◆ Facade()

Facade::Facade ( bool printActions)
protected

Constructs a facade that prints out what it is doing if printActions is true.

Member Function Documentation

◆ beginAction()

void Facade::beginAction ( const char * message)
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.

◆ endAction()

void Facade::endAction ( )
protected

Prints to standard error the time since the last call to beginAction. endAction() can only be called once after each call to beginAction.

◆ isPrintingActions()

bool Facade::isPrintingActions ( ) const
protected

Returns true if printing actions.

◆ printMessage()

void Facade::printMessage ( const char * message)
protected

Prints message to standard error if printing is turned on.


The documentation for this class was generated from the following files: