![]() |
HAL
|
#include <project_serializer.h>
Public Member Functions | |
ProjectSerializer (const std::string &name) | |
virtual | ~ProjectSerializer () |
virtual std::string | serialize (Netlist *netlist, const std::filesystem::path &savedir, bool isAutosave)=0 |
virtual void | deserialize (Netlist *netlist, const std::filesystem::path &loaddir)=0 |
Protected Attributes | |
std::string | m_name |
Definition at line 36 of file project_serializer.h.
hal::ProjectSerializer::ProjectSerializer | ( | const std::string & | name | ) |
Constructor
name | Tag name for serializer to be identified by project manager |
Definition at line 5 of file project_serializer.cpp.
References hal::ProjectManager::instance(), m_name, and hal::ProjectManager::register_serializer().
|
virtual |
Virtual destructor
Definition at line 11 of file project_serializer.cpp.
References hal::ProjectManager::instance(), m_name, and hal::ProjectManager::unregister_serializer().
|
pure virtual |
Abstract deserialize method to be implemented by derived class. Note that it can be assumed upon calling this method that the deserialization of the netlist has been successful. Caller will provide project directory name but not the filename. The latter one can be queried from ProjectManager.
[in] | netlist | The netlist already deserialized |
[in] | loaddir | Project directory to load files from |
Implemented in hal::ModuleColorSerializer, hal::GroupingColorSerializer, hal::CommentManager, hal::GroupingSerializer, hal::PythonSerializer, and hal::GraphContextSerializer.
|
pure virtual |
Abstract serialize method to be implemented by derived class. If there was no need for serialization or serialization failed an empty file name should be returned.
[in] | netlist | The netlist to be serialized |
[in] | savedir | Target project directory |
[in] | isAutosave | True if serialize call was issued from autosave, false otherwise |
Implemented in hal::ModuleColorSerializer, hal::GroupingColorSerializer, hal::CommentManager, hal::GroupingSerializer, hal::PythonSerializer, and hal::GraphContextSerializer.
|
protected |
Definition at line 39 of file project_serializer.h.
Referenced by hal::PythonSerializer::deserialize(), hal::GroupingSerializer::deserialize(), hal::CommentManager::deserialize(), hal::GroupingColorSerializer::deserialize(), hal::ModuleColorSerializer::deserialize(), ProjectSerializer(), hal::PythonSerializer::PythonSerializer(), hal::CommentManager::restore(), hal::GraphContextSerializer::restore(), hal::GroupingColorSerializer::restore(), hal::ModuleColorSerializer::restore(), and ~ProjectSerializer().