SDL Utility
Drawable.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "Util.hpp"
10 
11 struct SDL_Renderer;
12 
17 class Drawable
18 {
19 public:
20  Drawable(const Drawable& other) = delete;
21  Drawable(Drawable&& other) = delete;
22  Drawable& operator=(const Drawable& other) = delete;
23 
24  friend class RenderTarget;
25 
26 protected:
27  Drawable() { }
28  virtual void Draw(SDL_Renderer* const target) const = 0;
29 };
30 SDLU_END
Basic utility macros, typedefs...
#define SDLU_BEGIN
Definition: Util.hpp:32
Everything that can be rendered derives from this class.
Definition: Drawable.hpp:18
Drawable & operator=(const Drawable &other)=delete
Drawable(Drawable &&other)=delete
Drawable(const Drawable &other)=delete
Drawable()
Definition: Drawable.hpp:27
virtual void Draw(SDL_Renderer *const target) const =0
Acts as a wrapper for SDL_Renderer*. You can't (and shouldn't) instantiate this, but rather derive fr...
Definition: RenderTarget.hpp:22