AbstractProcessWatched Class Reference
[SAT Solver]

#include <SatSolver.h>

Inheritance diagram for AbstractProcessWatched:

Inheritance graph
[legend]
Collaboration diagram for AbstractProcessWatched:

Collaboration graph
[legend]

List of all members.


Detailed Description

Multi-step process with time-watch extension.

Note:
Design pattern template method

Definition at line 217 of file SatSolver.h.


Public Member Functions

virtual ~AbstractProcessWatched ()
virtual void start ()
 Start process execution. This method returns control after process ends (or after it is stopped by stop() or reset() method).
virtual void stop ()
 Stop currently executed process as soon as possible.
virtual void reset ()
 Reset process to its initial state.
virtual long getTimeElapsed ()
 Returns time elapsed by activity.
virtual int getStepsCount ()
 Returns current step number.
virtual void addObserver (IObserver *)
 Add observer to list of listeners.

Protected Member Functions

 AbstractProcessWatched ()
virtual void initialize ()=0
 Initialize process.
virtual void doStep ()=0
 Do one step of process.
void notify ()
 Send notification to all observers (listeners).

Classes

struct  Private

Constructor & Destructor Documentation

~AbstractProcessWatched (  )  [virtual]

Definition at line 108 of file SatSolver.cpp.

AbstractProcessWatched (  )  [protected]

Definition at line 102 of file SatSolver.cpp.

References AbstractProcessWatched::Private::running, and AbstractProcessWatched::Private::total.


Member Function Documentation

void start (  )  [virtual]

Start process execution. This method returns control after process ends (or after it is stopped by stop() or reset() method).

Reimplemented from AbstractProcess.

Definition at line 111 of file SatSolver.cpp.

References AbstractProcessWatched::Private::running, AbstractProcess::start(), and AbstractProcessWatched::Private::start.

void stop (  )  [virtual]

Stop currently executed process as soon as possible.

Reimplemented from AbstractProcess.

Definition at line 117 of file SatSolver.cpp.

References AbstractProcessWatched::Private::currentElapsed(), AbstractProcessWatched::Private::running, AbstractProcess::stop(), and AbstractProcessWatched::Private::total.

Referenced by GaSatSolver::doStep(), BlindSatSolver::doStep(), TimedStop::notify(), and SolutionsCountStop::notify().

void reset (  )  [virtual]

Reset process to its initial state.

Note:
This implies stop() if process is running.

Reimplemented from AbstractProcess.

Definition at line 125 of file SatSolver.cpp.

References AbstractProcess::reset(), AbstractProcessWatched::Private::running, and AbstractProcessWatched::Private::total.

long getTimeElapsed (  )  [virtual]

Returns time elapsed by activity.

Returns:
Returns time elapsed by activity.

Implements IStopWatch.

Definition at line 131 of file SatSolver.cpp.

References AbstractProcessWatched::Private::currentElapsed(), AbstractProcessWatched::Private::running, and AbstractProcessWatched::Private::total.

Referenced by ResultsWatch::notify(), FitnessWatch::notify(), and TimedStop::notify().

int getStepsCount (  )  [virtual, inherited]

Returns current step number.

Returns:
Returns current step number.

Definition at line 86 of file SatSolver.cpp.

References AbstractProcess::Private::steps.

Referenced by ProgressWatch::notify().

virtual void initialize (  )  [protected, pure virtual, inherited]

Initialize process.

Note:
Design pattern template method

Implemented in BlindSatSolver, and GaSatSolver.

Referenced by AbstractProcess::reset().

virtual void doStep (  )  [protected, pure virtual, inherited]

Do one step of process.

Note:
Design pattern template method

Implemented in BlindSatSolver, and GaSatSolver.

Referenced by AbstractProcess::start().

void addObserver ( IObserver observer  )  [virtual, inherited]

Add observer to list of listeners.

Parameters:
observer Observer object to add to list of listeners.
Note:
Observers are notified in the same order, as there are added to lsit of listeners.

Design pattern observer

Implements ISubject.

Definition at line 46 of file SatSolver.cpp.

References AbstractSubject::Private::container.

Referenced by main().

void notify (  )  [protected, inherited]

Send notification to all observers (listeners).

Note:
Observers are notified in the same order, as there are added to lsit of listeners.

Definition at line 49 of file SatSolver.cpp.

References AbstractSubject::Private::container, and IObserver::notify().

Referenced by BlindSatSolver::doStep(), GaSatSolver::Private::fitness(), and AbstractProcess::start().


The documentation for this class was generated from the following files:
Generated on Wed Nov 5 22:30:22 2008 for Fast SAT Solver by  doxygen 1.5.4