1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #pragma once
- class Point
- {
- double m_x, m_y;
- public:
- explicit Point(double x = 0, double y = 0);//constructor
- Point(const Point&);//copy-constructor
- Point(Point&&);//move copy-constructor
- ~Point();//destructor
- void Get_all(double&, double&);//ëèáî friend operator-=
- void Get_all(double&, double&) const;
- void Set_all(double&, double&);
- /*friend void operator-=(Point& This, const Point& Other) { This.m_x -= Other.m_x; This.m_y -= Other.m_y; };
- friend Point operator+(const double num, const Point& other){return Point(other.m_x + num, other.m_y + num);};
- friend Point operator-(const Point& thirst, const double num){return Point(thirst.m_x - num, thirst.m_y - num);};
- friend Point operator-(const Point& thirst, const Point& second){return Point(thirst.m_x - second.m_x, thirst.m_y - second.m_y);};*/
- Point& operator=(const Point&);
- Point& operator=(Point&&);
-
- Point operator+(const Point&) const;
- Point operator+(const double) const;
- //Point& operator+(Point&&); ???
- Point& operator+=(const Point&);
- Point& operator+=(const double);
- //Point& operator+=(Point&&); ???
- Point operator+() const;
- Point operator-() const;
- };
- Point operator+(const double, const Point&);
- Point operator-(const Point&, const double);
- Point operator-(const Point&, const Point&);
- Point& operator-=(Point&, const Point&);
|