|
wiRedPanda
Logic Circuit Simulator
|
Loads an IC's sub-circuit (from file or embedded blob), migrates old-format files, and builds the resulting boundary port lists. More...
#include <ICLoader.h>
Static Public Member Functions | |
| static IC::PortMetadata | buildPortMetadata (const QVector< GraphicElement * > &elements) |
| Scans elements for Input/Output groups, sorts by Y/X position, and builds labels. | |
| static void | loadFile (IC &ic, const QString &fileName, const QString &contextDir={}) |
| Loads ic's circuit from fileName and rebuilds the logic mapping. | |
| static void | loadFromBlob (IC &ic, const QByteArray &blob, const QString &contextDir) |
| Loads ic from in-memory blob bytes (full .panda file format). | |
Loads an IC's sub-circuit (from file or embedded blob), migrates old-format files, and builds the resulting boundary port lists.
Extracted from IC so file/blob loading is a collaborator rather than a cluster of methods on the element itself, mirroring the GraphicElement / GraphicElementSerializer split. A friend of IC, it reaches the element's internal-element/port vectors directly. All methods are static and take the IC explicitly; IC keeps all state (it's already heavily friended by tests), so this is a pure logic extraction, not a new owner-back-pointer collaborator.
Definition at line 36 of file ICLoader.h.
|
static |
Scans elements for Input/Output groups, sorts by Y/X position, and builds labels.
Definition at line 468 of file ICLoader.cpp.
References GraphicElement::elementGroup(), IC::PortMetadata::inputCount, IC::PortMetadata::inputLabels, GraphicElement::inputs(), IC::PortMetadata::outputCount, IC::PortMetadata::outputLabels, and GraphicElement::outputs().
Referenced by IC::buildPortMetadata().
|
static |
Loads ic's circuit from fileName and rebuilds the logic mapping.
Definition at line 88 of file ICLoader.cpp.
References GraphicElement::label(), PANDACEPTION, qCDebug, ExternalFilePath::resolve(), and GraphicElement::setLabel().
Referenced by IC::loadFile().
|
static |
Loads ic from in-memory blob bytes (full .panda file format).
Definition at line 348 of file ICLoader.cpp.
References qCDebug.
Referenced by IC::loadFromBlob().