OdbDesignLib
OdbDesign ODB++ Parsing Library
PropertyRecord.h
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 #include <map>
6 #include <memory>
7 #include "../../odbdesign_export.h"
8 #include "../../IProtoBuffable.h"
9 #include "../../ProtoBuf/common.pb.h"
10 
11 namespace Odb::Lib::FileModel::Design
12 {
13  struct ODBDESIGN_EXPORT PropertyRecord : public IProtoBuffable<Odb::Lib::Protobuf::PropertyRecord>
14  {
15  // data members
16  std::string name;
17  std::string value;
18  std::vector<float> floatValues;
19 
20  // constants
21  constexpr inline static const char* RECORD_TOKEN = "PRP";
22 
23  // typedefs
24  typedef std::map<std::string, std::shared_ptr<PropertyRecord>> StringMap;
25  typedef std::vector<std::shared_ptr<PropertyRecord>> Vector;
26 
27  // Inherited via IProtoBuffable
28  std::unique_ptr<Odb::Lib::Protobuf::PropertyRecord> to_protobuf() const override;
29  void from_protobuf(const Odb::Lib::Protobuf::PropertyRecord& message) override;
30  };
31 }