#include <forbiddenPatternDiskManager.hpp>
Collaboration diagram for ForbiddenPatternDiskManager:
Public Member Functions | |
ForbiddenPatternDiskManager (ForbiddenPatternManager *controller) | |
Constructor. | |
virtual | ~ForbiddenPatternDiskManager () |
Destructor. | |
bool | saveFPs (list< ForbiddenPattern * > FPs, wxString fileName) |
Saves a forbidden pattern collection to a file. | |
bool | openFPs (wxString fileName) |
Opens a forbidden pattern file. | |
Private Member Functions | |
bool | readFP (int width, int height, list< ForbiddenPattern * > *FPList, FlexLexer *lexer) |
Reads a forbidden pattern from a file. | |
void | returnFPs (list< ForbiddenPattern * > *FPList) |
Asks the controller to create the patterns. | |
bool | saveFPList (list< ForbiddenPattern * > rules) |
Private method. Saves a forbidden pattern collection to a file. | |
bool | saveFP (ForbiddenPattern *fp) |
Saves a forbidden pattern to a file. | |
bool | saveGrid (Grid grid) |
Saves a grid to a file. | |
Private Attributes | |
ForbiddenPatternManager * | controller |
Forbidden pattern controller. | |
wxTextFile | file |
Text file used for writing. |
Class providing all the data persistance layer of the forbidden pattern model layer.
Definition at line 44 of file forbiddenPatternDiskManager.hpp.
|
Constructor.
Definition at line 31 of file forbiddenPatternDiskManager.cpp. References controller. |
|
Destructor.
Definition at line 38 of file forbiddenPatternDiskManager.cpp. |
|
Opens a forbidden pattern file. This method reads the patterns from the file and calls the pattern controller for creation.
Definition at line 177 of file forbiddenPatternDiskManager.cpp. References NEGATION, NUMBER, readFP(), FlexLexer::switch_streams(), yyFlexLexer, FlexLexer::yylex(), and FlexLexer::YYText(). Referenced by ForbiddenPatternManager::appendFPs(), and ForbiddenPatternManager::openPFile(). Here is the call graph for this function: ![]() |
|
Reads a forbidden pattern from a file. Reads a pattern from the file and adds it to the list of the patterns already read.
Definition at line 273 of file forbiddenPatternDiskManager.cpp. References ForbiddenPattern::cellChanged(), nDISABLED, nENABLED, NUMBER, FlexLexer::yylex(), and FlexLexer::YYText(). Referenced by openFPs(). Here is the call graph for this function: ![]() |
|
Asks the controller to create the patterns. It takes a list of forbidden patterns read from a file and asks the pattern controller to add them to the collection.
Definition at line 330 of file forbiddenPatternDiskManager.cpp. References controller, and ForbiddenPatternManager::newFP(). Here is the call graph for this function: ![]() |
|
Saves a forbidden pattern to a file.
Definition at line 102 of file forbiddenPatternDiskManager.cpp. References file, ForbiddenPattern::getGrid(), ForbiddenPattern::getHeight(), ForbiddenPattern::getWidth(), and saveGrid(). Referenced by saveFPList(). Here is the call graph for this function: ![]() |
|
Private method. Saves a forbidden pattern collection to a file.
Definition at line 79 of file forbiddenPatternDiskManager.cpp. References file, and saveFP(). Referenced by saveFPs(). Here is the call graph for this function: ![]() |
|
Saves a forbidden pattern collection to a file.
Definition at line 49 of file forbiddenPatternDiskManager.cpp. References file, and saveFPList(). Referenced by ForbiddenPatternManager::saveFile(). Here is the call graph for this function: ![]() |
|
Saves a grid to a file.
Definition at line 118 of file forbiddenPatternDiskManager.cpp. References CELL_SPACE, Grid::getHeight(), Grid::getWidth(), line, nDISABLED, nDONTCARE, and nENABLED. Referenced by saveFP(). Here is the call graph for this function: ![]() |
|
Forbidden pattern controller.
Definition at line 54 of file forbiddenPatternDiskManager.hpp. Referenced by ForbiddenPatternDiskManager(), and returnFPs(). |
|
Text file used for writing.
Definition at line 56 of file forbiddenPatternDiskManager.hpp. Referenced by saveFP(), saveFPList(), and saveFPs(). |