Skip to content

Files

Latest commit

 

History

History
58 lines (39 loc) · 1.95 KB

systems.md

File metadata and controls

58 lines (39 loc) · 1.95 KB

Systems

The Backend

The Backend creates and manages Circuits and Evaluators.

BlockContainer

BlockContainer is a container used for storing and modifying the gird of Cells and the related Blocks.

When modifying a Block the cells for that block will get automatically modified. When modifying connections both Blocks at each end of connection will get modified.

Cell The Cell class is used to store data at locations on the grid. It currently only stores a block_id_t of its Block.

Block The Block class is used to store all the information about a block including:

  • Type
  • block_id_t
  • Position
  • Rotation
  • ConnectionContainer
  • Simple data (rn its a int that can hold dif stuff)

Connection Container The ConnectionContainer just holds and allows added and removing connections. Each connection is a connection_end_id_t and ConnectionEnd. A connection_end_id_t is local to a block and says which input or output the connection goes into. A ConnectionEnd stores a block_id_t of the other block and a connection_end_id_t for which connection in that other block.

Circuit

Circuit is used to manage the modifications to BlockContainer coming from other parts of the program. When you tell Circuit to modify BlockContainer it will create a Difference that contain the effects that the modification had. Classes can subscribe to a listener to receieve those Difference. It is also added to the undo stack which allows undo and redo.

Evaluator

Evaluators Evaluator are used to simulate the circuit made of containers.

Block Container View

Renderers

Renderers are made to interface with both the windowing library and the backend. CircuitView takes a renderer as a template argument.

Tools

Tools are mannaged by the tool mannager which deals with swapping and registering tools for a view. You can create tools by inheriting CircuitTool.

QT

Actions

TODO

Settings

TODO