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