#include <forbiddenPattern.hpp>
Collaboration diagram for ForbiddenPattern:
Public Member Functions | |
ForbiddenPattern (int width, int height) | |
Constructor. | |
virtual | ~ForbiddenPattern () |
Destructor. | |
bool | operator== (ForbiddenPattern pattern) |
Equality operator. | |
int | getWidth () |
Member accessor. | |
int | getHeight () |
Member accessor. | |
bool | cellChanged (int x, int y) |
Changes the status of a cell of the pattern. | |
void | cellChanged (int x, int y, int status) |
Sets the status of a cell. | |
Grid | getGrid () |
Member accessor. | |
void | setGrid (Grid newGrid) |
Member changer. | |
bool | equals (ForbiddenPattern *fp) |
Equality comparison. | |
matrix | getMatrix () |
Matrix accessor. | |
Private Attributes | |
Grid | grid |
Grid of the forbidden pattern. | |
int | width |
Width of the forbidden pattern. | |
int | height |
Height of the forbidden pattern. |
This class represents the model of a forbidden pattern.
Definition at line 38 of file forbiddenPattern.hpp.
|
Constructor.
Definition at line 30 of file forbiddenPattern.cpp. |
|
Destructor.
Definition at line 39 of file forbiddenPattern.cpp. |
|
Sets the status of a cell. This method changes the status of the position x, y of the forbidden pattern.
Definition at line 140 of file forbiddenPattern.cpp. References grid. |
|
Changes the status of a cell of the pattern. This method changes the status of the cell of the pattern at x, y. The change graph is as follows: don't care -> enabled -> disabled -> don't care.
Definition at line 73 of file forbiddenPattern.cpp. References grid, nDISABLED, nDONTCARE, and nENABLED. Referenced by ForbiddenPatternDiskManager::readFP(). |
|
Equality comparison.
Definition at line 116 of file forbiddenPattern.cpp. References Grid::getCells(), getGrid(), and grid. Here is the call graph for this function: ![]() |
|
Member accessor.
Definition at line 105 of file forbiddenPattern.cpp. References grid. Referenced by equals(), operator==(), and ForbiddenPatternDiskManager::saveFP(). |
|
Member accessor.
Definition at line 58 of file forbiddenPattern.cpp. References height. Referenced by operator==(), and ForbiddenPatternDiskManager::saveFP(). |
|
Matrix accessor.
Definition at line 126 of file forbiddenPattern.cpp. References Grid::getCells(), and grid. Here is the call graph for this function: ![]() |
|
Member accessor.
Definition at line 48 of file forbiddenPattern.cpp. References width. Referenced by operator==(), Simulation::patternApplicable(), and ForbiddenPatternDiskManager::saveFP(). |
|
Equality operator.
Definition at line 151 of file forbiddenPattern.cpp. References getGrid(), getHeight(), getWidth(), and grid. Here is the call graph for this function: ![]() |
|
Member changer.
Definition at line 163 of file forbiddenPattern.cpp. References Grid::getHeight(), Grid::getWidth(), grid, height, Grid::init(), and width. Here is the call graph for this function: ![]() |
|
Grid of the forbidden pattern.
Definition at line 55 of file forbiddenPattern.hpp. Referenced by cellChanged(), equals(), getGrid(), getMatrix(), operator==(), and setGrid(). |
|
Height of the forbidden pattern.
Definition at line 59 of file forbiddenPattern.hpp. Referenced by getHeight(), and setGrid(). |
|
Width of the forbidden pattern.
Definition at line 57 of file forbiddenPattern.hpp. Referenced by getWidth(), and setGrid(). |