#include <layoutDiskManager.hpp>
Collaboration diagram for LayoutDiskManager:
Public Member Functions | |
LayoutDiskManager (LayoutManager *controller) | |
Constructor. | |
virtual | ~LayoutDiskManager () |
Destructor. | |
bool | saveLayout (LayoutConfig *layoutConfig, wxString fileName) |
Saves a space into a file. | |
bool | openLayout (wxString fileName) |
Opens a space file. | |
Private Member Functions | |
LayoutConfig * | readLayout (int width, int height, FlexLexer *lexer) |
Reads a space from a lexer. | |
bool | saveLayout (LayoutConfig *layoutConfig) |
Saves a space. | |
bool | saveGrid (Grid grid) |
Saves a grid. | |
void | returnLayout (LayoutConfig *layoutConfig) |
Returns a space to the controller. | |
Private Attributes | |
LayoutManager * | controller |
Space controller. | |
wxTextFile | file |
File to be written/read. |
This class manages all the data persistance of space files.
Definition at line 41 of file layoutDiskManager.hpp.
|
Constructor.
Definition at line 29 of file layoutDiskManager.cpp. References controller. |
|
Destructor.
Definition at line 36 of file layoutDiskManager.cpp. |
|
Opens a space file.
Definition at line 178 of file layoutDiskManager.cpp. References NUMBER, readLayout(), FlexLexer::switch_streams(), yyFlexLexer, FlexLexer::yylex(), and FlexLexer::YYText(). Referenced by LayoutManager::openPFile(). Here is the call graph for this function: ![]() |
|
Reads a space from a lexer. This method reads a width*height space from the lexer.
Definition at line 245 of file layoutDiskManager.cpp. References nDISABLED, nENABLED, NUMBER, FlexLexer::yylex(), and FlexLexer::YYText(). Referenced by openLayout(). Here is the call graph for this function: ![]() |
|
Returns a space to the controller.
Definition at line 325 of file layoutDiskManager.cpp. References controller, and LayoutManager::newLayout(). Here is the call graph for this function: ![]() |
|
Saves a grid.
Definition at line 101 of file layoutDiskManager.cpp. References CELL_SPACE, Grid::getHeight(), Grid::getWidth(), line, nDISABLED, nDONTCARE, nENABLED, nINPUT, nNOSPACE, and nOUTPUT. Referenced by saveLayout(). Here is the call graph for this function: ![]() |
|
Saves a space. The space is saved to the corresponding file previously opened.
Definition at line 79 of file layoutDiskManager.cpp. References file, LayoutConfig::getGrid(), LayoutConfig::getHeight(), LayoutConfig::getWidth(), and saveGrid(). Here is the call graph for this function: ![]() |
|
Saves a space into a file.
Definition at line 47 of file layoutDiskManager.cpp. References file. Referenced by LayoutManager::saveFile(), LayoutManager::saveFileAs(), and LayoutManager::saveFilename(). |
|
Space controller.
Definition at line 51 of file layoutDiskManager.hpp. Referenced by LayoutDiskManager(), and returnLayout(). |
|
File to be written/read.
Definition at line 53 of file layoutDiskManager.hpp. Referenced by saveLayout(). |