Homepage Demos Overview Downloads Tutorials Reference
Credits

EventLogger Class Reference

#include <EventLogger.h>

Inheritance diagram for EventLogger:

Inheritance graph
[legend]
List of all members.

Detailed Description

allows logging of events to the console or a file

Definition at line 10 of file EventLogger.h.

Public Member Functions

 EventLogger ()
 constructor
virtual ~EventLogger ()
virtual ControlBasedoSelect ()
 opens a custom (embedded) menu to toggle individual EGIDs
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
virtual void processEvent (const EventBase &event)
 sends all events received to stdout and/or logfile

Protected Member Functions

virtual void clearSlots ()
 deletes each slot item and clears the slots
void setStatus (unsigned int i, char c)
 sets the status char of slot i to c
void checkLogFile ()
 checks to see if logfilePath differs from the StringInputControl's value and switches it if it is

Protected Attributes

std::string logfilePath
 address of the logfile, if any (empty string is no logfile)
std::ofstream logfile
 if a filename is given, events are logged to here
unsigned int verbosity
 controls the level of verbosity - currently 0 through 2


Constructor & Destructor Documentation

EventLogger::EventLogger  ) 
 

constructor

Definition at line 14 of file EventLogger.cc.

virtual EventLogger::~EventLogger  )  [inline, virtual]
 

Definition at line 14 of file EventLogger.h.


Member Function Documentation

void EventLogger::checkLogFile  )  [protected]
 

checks to see if logfilePath differs from the StringInputControl's value and switches it if it is

Definition at line 86 of file EventLogger.cc.

Referenced by processEvent(), and refresh().

void EventLogger::clearSlots  )  [protected, virtual]
 

deletes each slot item and clears the slots

Reimplemented from ControlBase.

Definition at line 75 of file EventLogger.cc.

Referenced by ~EventLogger().

ControlBase * EventLogger::doSelect  )  [virtual]
 

opens a custom (embedded) menu to toggle individual EGIDs

Reimplemented from ControlBase.

Definition at line 25 of file EventLogger.cc.

void EventLogger::processEvent const EventBase event  )  [virtual]
 

sends all events received to stdout and/or logfile

Implements EventListener.

Definition at line 66 of file EventLogger.cc.

void EventLogger::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 60 of file EventLogger.cc.

Referenced by doSelect().

void EventLogger::setStatus unsigned int  i,
char  c
[protected]
 

sets the status char of slot i to c

Definition at line 80 of file EventLogger.cc.

Referenced by checkLogFile(), and doSelect().


Member Data Documentation

std::ofstream EventLogger::logfile [protected]
 

if a filename is given, events are logged to here

Definition at line 37 of file EventLogger.h.

Referenced by checkLogFile(), doSelect(), and processEvent().

std::string EventLogger::logfilePath [protected]
 

address of the logfile, if any (empty string is no logfile)

Definition at line 34 of file EventLogger.h.

Referenced by checkLogFile().

unsigned int EventLogger::verbosity [protected]
 

controls the level of verbosity - currently 0 through 2

Definition at line 40 of file EventLogger.h.

Referenced by EventLogger(), and processEvent().


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

Tekkotsu v2.2.1
Generated Tue Nov 23 16:37:45 2004 by Doxygen 1.3.9.1