#include <SatSolver.h>
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 |
~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.
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.
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.
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.
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.
Implemented in BlindSatSolver, and GaSatSolver.
Referenced by AbstractProcess::reset().
virtual void doStep | ( | ) | [protected, pure virtual, inherited] |
Do one step of process.
Implemented in BlindSatSolver, and GaSatSolver.
Referenced by AbstractProcess::start().
void addObserver | ( | IObserver * | observer | ) | [virtual, inherited] |
Add observer to list of listeners.
observer | Observer object to add to list 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).
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().