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