wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
SerializationContext.h
Go to the documentation of this file.
1// Copyright 2015 - 2026, GIBIS-UNIFESP and the wiRedPanda contributors
2// SPDX-License-Identifier: GPL-3.0-or-later
3
7
8#pragma once
9
10#include <QHash>
11#include <QMap>
12#include <QString>
13#include <QVersionNumber>
14
15class Port;
16
46
62 QHash<quint64, Port *> &portMap;
63 QVersionNumber version;
65 QString contextDir = {};
66 QHash<quint64, quint64> oldPtrToSerialId = {};
69 int nextLocalId = 1;
71 QMap<QString, QByteArray> *blobRegistry = nullptr;
72};
73
SerializationPurpose
What a serialization operation is for – shared by both load() and save(), so the same distinction is ...
Abstract base class for circuit element ports (connection endpoints).
Definition Port.h:39
Bundles all per-deserialization state so that load() overrides receive it through one explicit parame...
QVersionNumber version
File-format version read from the stream header.
QHash< quint64, quint64 > oldPtrToSerialId
SerializationPurpose purpose
What this deserialization is for; see SerializationPurpose.
QHash< quint64, Port * > & portMap
Accumulated port-pointer map built during deserialization.
QMap< QString, QByteArray > * blobRegistry
Blob registry for resolving embedded IC blobNames during deserialization.
QString contextDir
Directory of the .panda file (for relative path resolution).
Options passed to GraphicElement::save() (and friends); the save-side counterpart of SerializationCon...
SerializationPurpose purpose
What this serialization is for; see SerializationPurpose. Mandatory, no default.