#include <mainController.hpp>
Collaboration diagram for MainController:
Public Member Functions | |
MainController () | |
Constructor. | |
~MainController () | |
Destructor. | |
void | initControllers () |
Creates the controllers. | |
RuleManager * | getRules () |
Returns the rule controller. | |
LayoutManager * | getLayouts () |
Returns the space controller. | |
ForbiddenPatternManager * | getForbiddenPatterns () |
Returns the forbidden pattern controller. | |
TruthTableManager * | getTruthTables () |
Returns the truth table controller. | |
void | setNanoFrame (NanoFrame *frame) |
Sets the application main window. | |
void | setRules (RuleManager *rules) |
Sets the rule controller. | |
void | setLayouts (LayoutManager *layouts) |
Sets the space controller. | |
void | setForbiddenPatterns (ForbiddenPatternManager *forbiddenPatterns) |
Sets the forbidden pattern controller. | |
void | setTruthTables (TruthTableManager *truthTables) |
Sets the truth table controller. | |
void | tablesChanged () |
Method called when the table collection changes. | |
void | FPsChanged () |
Method called when the pattern collection changes. | |
void | rulesChanged () |
Method called when the rule collection changes. | |
void | setStatusMessage (wxString message) |
Sets a message on the status bar. | |
void | save () |
Save project. | |
void | saveAs () |
Saves the project in a new file. | |
void | open () |
Opens a project file. | |
void | newFile () |
Creates a new project. | |
void | startSimulation () |
Starts the simulation. | |
void | prepareSimulation () |
Checks all the parameters to start a simulation. | |
void | elementChanged () |
Method called when any collection changes its status. | |
NanoFrame * | getNanoFrame () |
Member accessor. | |
Private Member Functions | |
void | saveFileNames (wxTextOutputStream *stream) |
Saves the collection file names to a stream. | |
void | saveTables (wxTextOutputStream *stream) |
Saves the tables information to a stream. | |
void | saveRules (wxTextOutputStream *stream) |
Saves the rules information to a stream. | |
void | savePatterns (wxTextOutputStream *stream) |
Saves the patterns information to a stream. | |
bool | openFile (wxString file) |
Opens a project file. | |
bool | openTables (wxFileInputStream *fileStream, wxTextInputStream *inStream) |
Opens the tables information from a stream. | |
bool | openRules (wxFileInputStream *fileStream, wxTextInputStream *inStream) |
Opens the rules information from a stream. | |
bool | openFPs (wxFileInputStream *fileStream, wxTextInputStream *inStream) |
Opens the forbidden patterns information from a stream. | |
Private Attributes | |
NanoFrame * | frame |
Main window. | |
RuleManager * | rules |
Rule controller. | |
LayoutManager * | layouts |
Space controller. | |
ForbiddenPatternManager * | forbiddenPatterns |
Forbidden pattern controller. | |
TruthTableManager * | truthTables |
Truth table controller. | |
SimulationManager * | simulation |
Simulation controller. | |
FileManagerView | fileView |
File system presentation layer. | |
wxString | fileName |
Project file name. |
This is the main controller for the application. It controls the main flow of the program and, more importantly, comunicates all the other controllers between them. It has also the control over the main window class and the project persistance data.
Definition at line 51 of file mainController.hpp.
|
Constructor.
Definition at line 25 of file mainController.cpp. References fileName, and initControllers(). Here is the call graph for this function: ![]() |
|
Destructor.
Definition at line 33 of file mainController.cpp. References forbiddenPatterns, layouts, rules, and truthTables. |
|
Method called when any collection changes its status.
Definition at line 849 of file mainController.cpp. References LayoutManager::elementChanged(), and layouts. Referenced by ForbiddenPatternManager::appendFPs(), RuleManager::appendRules(), TruthTableManager::appendTables(), RuleManager::cellChanged(), LayoutManager::cellChanged(), ForbiddenPatternManager::cellChanged(), RuleManager::clean(), LayoutManager::clean(), ForbiddenPatternManager::clean(), ForbiddenPatternManager::deleteFPs(), RuleManager::deleteRules(), TruthTableManager::deleteTables(), ForbiddenPatternManager::newFP(), LayoutManager::newLayout(), RuleManager::newRule(), TruthTableManager::openPFile(), RuleManager::openPFile(), LayoutManager::openPFile(), ForbiddenPatternManager::openPFile(), and TruthTableManager::tableChanged(). Here is the call graph for this function: ![]() |
|
Method called when the pattern collection changes.
Definition at line 161 of file mainController.cpp. References LayoutManager::FPsChanged(), and layouts. Referenced by ForbiddenPatternManager::clean(), and ForbiddenPatternManager::newFP(). Here is the call graph for this function: ![]() |
|
Returns the forbidden pattern controller.
Definition at line 137 of file mainController.cpp. References forbiddenPatterns. |
|
Returns the space controller.
Definition at line 127 of file mainController.cpp. References layouts. |
|
Member accessor.
Definition at line 56 of file mainController.cpp. References frame. Referenced by SimulationManager::results(). |
|
Returns the rule controller.
Definition at line 117 of file mainController.cpp. References rules. |
|
Returns the truth table controller.
Definition at line 147 of file mainController.cpp. References truthTables. |
|
Creates the controllers.
Definition at line 103 of file mainController.cpp. References forbiddenPatterns, layouts, rules, simulation, and truthTables. Referenced by MainController(). |
|
Creates a new project. The user is asked to save the current project if desired. Definition at line 338 of file mainController.cpp. References LayoutManager::clean(), TruthTableManager::clean(), ForbiddenPatternManager::clean(), RuleManager::clean(), fileName, forbiddenPatterns, frame, layouts, rules, save(), NanoFrame::setTitleBar(), and truthTables. Referenced by NanoFrame::OnNew(). Here is the call graph for this function: ![]() |
|
Opens a project file.
Definition at line 287 of file mainController.cpp. References forbiddenPatterns, LayoutManager::isLayoutModified(), TruthTableManager::isModified(), ForbiddenPatternManager::isModified(), RuleManager::isModified(), layouts, rules, save(), and truthTables. Referenced by NanoFrame::OnOpen(). Here is the call graph for this function: ![]() |
|
Opens a project file.
Definition at line 441 of file mainController.cpp. References NanoFrame::errorMsg(), frame, and line. Here is the call graph for this function: ![]() |
|
Opens the forbidden patterns information from a stream.
Definition at line 769 of file mainController.cpp. References LayoutManager::getFPs(), and layouts. Here is the call graph for this function: ![]() |
|
Opens the rules information from a stream.
Definition at line 717 of file mainController.cpp. References LayoutManager::getRules(), and layouts. Here is the call graph for this function: ![]() |
|
Opens the tables information from a stream.
Definition at line 612 of file mainController.cpp. References LayoutManager::getTables(), and layouts. Here is the call graph for this function: ![]() |
|
Checks all the parameters to start a simulation.
Definition at line 824 of file mainController.cpp. References RuleManager::checkRules(), NanoFrame::errorMsg(), frame, and rules. Referenced by LayoutManager::prepareSimulation(). Here is the call graph for this function: ![]() |
|
Method called when the rule collection changes.
Definition at line 168 of file mainController.cpp. References layouts, and LayoutManager::rulesChanged(). Referenced by RuleManager::clean(), and RuleManager::newRule(). Here is the call graph for this function: ![]() |
|
Save project. Saves a project. The different components are saved and then the project is copied into a file. All the components are saved on the same directory. Definition at line 193 of file mainController.cpp. References fileName, fileView, forbiddenPatterns, frame, LayoutManager::getFileName(), TruthTableManager::getFileName(), ForbiddenPatternManager::getFileName(), RuleManager::getFileName(), layouts, rules, LayoutManager::saveFile(), TruthTableManager::saveFile(), ForbiddenPatternManager::saveFile(), RuleManager::saveFile(), FileManagerView::saveFileChoose(), LayoutManager::saveFilename(), TruthTableManager::saveFilename(), ForbiddenPatternManager::saveFilename(), RuleManager::saveFilename(), saveFileNames(), savePatterns(), saveRules(), saveTables(), NanoFrame::setTitleBar(), and truthTables. Referenced by newFile(), NanoFrame::OnSave(), and open(). Here is the call graph for this function: ![]() |
|
Saves the project in a new file.
Definition at line 240 of file mainController.cpp. References fileName, fileView, forbiddenPatterns, frame, layouts, rules, LayoutManager::saveFile(), TruthTableManager::saveFile(), ForbiddenPatternManager::saveFile(), RuleManager::saveFile(), FileManagerView::saveFileChoose(), and truthTables. Referenced by NanoFrame::OnSaveAs(). Here is the call graph for this function: ![]() |
|
Saves the collection file names to a stream.
Definition at line 357 of file mainController.cpp. References forbiddenPatterns, LayoutManager::getFileName(), TruthTableManager::getFileName(), ForbiddenPatternManager::getFileName(), RuleManager::getFileName(), layouts, rules, and truthTables. Referenced by save(). Here is the call graph for this function: ![]() |
|
Saves the patterns information to a stream.
Definition at line 426 of file mainController.cpp. References LayoutManager::getFPEnabled(), and layouts. Referenced by save(). Here is the call graph for this function: ![]() |
|
Saves the rules information to a stream.
Definition at line 412 of file mainController.cpp. References LayoutManager::getRuleEnabled(), and layouts. Referenced by save(). Here is the call graph for this function: ![]() |
|
Saves the tables information to a stream.
Definition at line 370 of file mainController.cpp. References LayoutManager::getTableEnabled(), LayoutManager::getTableInputs(), LayoutManager::getTableOutputs(), and layouts. Referenced by save(). Here is the call graph for this function: ![]() |
|
Sets the forbidden pattern controller.
Definition at line 86 of file mainController.cpp. References forbiddenPatterns. |
|
Sets the space controller.
Definition at line 76 of file mainController.cpp. References layouts. |
|
Sets the application main window.
Definition at line 46 of file mainController.cpp. References frame. |
|
Sets the rule controller.
Definition at line 66 of file mainController.cpp. References rules. |
|
Sets a message on the status bar.
Definition at line 178 of file mainController.cpp. References frame, and NanoFrame::setStatusMessage(). Referenced by LayoutManager::cellChanged(), and startSimulation(). Here is the call graph for this function: ![]() |
|
Sets the truth table controller.
Definition at line 96 of file mainController.cpp. References truthTables. |
|
Starts the simulation.
Definition at line 816 of file mainController.cpp. References SimulationManager::prepareSimulation(), setStatusMessage(), and simulation. Referenced by LayoutManager::startSimulation(). Here is the call graph for this function: ![]() |
|
Method called when the table collection changes.
Definition at line 154 of file mainController.cpp. References layouts, and LayoutManager::tablesChanged(). Referenced by TruthTableManager::clean(). Here is the call graph for this function: ![]() |
|
Project file name.
Definition at line 95 of file mainController.hpp. Referenced by MainController(), newFile(), save(), and saveAs(). |
|
File system presentation layer.
Definition at line 93 of file mainController.hpp. |
|
Forbidden pattern controller.
Definition at line 87 of file mainController.hpp. Referenced by getForbiddenPatterns(), initControllers(), newFile(), open(), save(), saveAs(), saveFileNames(), setForbiddenPatterns(), and ~MainController(). |
|
Main window.
Definition at line 81 of file mainController.hpp. Referenced by getNanoFrame(), newFile(), openFile(), prepareSimulation(), save(), saveAs(), setNanoFrame(), and setStatusMessage(). |
|
Space controller.
Definition at line 85 of file mainController.hpp. Referenced by elementChanged(), FPsChanged(), getLayouts(), initControllers(), newFile(), open(), openFPs(), openRules(), openTables(), rulesChanged(), save(), saveAs(), saveFileNames(), savePatterns(), saveRules(), saveTables(), setLayouts(), tablesChanged(), and ~MainController(). |
|
Rule controller.
Definition at line 83 of file mainController.hpp. Referenced by getRules(), initControllers(), newFile(), open(), prepareSimulation(), save(), saveAs(), saveFileNames(), setRules(), and ~MainController(). |
|
Simulation controller.
Definition at line 91 of file mainController.hpp. Referenced by initControllers(), and startSimulation(). |
|
Truth table controller.
Definition at line 89 of file mainController.hpp. Referenced by getTruthTables(), initControllers(), newFile(), open(), save(), saveAs(), saveFileNames(), setTruthTables(), and ~MainController(). |