HAL
module_pin.cpp
Go to the documentation of this file.
2 
3 namespace hal
4 {
5  ModulePin::ModulePin(const u32 id, const std::string& name, Net* net, PinDirection direction, PinType type) : BasePin(id, name, direction, type), m_net(net)
6  {
7  }
8 
9  bool ModulePin::operator==(const ModulePin& other) const
10  {
11  return m_net->get_id() == other.get_net()->get_id() && BasePin::operator==(other);
12  }
13 
14  bool ModulePin::operator!=(const ModulePin& other) const
15  {
16  return !operator==(other);
17  }
18 
20  {
21  return m_net;
22  }
23 } // namespace hal
bool operator==(const BasePin &other) const
Definition: base_pin.h:55
bool operator==(const ModulePin &other) const
Definition: module_pin.cpp:9
ModulePin(const u32 id, const std::string &name, Net *net, PinDirection direction, PinType type=PinType::none)
Definition: module_pin.cpp:5
Net * get_net() const
Definition: module_pin.cpp:19
bool operator!=(const ModulePin &other) const
Definition: module_pin.cpp:14
Definition: net.h:58
u32 get_id() const
Definition: net.cpp:88
PinDirection
Definition: pin_direction.h:36
PinType
Definition: pin_type.h:36
quint32 u32
PinType type
Net * net
PinDirection direction
std::string name
i32 id