4 #ifndef ODBDESIGN_ATTRLISTFILE_H
5 #define ODBDESIGN_ATTRLISTFILE_H
10 #include "../../IProtoBuffable.h"
11 #include "../../ProtoBuf/attrlistfile.pb.h"
12 #include "../../odbdesign_export.h"
14 namespace Odb::Lib::FileModel::Design
21 typedef std::map<std::string, std::string> AttributeMap;
23 std::string GetUnits()
const;
24 const AttributeMap& GetAttributes()
const;
26 bool Parse(std::filesystem::path directory);
29 std::unique_ptr<Odb::Lib::Protobuf::AttrListFile> to_protobuf()
const override;
30 void from_protobuf(
const Odb::Lib::Protobuf::AttrListFile& message)
override;
33 std::filesystem::path m_directory;
34 std::filesystem::path m_path;
36 AttributeMap m_attributesByName;
38 bool attributeValueIsOptional(
const std::string& attributeName)
const;
40 inline static const auto ATTRLIST_FILENAMES = {
"attrlist" };
41 inline static const char* OPTIONAL_ATTRIBUTES[] = {
"" };