|
degate 0.1.1
|
#include <Point.h>
Public Member Functions | |
| Point () | |
| Point (int x, int y) | |
| bool | operator== (const Point &other) const |
| bool | operator!= (const Point &other) const |
| int | get_x () const |
| int | get_y () const |
| void | set_x (int x) |
| void | set_y (int y) |
| void | shift_x (int delta_x) |
| void | shift_y (int delta_y) |
| unsigned int | get_distance (Point const &p) const |
| Calculate the distance to another point. | |
| std::string | to_string () const |
Private Attributes | |
| int | x |
| int | y |
| Point::Point | ( | int | x, |
| int | y | ||
| ) |
| unsigned int Point::get_distance | ( | Point const & | p | ) | const |
Calculate the distance to another point.
Definition at line 72 of file Point.cc.
References get_x(), get_y(), x, and y.
Referenced by degate::LineSegmentMap::find_adjacent(), and degate::LineSegment::merge().


| int Point::get_x | ( | ) | const |
Definition at line 46 of file Point.cc.
References x.
Referenced by degate::GateLibraryExporter::add_ports(), degate::LineSegmentMap::find_adjacent(), get_distance(), degate::GateTemplatePort::get_x(), degate::Line::set_p1(), and degate::Line::set_p2().
{
return x;
}

| int Point::get_y | ( | ) | const |
Definition at line 50 of file Point.cc.
References y.
Referenced by degate::GateLibraryExporter::add_ports(), degate::LineSegmentMap::find_adjacent(), get_distance(), degate::GateTemplatePort::get_y(), degate::Line::set_p1(), and degate::Line::set_p2().
{
return y;
}

| bool Point::operator!= | ( | const Point & | other | ) | const |
| bool Point::operator== | ( | const Point & | other | ) | const |
| void Point::shift_x | ( | int | delta_x | ) |
| void Point::shift_y | ( | int | delta_y | ) |
| std::string Point::to_string | ( | ) | const |
int degate::Point::x [private] |
Definition at line 32 of file Point.h.
Referenced by get_distance(), get_x(), operator==(), Point(), set_x(), shift_x(), and to_string().
int degate::Point::y [private] |
Definition at line 32 of file Point.h.
Referenced by get_distance(), get_y(), operator==(), Point(), set_y(), shift_y(), and to_string().
1.7.4