|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include <hal_core/netlist/persistent/grouping_serializer.h>


Public Member Functions | |
| GroupingSerializer () | |
| std::string | serialize (Netlist *netlist, const std::filesystem::path &savedir, bool isAutosave) override |
| void | deserialize (Netlist *netlist, const std::filesystem::path &loaddir) override |
Public Member Functions inherited from hal::ProjectSerializer | |
| ProjectSerializer (const std::string &name) | |
| virtual | ~ProjectSerializer () |
Additional Inherited Members | |
Protected Attributes inherited from hal::ProjectSerializer | |
| std::string | m_name |
A project serializer that stores the groupings of a netlist in a separate file within the project directory.
Definition at line 37 of file grouping_serializer.h.
| hal::GroupingSerializer::GroupingSerializer | ( | ) |
Definition at line 19 of file grouping_serializer.cpp.
|
overridevirtual |
Deserialize elements of class Grouping from file. File will be queried from ProjectManager
| [in] | netlist | Target netlist to restore groupings |
| [in] | loaddir | Project directory to load file from |
Implements hal::ProjectSerializer.
Definition at line 69 of file grouping_serializer.cpp.
References hal::Grouping::assign_gate(), hal::Grouping::assign_module(), hal::Grouping::assign_net(), hal::Netlist::create_grouping(), hal::ProjectManager::get_filename(), hal::Netlist::get_gate_by_id(), hal::Netlist::get_module_by_id(), hal::Netlist::get_net_by_id(), hal::ProjectManager::instance(), log_error, and hal::ProjectSerializer::m_name.
|
overridevirtual |
Serialize elements of class Grouping to separate file
| [in] | netlist | Netlist that might contain groupings |
| [in] | savedir | Project directory to save to |
| [in] | isAutosave | true if serialize call was issued from autosave, false otherwise |
Implements hal::ProjectSerializer.
Definition at line 23 of file grouping_serializer.cpp.
References hal::JsonWriteObject::add_array(), hal::JsonWriteArray::add_object(), hal::JsonWriteComplex::close(), hal::Netlist::get_groupings(), and hal::JsonWriteDocument::serialize().