now following coplien form

This commit is contained in:
arthur.jamet
2021-05-14 19:02:21 +02:00
parent 94d59b5952
commit fe4142b9a6
10 changed files with 25 additions and 17 deletions
+2 -2
View File
@@ -15,13 +15,13 @@ namespace Ray {
public:
Color(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
Color(const Color &);
Color(const Color &) = default;
Color(int hexValue);
~Color() = default;
Color &operator=(const Color &);
Color &operator=(const Color &) = default;
Color &setR(unsigned char r);
Color &setG(unsigned char g);
+2 -2
View File
@@ -21,9 +21,9 @@ namespace Ray {
~GamePad() = default;
GamePad(const GamePad &);
GamePad(const GamePad &) = default;
GamePad &operator=(const GamePad &);
GamePad &operator=(const GamePad &) = default;
bool isPressed(Button);
bool isDown(Button);
+4 -2
View File
@@ -16,10 +16,12 @@ namespace Ray {
{
public:
Circle(Vector2 topLeftPos, int radius, Color);
Circle(int topLeftX, int topLeftY, int radius, Color);
Circle(const Circle &);
Circle(const Circle &) = default;
Circle &operator=(const Circle &);
Circle &operator=(const Circle &) = default;
~Circle() = default;
+2 -2
View File
@@ -17,9 +17,9 @@ namespace Ray {
public:
Line(Vector2 position, int length, Color);
Line(int x, int y, int length, Color);
Line(const Line &);
Line(const Line &) = default;
Line &operator=(const Line &);
Line &operator=(const Line &) = default;
~Line() = default;
+2 -2
View File
@@ -17,9 +17,9 @@ namespace Ray {
public:
Point(Vector2 position, Color);
Point(int x, int y, Color);
Point(const Point &);
Point(const Point &) = default;
Point &operator=(const Point &);
Point &operator=(const Point &) = default;
~Point() = default;
};
@@ -17,9 +17,9 @@ namespace Ray {
public:
Rectangle(Vector2 position, Vector2 dimensions,int length, Color);
Rectangle(int x, int y, int width, int height, int length, Color);
Rectangle(const Rectangle &);
Rectangle(const Rectangle &) = default;
Rectangle &operator=(const Rectangle &);
Rectangle &operator=(const Rectangle &) = default;
~Rectangle() = default;
+2 -2
View File
@@ -17,9 +17,9 @@ namespace Ray {
public:
Text(const std::string &text, int fontSize, Vector2 position, Color);
Text(const std::string &text, int fontSize, int x, int y, Color);
Text(const Text &);
Text(const Text &) = default;
Text &operator=(const Text &);
Text &operator=(const Text &) = default;
~Text() = default;
+2
View File
@@ -21,6 +21,8 @@ namespace Ray {
public:
Drawable(Vector2 position, Color color);
Drawable(int x, int y, Color color);
Drawable(const Drawable &) = default;
virtual ~Drawable() = 0;
const Vector2 &getPosition(void) const;
+3 -3
View File
@@ -20,16 +20,16 @@ namespace Ray
Image(const Image &);
Image();
Image &operator=(const Image &);
Image &operator=(const Image &) = default;
~Image();
bool load(const std::string &filename);
bool exportTo(const std::string &outputPath);
bool unload();
const ::Image &getImage(void) const;
~Image();
void draw(const Rectangle &);
void draw(const Line &);
void draw(const Point &);
+4
View File
@@ -19,6 +19,10 @@ namespace Ray {
public:
// Creates window, and opens it if openNow is set to true
Window(int width, int height, const std::string title, bool openNow = false);
Window(const Window &) = default;
Window &operator=(const Window &) = default;
//Closes window if still open
~Window() = default;