HAL
endpoint.cpp
Go to the documentation of this file.
2 
4 #include "hal_core/netlist/net.h"
6 
7 namespace hal
8 {
9  Endpoint::Endpoint(Gate* gate, GatePin* pin, Net* net, bool is_a_destination) : m_gate(gate), m_pin(pin), m_net(net), m_is_a_destination(is_a_destination)
10  {
11  }
12 
13  bool Endpoint::operator==(const Endpoint& other) const
14  {
15  return *m_pin == *other.get_pin() && m_is_a_destination == other.is_destination_pin() && *m_gate == *other.get_gate() && *m_net == *other.get_net();
16  }
17 
18  bool Endpoint::operator!=(const Endpoint& other) const
19  {
20  return !operator==(other);
21  }
22 
23  Gate* Endpoint::get_gate() const
24  {
25  return m_gate;
26  }
27 
28  GatePin* Endpoint::get_pin() const
29  {
30  return m_pin;
31  }
32 
33  Net* Endpoint::get_net() const
34  {
35  return m_net;
36  }
37 
38  bool Endpoint::is_destination_pin() const
39  {
40  return m_is_a_destination;
41  }
42 
43  bool Endpoint::is_source_pin() const
44  {
45  return !m_is_a_destination;
46  }
47 } // namespace hal
Net * get_net() const
Definition: endpoint.cpp:33
GatePin * get_pin() const
Definition: endpoint.cpp:28
Gate * get_gate() const
Definition: endpoint.cpp:23
bool is_destination_pin() const
Definition: endpoint.cpp:38
Definition: gate.h:58
Definition: net.h:58
Net * net