#include <layoutConfig.hpp>
Collaboration diagram for LayoutConfig:
Public Member Functions | |
LayoutConfig (int width, int height, int inputs, int outputs) | |
Constructor. | |
virtual | ~LayoutConfig () |
Destructor. | |
bool | cellChanged (int x, int y, bool assigningInput, bool assigningOuput, vector< coordinate > listInputs, vector< coordinate > listOutputs) |
Cell status change. | |
bool | cellChanged (int x, int y, int status) |
Cell status change. | |
Grid | getGrid () |
Member accessor. | |
void | setGrid (Grid newGrid) |
int | getWidth () |
Member accessor. | |
int | getHeight () |
Member accessor. | |
int | getInputs () |
Member accessor. | |
int | getOutputs () |
Member accessor. | |
matrix | getMatrix () |
Member accessor. | |
Private Member Functions | |
bool | findCoordinate (vector< coordinate > list, int x, int y) |
Coordinate finder. | |
Private Attributes | |
Grid | grid |
The grid of the space. | |
int | width |
Space width. | |
int | height |
Space height. | |
int | inputs |
Space inputs. | |
int | outputs |
Space outputs. | |
int | assignedInputs |
Space assigned inputs. | |
int | assignedOutputs |
Space assigned outputs. |
This class represents the model for an initial configuration. A grid and it's inputs and outputs.
Definition at line 42 of file layoutConfig.hpp.
|
Constructor.
Definition at line 31 of file layoutConfig.cpp. References assignedInputs, and assignedOutputs. |
|
Destructor.
Definition at line 44 of file layoutConfig.cpp. |
|
Cell status change. The cell is changed to the given status directly.
Definition at line 221 of file layoutConfig.cpp. References assignedInputs, assignedOutputs, grid, nINPUT, and nOUTPUT. |
|
Cell status change. If all the inputs and outputs are already set we skip those states. It (de)assigns inputs and outputs if the assigning mode is on. If the cell is already assigned for another input/output does nothing. If the cell is already assigned for the current input it gets deassigned.
Definition at line 64 of file layoutConfig.cpp. References assignedInputs, assignedOutputs, findCoordinate(), grid, inputs, nDISABLED, nDONTCARE, nENABLED, nINPUT, nNOSPACE, nOUTPUT, and outputs. Referenced by LayoutManager::cellChanged(). Here is the call graph for this function: ![]() |
|
Coordinate finder. This method finds the given coordinate in a list. It's used to find assigned inputs and outputs.
Definition at line 265 of file layoutConfig.cpp. Referenced by cellChanged(). |
|
Member accessor.
Definition at line 187 of file layoutConfig.cpp. References grid. Referenced by LayoutManager::newLayout(), SimulationManager::prepareSimulation(), LayoutDiskManager::saveLayout(), and LayoutManager::updateGrids(). |
|
Member accessor.
Definition at line 207 of file layoutConfig.cpp. References height. Referenced by LayoutDiskManager::saveLayout(). |
|
Member accessor.
Definition at line 241 of file layoutConfig.cpp. References inputs. Referenced by LayoutManager::tablesChanged(). |
|
Member accessor.
Definition at line 282 of file layoutConfig.cpp. References Grid::getCells(), and grid. Referenced by SimulationManager::prepareSimulation(), and SimulationManager::simulateRow(). Here is the call graph for this function: ![]() |
|
Member accessor.
Definition at line 251 of file layoutConfig.cpp. References outputs. Referenced by LayoutManager::tablesChanged(). |
|
Member accessor.
Definition at line 197 of file layoutConfig.cpp. References width. Referenced by LayoutDiskManager::saveLayout(). |
|
|
|
Space assigned inputs.
Definition at line 69 of file layoutConfig.hpp. Referenced by cellChanged(), and LayoutConfig(). |
|
Space assigned outputs.
Definition at line 71 of file layoutConfig.hpp. Referenced by cellChanged(), and LayoutConfig(). |
|
The grid of the space.
Definition at line 59 of file layoutConfig.hpp. Referenced by cellChanged(), getGrid(), and getMatrix(). |
|
Space height.
Definition at line 63 of file layoutConfig.hpp. Referenced by getHeight(). |
|
Space inputs.
Definition at line 65 of file layoutConfig.hpp. Referenced by cellChanged(), and getInputs(). |
|
Space outputs.
Definition at line 67 of file layoutConfig.hpp. Referenced by cellChanged(), and getOutputs(). |
|
Space width.
Definition at line 61 of file layoutConfig.hpp. Referenced by getWidth(). |