AbstractProcess Class Reference
[SAT Solver]

#include <SatSolver.h>

Inheritance diagram for AbstractProcess:

Inheritance graph
[legend]
Collaboration diagram for AbstractProcess:

Collaboration graph
[legend]

List of all members.


Detailed Description

Base class of simple multi-step process.

Note:
Design pattern template method

Definition at line 162 of file SatSolver.h.


Public Member Functions

virtual ~AbstractProcess ()
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 int getStepsCount ()
 Returns current step number.
virtual void addObserver (IObserver *)
 Add observer to list of listeners.

Protected Member Functions

 AbstractProcess ()
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

~AbstractProcess (  )  [virtual]

Definition at line 69 of file SatSolver.cpp.

AbstractProcess (  )  [protected]

Definition at line 63 of file SatSolver.cpp.

References AbstractProcess::Private::running, and AbstractProcess::Private::steps.


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).

Implements IProcess.

Reimplemented in AbstractProcessWatched.

Definition at line 72 of file SatSolver.cpp.

References AbstractProcess::doStep(), AbstractSubject::notify(), AbstractProcess::Private::running, and AbstractProcess::Private::steps.

Referenced by AbstractProcessWatched::Private::currentElapsed(), and AbstractProcessWatched::start().

void stop (  )  [virtual]

Stop currently executed process as soon as possible.

Implements IProcess.

Reimplemented in AbstractProcessWatched.

Definition at line 78 of file SatSolver.cpp.

References AbstractProcess::Private::running.

Referenced by AbstractProcessWatched::stop().

void reset (  )  [virtual]

Reset process to its initial state.

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

Implements IProcess.

Reimplemented in AbstractProcessWatched.

Definition at line 81 of file SatSolver.cpp.

References AbstractProcess::initialize(), AbstractProcess::Private::running, and AbstractProcess::Private::steps.

Referenced by AbstractProcessWatched::reset().

int getStepsCount (  )  [virtual]

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]

Initialize process.

Note:
Design pattern template method

Implemented in BlindSatSolver, and GaSatSolver.

Referenced by AbstractProcess::reset().

virtual void doStep (  )  [protected, pure virtual]

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