HAL
endpoint.cpp
Go to the documentation of this file.
2 
3 namespace hal
4 {
6  {
7  py::class_<Endpoint, RawPtrWrapper<Endpoint>> py_endpoint(m, "Endpoint", R"(
8  An endpoint comprises the pin of a gate, the respective gate, and the connected net.
9  )");
10 
11  py_endpoint.def_property_readonly("gate", &Endpoint::get_gate, R"(
12  The gate associated with the endpoint.
13 
14  :type: hal_py.Gate
15  )");
16 
17  py_endpoint.def(py::self == py::self, R"(
18  Check whether two endpoints are equal.
19 
20  :returns: True if both endpoints are equal, False otherwise.
21  :rtype: bool
22  )");
23 
24  py_endpoint.def(py::self != py::self, R"(
25  Check whether two endpoints are unequal.
26 
27  :returns: True if both endpoints are unequal, False otherwise.
28  :rtype: bool
29  )");
30 
31  py_endpoint.def("get_gate", &Endpoint::get_gate, R"(
32  Get the gate associated with the endpoint.
33 
34  :returns: The gate.
35  :rtype: hal_py.Gate
36  )");
37 
38  py_endpoint.def_property_readonly("pin", &Endpoint::get_pin, R"(
39  The pin associated with the endpoint.
40 
41  :type: hal_py.GatePin
42  )");
43 
44  py_endpoint.def("get_pin", &Endpoint::get_pin, R"(
45  Get pin associated with the endpoint.
46 
47  :returns: The pin.
48  :rtype: hal_py.GatePin
49  )");
50 
51  py_endpoint.def_property_readonly("net", &Endpoint::get_net, R"(
52  The net associated with the endpoint.
53 
54  :type: hal_py.Net
55  )");
56 
57  py_endpoint.def("get_net", &Endpoint::get_net, R"(
58  Get the net associated with the endpoint.
59 
60  :returns: The net.
61  :rtype: hal_py.Net
62  )");
63 
64  py_endpoint.def_property_readonly("source_pin", &Endpoint::is_source_pin, R"(
65  True if the pin of the endpoint is a source (output) pin, False otherwise.
66 
67  :type: bool
68  )");
69 
70  py_endpoint.def("is_source_pin", &Endpoint::is_source_pin, R"(
71  Checks whether the pin of the endpoint is a source (output) pin.
72 
73  :returns: True if the endpoint is an source (output) pin, False otherwise.
74  :rtype: bool
75  )");
76 
77  py_endpoint.def_property_readonly("destination_pin", &Endpoint::is_destination_pin, R"(
78  True if the pin of the endpoint is a destination (input) pin, False otherwise.
79 
80  :type: bool
81  )");
82 
83  py_endpoint.def("is_destination_pin", &Endpoint::is_destination_pin, R"(
84  Checks whether the pin of the endpoint is a destination (input) pin.
85 
86  :returns: True if the endpoint is an destination (input) pin, False otherwise.
87  :rtype: bool
88  )");
89  }
90 } // namespace hal
Net * get_net() const
Definition: endpoint.cpp:33
GatePin * get_pin() const
Definition: endpoint.cpp:28
bool is_source_pin() const
Definition: endpoint.cpp:43
Gate * get_gate() const
Definition: endpoint.cpp:23
bool is_destination_pin() const
Definition: endpoint.cpp:38
void endpoint_init(py::module &m)
Definition: endpoint.cpp:5
const Module * module(const Gate *g, const NodeBoxes &boxes)