OdbDesignLib
OdbDesign ODB++ Parsing Library
Part.h
1 #pragma once
2 
3 #include "../odbdesign_export.h"
4 #include <string>
5 #include <vector>
6 #include <map>
7 #include <memory>
8 #include "../ProtoBuf/part.pb.h"
9 #include "../IProtoBuffable.h"
10 
11 namespace Odb::Lib::ProductModel
12 {
13  class ODBDESIGN_EXPORT Part : public IProtoBuffable<Odb::Lib::Protobuf::ProductModel::Part>
14  {
15  public:
16  Part(const std::string& name);
17 
18  std::string GetName() const;
19 
20  typedef std::vector<std::shared_ptr<Part>> Vector;
21  typedef std::map<std::string, std::shared_ptr<Part>> StringMap;
22 
23  // Inherited via IProtoBuffable
24  std::unique_ptr<Odb::Lib::Protobuf::ProductModel::Part> to_protobuf() const override;
25  void from_protobuf(const Odb::Lib::Protobuf::ProductModel::Part& message) override;
26 
27  private:
28  std::string m_name;
29 
30  };
31 }