#include <truthTableDiskManager.hpp>
Collaboration diagram for TruthTableDiskManager:
Public Member Functions | |
TruthTableDiskManager (TruthTableManager *controller) | |
Constructor. | |
virtual | ~TruthTableDiskManager () |
Destructor. | |
bool | saveTables (list< TruthTable * > tables, wxString fileName) |
Saves the table collection to a file. | |
bool | openTables (wxString fileName) |
Opens a truth table file. | |
Private Member Functions | |
bool | saveTableList (list< TruthTable * > tables) |
Saves a table list to the file. | |
bool | saveTable (TruthTable *table) |
Saves a table to the file. | |
bool | saveVector (vector< vector< bool > > booleans) |
Saves a boolean vector to the file. | |
bool | readTable (wxString name, int inputs, int outputs, list< TruthTable * > *tableList, FlexLexer *lexer) |
Reads a truth table from a stream. | |
void | returnTables (list< TruthTable * > *tableList) |
Returns the tables to the controller. | |
Private Attributes | |
TruthTableManager * | controller |
Truth table controller. | |
wxTextFile | file |
Text file to be written/read. |
The data persistance class for the truth tables.
Definition at line 43 of file truthTableDiskManager.hpp.
|
Constructor.
Definition at line 30 of file truthTableDiskManager.cpp. References controller. |
|
Destructor.
Definition at line 37 of file truthTableDiskManager.cpp. |
|
Opens a truth table file.
Definition at line 138 of file truthTableDiskManager.cpp. References IDENTIFIER, LOWER, NUMBER, readTable(), FlexLexer::switch_streams(), UPPER, yyFlexLexer, FlexLexer::yylex(), and FlexLexer::YYText(). Referenced by TruthTableManager::appendTables(), and TruthTableManager::openPFile(). Here is the call graph for this function: ![]() |
|
Reads a truth table from a stream.
Definition at line 225 of file truthTableDiskManager.cpp. References NUMBER, FlexLexer::yylex(), and FlexLexer::YYText(). Referenced by openTables(). Here is the call graph for this function: ![]() |
|
Returns the tables to the controller.
Definition at line 274 of file truthTableDiskManager.cpp. References controller, and TruthTableManager::newTable(). Here is the call graph for this function: ![]() |
|
Saves a table to the file.
Definition at line 98 of file truthTableDiskManager.cpp. References file, TruthTable::getInputs(), TruthTable::getName(), TruthTable::getOutputs(), TruthTable::getTable(), and saveVector(). Referenced by saveTableList(). Here is the call graph for this function: ![]() |
|
Saves a table list to the file.
Definition at line 78 of file truthTableDiskManager.cpp. References file, and saveTable(). Referenced by saveTables(). Here is the call graph for this function: ![]() |
|
Saves the table collection to a file.
Definition at line 48 of file truthTableDiskManager.cpp. References file, and saveTableList(). Referenced by TruthTableManager::saveFile(). Here is the call graph for this function: ![]() |
|
Saves a boolean vector to the file.
Definition at line 113 of file truthTableDiskManager.cpp. References file. Referenced by saveTable(). |
|
Truth table controller.
Definition at line 53 of file truthTableDiskManager.hpp. Referenced by returnTables(), and TruthTableDiskManager(). |
|
Text file to be written/read.
Definition at line 55 of file truthTableDiskManager.hpp. Referenced by saveTable(), saveTableList(), saveTables(), and saveVector(). |