AbstractProcess Class Reference

#include <CaDesigner.h>

Inheritance diagram for AbstractProcess:

Inheritance graph
[legend]

List of all members.


Detailed Description

Base class of simple multi-step process.

Note:
Design pattern template method

This code was copy-pasted from FSS (Fast SAT Solver) project.

Definition at line 102 of file CaDesigner.h.


Public Member Functions

virtual ~AbstractProcess ()
virtual void start ()
 Start process execution.
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).

Private Attributes

Private * d

Constructor & Destructor Documentation

~AbstractProcess (  )  [virtual]

Definition at line 348 of file CaDesigner.cpp.

AbstractProcess (  )  [protected]

Definition at line 341 of file CaDesigner.cpp.


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 in AbstractProcessWatched.

Definition at line 352 of file CaDesigner.cpp.

References doStep(), and AbstractSubject::notify().

Referenced by AbstractProcessWatched::start().

Here is the call graph for this function:

Here is the caller graph for this function:

void stop (  )  [virtual]

Stop currently executed process as soon as possible.

Reimplemented in AbstractProcessWatched.

Definition at line 359 of file CaDesigner.cpp.

Referenced by AbstractProcessWatched::stop().

Here is the caller graph for this function:

void reset (  )  [virtual]

Reset process to its initial state.

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

Reimplemented in AbstractProcessWatched.

Definition at line 363 of file CaDesigner.cpp.

References initialize().

Referenced by AbstractProcessWatched::reset().

Here is the call graph for this function:

Here is the caller graph for this function:

int getStepsCount (  )  [virtual]

Returns current step number.

Returns:
Returns current step number.

Definition at line 369 of file CaDesigner.cpp.

virtual void initialize (  )  [protected, pure virtual]

Initialize process.

Note:
Design pattern template method

Implemented in CaDesigner.

Referenced by reset().

Here is the caller graph for this function:

virtual void doStep (  )  [protected, pure virtual]

Do one step of process.

Note:
Design pattern template method

Implemented in CaDesigner.

Referenced by start().

Here is the caller graph for this function:

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 320 of file CaDesigner.cpp.

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 324 of file CaDesigner.cpp.

References IObserver::notify().

Referenced by start().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Private* d [private]

Reimplemented from AbstractSubject.

Reimplemented in AbstractProcessWatched, and CaDesigner.

Definition at line 145 of file CaDesigner.h.


The documentation for this class was generated from the following files:
Generated on Sat May 2 16:39:35 2009 for nucad by  doxygen 1.5.4