static unsigned get_signature_size() { return 2; }
static bool detect(const std::string &);
- virtual void load_headers_(Image::Data &);
- virtual void load_pixels_(Image::Data &);
+ void load_headers_(Image::Data &) override;
+ void load_pixels_(Image::Data &) override;
};
} // namespace Graphics
public:
DevilLoader(IO::Seekable &);
- virtual ~DevilLoader();
+ ~DevilLoader();
static unsigned get_signature_size() { return 128; }
static bool detect(const std::string &);
- virtual void load_headers_(Image::Data &);
- virtual void load_pixels_(Image::Data &);
+ void load_headers_(Image::Data &) override;
+ void load_pixels_(Image::Data &) override;
};
} // namespace Graphics
public:
ErrorDialog(Display *d): display(d) { }
- virtual bool report_uncaught_exception(const std::exception &) const;
+ bool report_uncaught_exception(const std::exception &) const override;
};
} // namespace Graphics
class RegisteredLoader: public RegisterBase
{
public:
- virtual unsigned get_signature_size() const { return T::get_signature_size(); }
- virtual bool detect(const std::string &s) const { return T::detect(s); }
- virtual ImageLoader *create(IO::Seekable &io) const { return new T(io); }
+ unsigned get_signature_size() const override { return T::get_signature_size(); }
+ bool detect(const std::string &s) const override { return T::detect(s); }
+ ImageLoader *create(IO::Seekable &io) const override { return new T(io); }
};
struct Registry
public:
JpegLoader(IO::Seekable &);
- virtual ~JpegLoader();
+ ~JpegLoader();
static unsigned get_signature_size() { return 3; }
static bool detect(const std::string &);
- virtual void load_headers_(Image::Data &);
- virtual void load_pixels_(Image::Data &);
+ void load_headers_(Image::Data &) override;
+ void load_pixels_(Image::Data &) override;
};
} // namespace Graphics
public:
PngLoader(IO::Base &, unsigned = 0);
- virtual ~PngLoader();
+ ~PngLoader();
static unsigned get_signature_size() { return 8; }
static bool detect(const std::string &);
- virtual void load_headers_(Image::Data &);
- virtual void load_pixels_(Image::Data &);
+ void load_headers_(Image::Data &) override;
+ void load_pixels_(Image::Data &) override;
};
} // namespace Graphics
public:
QuartzLoader(IO::Seekable &);
- virtual ~QuartzLoader();
+ ~QuartzLoader();
/* Experimentally found value, works for png and jpeg at least. 8 bytes
is not enough for Quartz to recognize png. */
static unsigned get_signature_size() { return 12; }
static bool detect(const std::string &);
- virtual void load_headers_(Image::Data &);
- virtual void load_pixels_(Image::Data &);
+ void load_headers_(Image::Data &) override;
+ void load_pixels_(Image::Data &) override;
};
} // namespace Graphics
BinaryControl();
BinaryControl(const ControlSource &);
BinaryControl(Device &, ControlSrcType, unsigned);
- virtual ~BinaryControl();
+ ~BinaryControl();
/** Sets the threshold between states for axis sources. No effect on button
sources */
bool was_released() const { return falling_edge; }
private:
- virtual void on_press();
- virtual void on_release();
- virtual void on_motion(float, float);
+ void on_press() override;
+ void on_release() override;
+ void on_motion(float, float) override;
};
} // namespace Input
Loader(Bindings &);
private:
- virtual void init_actions();
+ void init_actions() override;
void binding(const std::string &);
void device_type(DeviceType);
Loader(Binding &);
private:
- virtual void init_actions();
+ void init_actions() override;
void axis(unsigned, AxisSide);
void button(unsigned);
public:
GameController(unsigned);
- virtual ~GameController();
+ ~GameController();
static unsigned detect();
static bool is_available(unsigned = 0);
public:
GestureDetector(Touchscreen &);
- virtual std::string get_button_name(unsigned) const;
- virtual std::string get_axis_name(unsigned) const;
+ std::string get_button_name(unsigned) const override;
+ std::string get_axis_name(unsigned) const override;
private:
void touch_down(unsigned);
/// Attaches an input device to the hub.
void attach(Device &dev);
- virtual Device *find_subdevice(DeviceType, unsigned = 0);
- virtual Device *find_subdevice(const std::string &);
+ Device *find_subdevice(DeviceType, unsigned = 0) override;
+ Device *find_subdevice(const std::string &) override;
- virtual std::string get_button_name(unsigned) const;
- virtual std::string get_axis_name(unsigned) const;
+ std::string get_button_name(unsigned) const override;
+ std::string get_axis_name(unsigned) const override;
protected:
void button_press(unsigned, unsigned);
void button_release(unsigned, unsigned);
public:
Keyboard(Graphics::Window &);
- virtual ~Keyboard();
+ ~Keyboard();
- virtual std::string get_button_name(unsigned) const;
+ std::string get_button_name(unsigned) const override;
private:
void input_event(const Graphics::Window::Event &);
};
std::string get_name() const;
- virtual void set_block(bool) { }
- virtual void set_inherit(bool) { }
+ void set_block(bool) override { }
+ void set_inherit(bool) override { }
protected:
- virtual std::size_t do_read(char *, std::size_t);
- virtual std::size_t do_write(const char *, std::size_t);
+ std::size_t do_read(char *, std::size_t) override;
+ std::size_t do_write(const char *, std::size_t) override;
public:
- virtual const IO::Handle &get_handle(IO::Mode) { return handle; }
- virtual const IO::Handle &get_event_handle() { return handle; }
+ const IO::Handle &get_handle(IO::Mode) override { return handle; }
+ const IO::Handle &get_event_handle() override { return handle; }
};
public:
Mouse(Graphics::Window &);
- virtual std::string get_button_name(unsigned) const;
- virtual std::string get_axis_name(unsigned) const;
+
+ std::string get_button_name(unsigned) const override;
+ std::string get_axis_name(unsigned) const override;
private:
void input_event(const Graphics::Window::Event &);
};
SmoothControl();
SmoothControl(const ControlSource &);
SmoothControl(Device &, ControlSrcType, unsigned);
- virtual ~SmoothControl();
+ ~SmoothControl();
/// Sets the dead zone value. Any value below this will be treated as 0.
void set_dead_zone(float);
float get_value() const { return value; }
private:
- virtual void on_press();
- virtual void on_release();
- virtual void on_motion(float, float);
+ void on_press() override;
+ void on_release() override;
+ void on_motion(float, float) override;
};
} // namespace Input
Graphics::Window &get_window() const { return window; }
- virtual std::string get_button_name(unsigned) const;
- virtual std::string get_axis_name(unsigned) const;
+ std::string get_button_name(unsigned) const override;
+ std::string get_axis_name(unsigned) const override;
private:
void input_event(const Graphics::Window::Event &);
static void remove_slot(Time::Timer::Slot &);
private:
- virtual void main();
+ void main() override;
};