Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

STextLog Class Reference

#include <STextLog.h>

Inherits SLogger.

Inheritance diagram for STextLog:

Inheritance graph
[legend]
List of all members.

Public Types

enum  SchedFilter {
  JOBRESET = 1, JOBSTATECHANGED = 2, JOBOVERDUE = 4, JOBPHASEFINISHED = 8,
  JOBALLOCATED = 16, JOBDEALLOCATED = 32, MACHINEBROKEN = 64, MACHINEREPAIRED = 128,
  SCHEDALL = 255
}
enum  EditFilter {
  ADDINGJOB = 1, DELETINGJOB = 2, JOBSADDED = 4, JOBSDELETED = 8,
  CHANGEDMACHINETOPO = 16, DEPADDED = 32, DEPDELETED = 64, EDITALL = 127
}

Public Methods

 STextLog (STaskSystem &ts, std::ostream &out=std::cout, bool registerAsObserver=true)
virtual ~STextLog ()
virtual void feedEvent (const SEvent &event)
void setLogStream (std::ostream &out)
void setSchedFilter (int filter)
void setEditFilter (int filter)
virtual void update (const SEvent &event)

Detailed Description

Generate a text protocol. The text logger registers as observer of all possible parts of the tasksytem in order to be able to make a protocol of all SCHEDEVENT and EDITEVENT events. It writes the events to a stream (default: stdout). The text logger can also be used as a "dependent logger", then it doesn't register as observer and must be fed via feedEvent().


Member Enumeration Documentation

enum STextLog::EditFilter
 

Values for creating a filter for EDITEVENTs using setEditFilter(). Use the OR-Operator for defining a specific filter.

See also:
method setEditFilter()
Enumeration values:
ADDINGJOB 
DELETINGJOB 
JOBSADDED 
JOBSDELETED 
CHANGEDMACHINETOPO 
DEPADDED 
DEPDELETED 
EDITALL 

enum STextLog::SchedFilter
 

Values for creating a filter for SCHEDEVENTs using setSchedFilter(). Use the OR-Operator for defining a specific filter.

See also:
method setSchedFilter()
Enumeration values:
JOBRESET 
JOBSTATECHANGED 
JOBOVERDUE 
JOBPHASEFINISHED 
JOBALLOCATED 
JOBDEALLOCATED 
MACHINEBROKEN 
MACHINEREPAIRED 
SCHEDALL 


Constructor & Destructor Documentation

STextLog::STextLog STaskSystem   ts,
std::ostream &    out = std::cout,
bool    registerAsObserver = true
 

Constructor

Parameters:
ts  a reference to the tasksystem
registerAsObserver  stand-alone logger (true) or dependent (false)

STextLog::~STextLog   [virtual]
 

Destructor


Member Function Documentation

void STextLog::feedEvent const SEvent   event [virtual]
 

Here the logger must be fed with events when it is a dependent logger.

Parameters:
event  an event that is sent by another logger

Implements SLogger.

void STextLog::setEditFilter int    filter [inline]
 

Set filter for EDITEVENTs. Create a filter by combining enum EditFilter values by the OR-Operator.

Parameters:
filter  possible values: ADDINGJOB , DELETINGJOB , JOBSADDED , JOBSDELETED , CHANGEDMACHINETOPO , DEPADDED , DEPDELETED , EDITALL

void STextLog::setLogStream std::ostream &    out [inline]
 

Set the stream to which events are written

Parameters:
out  output-stream

void STextLog::setSchedFilter int    filter [inline]
 

Set filter for SCHEDEVENTs. Create a filter by combining enum SchedFilter values by the OR-Operator.

Parameters:
filter  possible values: JOBRESET , JOBSTATECHANGED , JOBOVERDUE , JOBPHASEFINISHED , JOBALLOCATED , JOBDEALLOCATED , MACHINEBROKEN , MACHINEREPAIRED , SCHEDALL

virtual void SLogger::update const SEvent   event [inline, virtual, inherited]
 

Here the logger receives events when it is a stand-alone logger

Parameters:
event  an event created by one of the observed components

Implements SObserver.

Reimplemented in SGanttLog.


The documentation for this class was generated from the following files:
Generated on Thu May 22 16:50:55 2003 for Sketch-it! by doxygen1.2.18