Advertisement
Guest User

point.h

a guest
Dec 16th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.22 KB | None | 0 0
  1. #include <iostream>
  2. #include "linkedList.h"
  3.  
  4. class Point {
  5.     friend class LinkedList;
  6. public:
  7.     //konstruktor bezargumentowy - ustawia 0,0 i null w nazwie
  8.     Point();
  9.     //kontruktor ustawia punkt i nazwę "miejsce nieznane"
  10.     Point(double,double);
  11.     //konstruktor ustawia nazwę i współrzędne
  12.     Point(const char*,double,double);
  13.     //konstruktor kopiujący
  14.     Point(const Point&);
  15.     //konstruktor przenoszący
  16.     Point(Point&&);
  17.  
  18.     // przeładowanie porównania
  19.     bool Point::operator==(Point& reference);
  20.     // przeładowanie znak większosci
  21.     bool Point::operator>(Point& reference);
  22.     // przeładowanie znak mniejszosci
  23.     bool operator<(Point& reference);
  24.     // przeładowanie strumienia
  25.     std::ostream& operator<<(ostream& Stream, const Point& reference);
  26.    
  27.     //funkcje get
  28.     double getX() { return _x; }
  29.     double getY() { return _y; }
  30.     const char* getName() { return _name; };
  31.    
  32.     //wypisz punkt
  33.     void fullPrint();
  34.     //dunkcja zmiany nazwy
  35.     void changeName(const char*);
  36.     //zmiana współrzędnych
  37.     void move(double,double);
  38.    
  39.     //destruktor
  40.     ~Point();
  41. private:
  42.     char* _name;
  43.     double _x;
  44.     double _y;
  45.     Point* next;
  46. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement