3 #include "../odbdesign_export.h"
9 #include "../ProtoBuf/package.pb.h"
10 #include "../IProtoBuffable.h"
13 namespace Odb::Lib::ProductModel
18 Package(
const std::string& name,
unsigned int index);
21 std::string GetName()
const;
22 unsigned int GetIndex()
const;
24 void AddPin(
const std::string& name);
25 std::shared_ptr<Pin> GetPin(
const std::string& name)
const;
26 std::shared_ptr<Pin> GetPin(
unsigned int index)
const;
27 const Pin::StringMap& GetPinsByName()
const;
28 const Pin::Vector& GetPins()
const;
31 std::unique_ptr<Odb::Lib::Protobuf::ProductModel::Package> to_protobuf()
const override;
32 void from_protobuf(
const Odb::Lib::Protobuf::ProductModel::Package& message)
override;
34 typedef std::vector<std::shared_ptr<Package>> Vector;
35 typedef std::map<std::string, std::shared_ptr<Package>> StringMap;
40 Pin::StringMap m_pinsByName;