WIN32: Add override and final keywords
This commit is contained in:
parent
48d6ff8d6b
commit
5c255b3aa9
14 changed files with 75 additions and 75 deletions
|
@ -74,15 +74,15 @@
|
|||
#include <ntddcdrm.h>
|
||||
#endif
|
||||
|
||||
class Win32AudioCDStream : public AudioCDStream {
|
||||
class Win32AudioCDStream final : public AudioCDStream {
|
||||
public:
|
||||
Win32AudioCDStream(HANDLE handle, const TRACK_DATA &startEntry, const TRACK_DATA &endEntry);
|
||||
~Win32AudioCDStream();
|
||||
|
||||
protected:
|
||||
uint getStartFrame() const;
|
||||
uint getEndFrame() const;
|
||||
bool readFrame(int frame, int16 *buffer);
|
||||
uint getStartFrame() const override;
|
||||
uint getEndFrame() const override;
|
||||
bool readFrame(int frame, int16 *buffer) override;
|
||||
|
||||
private:
|
||||
HANDLE _driveHandle;
|
||||
|
@ -143,7 +143,7 @@ bool Win32AudioCDStream::readFrame(int frame, int16 *buffer) {
|
|||
}
|
||||
|
||||
|
||||
class Win32AudioCDManager : public DefaultAudioCDManager {
|
||||
class Win32AudioCDManager final : public DefaultAudioCDManager {
|
||||
public:
|
||||
Win32AudioCDManager();
|
||||
~Win32AudioCDManager();
|
||||
|
|
|
@ -31,11 +31,11 @@
|
|||
|
||||
class SdlWindow_Win32;
|
||||
|
||||
class Win32DialogManager : public Common::DialogManager {
|
||||
class Win32DialogManager final : public Common::DialogManager {
|
||||
public:
|
||||
Win32DialogManager(SdlWindow_Win32 *window);
|
||||
virtual ~Win32DialogManager();
|
||||
virtual DialogResult showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser);
|
||||
virtual DialogResult showFileBrowser(const Common::U32String &title, Common::FSNode &choice, bool isDirBrowser) override;
|
||||
|
||||
private:
|
||||
SdlWindow_Win32 *_window;
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
*
|
||||
* Parts of this class are documented in the base interface class, FilesystemFactory.
|
||||
*/
|
||||
class WindowsFilesystemFactory : public FilesystemFactory {
|
||||
class WindowsFilesystemFactory final : public FilesystemFactory {
|
||||
public:
|
||||
virtual AbstractFSNode *makeRootFileNode() const;
|
||||
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
|
||||
virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
|
||||
virtual AbstractFSNode *makeRootFileNode() const override;
|
||||
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const override;
|
||||
virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const override;
|
||||
};
|
||||
|
||||
#endif /*WINDOWS_FILESYSTEM_FACTORY_H*/
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
*
|
||||
* Parts of this class are documented in the base interface class, AbstractFSNode.
|
||||
*/
|
||||
class WindowsFilesystemNode : public AbstractFSNode {
|
||||
class WindowsFilesystemNode final : public AbstractFSNode {
|
||||
protected:
|
||||
Common::String _displayName;
|
||||
Common::String _path;
|
||||
|
@ -66,21 +66,21 @@ public:
|
|||
*/
|
||||
WindowsFilesystemNode(const Common::String &path, const bool currentDir);
|
||||
|
||||
virtual bool exists() const;
|
||||
virtual Common::String getDisplayName() const { return _displayName; }
|
||||
virtual Common::String getName() const { return _displayName; }
|
||||
virtual Common::String getPath() const { return _path; }
|
||||
virtual bool isDirectory() const { return _isDirectory; }
|
||||
virtual bool isReadable() const;
|
||||
virtual bool isWritable() const;
|
||||
virtual bool exists() const override;
|
||||
virtual Common::String getDisplayName() const override { return _displayName; }
|
||||
virtual Common::String getName() const override { return _displayName; }
|
||||
virtual Common::String getPath() const override { return _path; }
|
||||
virtual bool isDirectory() const override { return _isDirectory; }
|
||||
virtual bool isReadable() const override;
|
||||
virtual bool isWritable() const override;
|
||||
|
||||
virtual AbstractFSNode *getChild(const Common::String &n) const;
|
||||
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
|
||||
virtual AbstractFSNode *getParent() const;
|
||||
virtual AbstractFSNode *getChild(const Common::String &n) const override;
|
||||
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override;
|
||||
virtual AbstractFSNode *getParent() const override;
|
||||
|
||||
virtual Common::SeekableReadStream *createReadStream();
|
||||
virtual Common::WriteStream *createWriteStream();
|
||||
virtual bool createDirectory();
|
||||
virtual Common::SeekableReadStream *createReadStream() override;
|
||||
virtual Common::WriteStream *createWriteStream() override;
|
||||
virtual bool createDirectory() override;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
//
|
||||
////////////////////////////////////////
|
||||
|
||||
class MidiDriver_WIN : public MidiDriver_MPU401 {
|
||||
class MidiDriver_WIN final : public MidiDriver_MPU401 {
|
||||
private:
|
||||
MIDIHDR _streamHeader;
|
||||
byte _streamBuffer[266]; // SysEx blocks should be no larger than 266 bytes
|
||||
|
@ -57,11 +57,11 @@ private:
|
|||
|
||||
public:
|
||||
MidiDriver_WIN(int deviceIndex) : _isOpen(false), _device(deviceIndex) { }
|
||||
int open();
|
||||
bool isOpen() const { return _isOpen; }
|
||||
void close();
|
||||
int open() override;
|
||||
bool isOpen() const override { return _isOpen; }
|
||||
void close() override;
|
||||
void send(uint32 b) override;
|
||||
void sysEx(const byte *msg, uint16 length);
|
||||
void sysEx(const byte *msg, uint16 length) override;
|
||||
};
|
||||
|
||||
int MidiDriver_WIN::open() {
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
#include "backends/platform/sdl/sdl-window.h"
|
||||
|
||||
class SdlWindow_Win32 : public SdlWindow {
|
||||
class SdlWindow_Win32 final : public SdlWindow {
|
||||
public:
|
||||
virtual void setupIcon();
|
||||
virtual void setupIcon() override;
|
||||
HWND getHwnd();
|
||||
};
|
||||
|
||||
|
|
|
@ -312,15 +312,15 @@ Common::String OSystem_Win32::getDefaultLogFileName() {
|
|||
|
||||
namespace {
|
||||
|
||||
class Win32ResourceArchive : public Common::Archive {
|
||||
class Win32ResourceArchive final : public Common::Archive {
|
||||
friend BOOL CALLBACK EnumResNameProc(HMODULE hModule, LPCTSTR lpszType, LPTSTR lpszName, LONG_PTR lParam);
|
||||
public:
|
||||
Win32ResourceArchive();
|
||||
|
||||
virtual bool hasFile(const Common::String &name) const;
|
||||
virtual int listMembers(Common::ArchiveMemberList &list) const;
|
||||
virtual const Common::ArchiveMemberPtr getMember(const Common::String &name) const;
|
||||
virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
|
||||
virtual bool hasFile(const Common::String &name) const override;
|
||||
virtual int listMembers(Common::ArchiveMemberList &list) const override;
|
||||
virtual const Common::ArchiveMemberPtr getMember(const Common::String &name) const override;
|
||||
virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const override;
|
||||
private:
|
||||
typedef Common::List<Common::String> FilenameList;
|
||||
|
||||
|
|
|
@ -26,36 +26,36 @@
|
|||
#include "backends/platform/sdl/sdl.h"
|
||||
#include "backends/platform/sdl/win32/win32-window.h"
|
||||
|
||||
class OSystem_Win32 : public OSystem_SDL {
|
||||
class OSystem_Win32 final : public OSystem_SDL {
|
||||
public:
|
||||
virtual void init();
|
||||
virtual void initBackend();
|
||||
virtual void init() override;
|
||||
virtual void initBackend() override;
|
||||
|
||||
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
|
||||
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0) override;
|
||||
|
||||
virtual bool hasFeature(Feature f);
|
||||
virtual bool hasFeature(Feature f) override;
|
||||
|
||||
virtual bool displayLogFile();
|
||||
virtual bool displayLogFile() override;
|
||||
|
||||
virtual bool openUrl(const Common::String &url);
|
||||
virtual bool openUrl(const Common::String &url) override;
|
||||
|
||||
virtual void logMessage(LogMessageType::Type type, const char *message);
|
||||
virtual void logMessage(LogMessageType::Type type, const char *message) override;
|
||||
|
||||
virtual Common::String getSystemLanguage() const;
|
||||
virtual Common::String getSystemLanguage() const override;
|
||||
|
||||
virtual Common::String getScreenshotsPath();
|
||||
virtual Common::String getScreenshotsPath() override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getDefaultConfigFileName();
|
||||
virtual Common::String getDefaultLogFileName();
|
||||
virtual Common::String getDefaultConfigFileName() override;
|
||||
virtual Common::String getDefaultLogFileName() override;
|
||||
|
||||
// Override createAudioCDManager() to get our Windows-specific
|
||||
// version.
|
||||
virtual AudioCDManager *createAudioCDManager();
|
||||
virtual AudioCDManager *createAudioCDManager() override;
|
||||
|
||||
HWND getHwnd() { return ((SdlWindow_Win32*)_window)->getHwnd(); }
|
||||
|
||||
virtual char *convertEncoding(const char *to, const char *from, const char *string, size_t length);
|
||||
virtual char *convertEncoding(const char *to, const char *from, const char *string, size_t length) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <windows.h>
|
||||
|
||||
|
||||
class Win32Plugin : public DynamicPlugin {
|
||||
class Win32Plugin final : public DynamicPlugin {
|
||||
private:
|
||||
static const TCHAR* toUnicode(const char *x) {
|
||||
#ifndef UNICODE
|
||||
|
@ -49,7 +49,7 @@ private:
|
|||
protected:
|
||||
void *_dlHandle;
|
||||
|
||||
virtual VoidFunc findSymbol(const char *symbol) {
|
||||
virtual VoidFunc findSymbol(const char *symbol) override {
|
||||
FARPROC func = GetProcAddress((HMODULE)_dlHandle, toUnicode(symbol));
|
||||
if (!func)
|
||||
debug("Failed loading symbol '%s' from plugin '%s'", symbol, _filename.c_str());
|
||||
|
@ -61,7 +61,7 @@ public:
|
|||
Win32Plugin(const Common::String &filename)
|
||||
: DynamicPlugin(filename), _dlHandle(0) {}
|
||||
|
||||
bool loadPlugin() {
|
||||
virtual bool loadPlugin() override {
|
||||
assert(!_dlHandle);
|
||||
_dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
|||
return DynamicPlugin::loadPlugin();
|
||||
}
|
||||
|
||||
void unloadPlugin() {
|
||||
virtual void unloadPlugin() override {
|
||||
DynamicPlugin::unloadPlugin();
|
||||
if (_dlHandle) {
|
||||
if (!FreeLibrary((HMODULE)_dlHandle))
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
|
||||
#if defined(DYNAMIC_MODULES) && defined(_WIN32)
|
||||
|
||||
class Win32PluginProvider : public FilePluginProvider {
|
||||
class Win32PluginProvider final : public FilePluginProvider {
|
||||
protected:
|
||||
Plugin* createPlugin(const Common::FSNode &node) const;
|
||||
Plugin* createPlugin(const Common::FSNode &node) const override;
|
||||
|
||||
bool isPluginFilename(const Common::FSNode &node) const;
|
||||
bool isPluginFilename(const Common::FSNode &node) const override;
|
||||
};
|
||||
|
||||
#endif // defined(DYNAMIC_MODULES) && defined(_WIN32)
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
/**
|
||||
* Provides a default savefile manager implementation for common platforms.
|
||||
*/
|
||||
class WindowsSaveFileManager : public DefaultSaveFileManager {
|
||||
class WindowsSaveFileManager final : public DefaultSaveFileManager {
|
||||
public:
|
||||
WindowsSaveFileManager();
|
||||
};
|
||||
|
|
|
@ -31,18 +31,18 @@
|
|||
class SdlWindow_Win32;
|
||||
struct ITaskbarList3;
|
||||
|
||||
class Win32TaskbarManager : public Common::TaskbarManager {
|
||||
class Win32TaskbarManager final : public Common::TaskbarManager {
|
||||
public:
|
||||
Win32TaskbarManager(SdlWindow_Win32 *window);
|
||||
virtual ~Win32TaskbarManager();
|
||||
|
||||
virtual void setOverlayIcon(const Common::String &name, const Common::String &description);
|
||||
virtual void setProgressValue(int completed, int total);
|
||||
virtual void setProgressState(TaskbarProgressState state);
|
||||
virtual void setCount(int count);
|
||||
virtual void addRecent(const Common::String &name, const Common::String &description);
|
||||
virtual void notifyError();
|
||||
virtual void clearError();
|
||||
virtual void setOverlayIcon(const Common::String &name, const Common::String &description) override;
|
||||
virtual void setProgressValue(int completed, int total) override;
|
||||
virtual void setProgressState(TaskbarProgressState state) override;
|
||||
virtual void setCount(int count) override;
|
||||
virtual void addRecent(const Common::String &name, const Common::String &description) override;
|
||||
virtual void notifyError() override;
|
||||
virtual void clearError() override;
|
||||
|
||||
private:
|
||||
SdlWindow_Win32 *_window;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "common/list.h"
|
||||
|
||||
|
||||
class WindowsTextToSpeechManager : public Common::TextToSpeechManager {
|
||||
class WindowsTextToSpeechManager final : public Common::TextToSpeechManager {
|
||||
public:
|
||||
enum SpeechState {
|
||||
READY,
|
||||
|
|
|
@ -31,20 +31,20 @@
|
|||
|
||||
class SdlWindow_Win32;
|
||||
|
||||
class Win32UpdateManager : public Common::UpdateManager {
|
||||
class Win32UpdateManager final : public Common::UpdateManager {
|
||||
public:
|
||||
Win32UpdateManager(SdlWindow_Win32 *window);
|
||||
virtual ~Win32UpdateManager();
|
||||
|
||||
virtual void checkForUpdates();
|
||||
virtual void checkForUpdates() override;
|
||||
|
||||
virtual void setAutomaticallyChecksForUpdates(UpdateState state);
|
||||
virtual UpdateState getAutomaticallyChecksForUpdates();
|
||||
virtual void setAutomaticallyChecksForUpdates(UpdateState state) override;
|
||||
virtual UpdateState getAutomaticallyChecksForUpdates() override;
|
||||
|
||||
virtual void setUpdateCheckInterval(int interval);
|
||||
virtual int getUpdateCheckInterval();
|
||||
virtual void setUpdateCheckInterval(int interval) override;
|
||||
virtual int getUpdateCheckInterval() override;
|
||||
|
||||
virtual bool getLastUpdateCheckTimeAndDate(TimeDate &t);
|
||||
virtual bool getLastUpdateCheckTimeAndDate(TimeDate &t) override;
|
||||
|
||||
private:
|
||||
static int canShutdownCallback();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue