8 #include "../../odbdesign_export.h"
9 #include "../../IProtoBuffable.h"
10 #include "../../ProtoBuf/netlistfile.pb.h"
11 #include "../ISaveable.h"
12 #include "../IStreamSaveable.h"
16 namespace Odb::Lib::FileModel::Design
23 unsigned int serialNumber;
27 std::unique_ptr<Odb::Lib::Protobuf::NetlistFile::NetRecord> to_protobuf()
const override;
28 void from_protobuf(
const Odb::Lib::Protobuf::NetlistFile::NetRecord& message)
override;
30 typedef std::vector<std::shared_ptr<NetRecord>> Vector;
31 typedef std::map<std::string, std::shared_ptr<NetRecord>> StringMap;
33 inline constexpr
static const char* FIELD_TOKEN =
"$";
46 unsigned int netNumber;
58 double staggeredRadius;
63 char testExecutionSide;
66 std::unique_ptr<Odb::Lib::Protobuf::NetlistFile::NetPointRecord> to_protobuf()
const override;
67 void from_protobuf(
const Odb::Lib::Protobuf::NetlistFile::NetPointRecord& message)
override;
69 typedef std::vector<std::shared_ptr<NetPointRecord>> Vector;
71 inline static const Utils::EnumMap<AccessSide> accessSideMap{
81 bool Save(std::ostream& os)
override;
92 inline static const Utils::EnumMap<Staggered> staggeredMap{
100 NetlistFile(std::filesystem::path path);
103 std::filesystem::path GetPath()
const;
104 std::string GetName()
const;
105 std::string GetUnits()
const;
107 bool GetOptimized()
const;
108 Staggered GetStaggered()
const;
110 const NetRecord::Vector& GetNetRecords()
const;
111 const NetRecord::StringMap& GetNetRecordsByName()
const;
112 const NetPointRecord::Vector& GetNetPointRecords()
const;
116 bool Save(
const std::filesystem::path& directory)
override;
119 std::unique_ptr<Odb::Lib::Protobuf::NetlistFile> to_protobuf()
const override;
120 void from_protobuf(
const Odb::Lib::Protobuf::NetlistFile& message)
override;
122 typedef std::vector<std::shared_ptr<NetlistFile>> Vector;
123 typedef std::map<std::string, std::shared_ptr<NetlistFile>> StringMap;
126 std::filesystem::path m_path;
130 Staggered m_staggered;
132 NetRecord::Vector m_netRecords;
133 NetRecord::StringMap m_netRecordsByName;
134 NetPointRecord::Vector m_netPointRecords;
136 inline constexpr
static const char HEADER_TOKEN[] =
"H";
137 inline constexpr
static const char STAGGERED_KEY[] =
"staggered";
140 bool Save(std::ostream& os)
override;