Provides a basic interface between the platform and the game engine. More...
#include <AbstractPlatform.h>
Inherited by WindowsPlatform.
Public Member Functions | |
virtual void | Exit (int code)=0 |
Called in order to force the application to exit. | |
virtual unsigned long | GetSystemTime ()=0 |
Used to retrieve the current system time from the underlying platform. | |
virtual std::wstring | GetPlatformDescription ()=0 |
Get a brief description if this platform. | |
virtual Rect | GetWindowRectangle ()=0 |
Retrieves the rectangle for the game window from the OS. | |
virtual const Settings & | GetSettings () const =0 |
Retrieve the settings for this application. | |
virtual void | PrintError (const std::wstring &message) const =0 |
Prints an error message. |
Provides a basic interface between the platform and the game engine.
The AbstractPlatform class makes it possible for the game engine to be easily switched between different platforms (Windows, UNIX etc) by providing a input interface that allows the game engine to interact with the low-level platform dependent code. This class should be inherited from for every platform that the game is ported to.
virtual void AbstractPlatform::Exit | ( | int | code | ) | [pure virtual] |
Called in order to force the application to exit.
code | The code with which to exit with. |
Implemented in WindowsPlatform.
virtual std::wstring AbstractPlatform::GetPlatformDescription | ( | ) | [pure virtual] |
Get a brief description if this platform.
A string representing the platform, i.e "Win32", "UNIX" etc.
Implemented in WindowsPlatform.
virtual const Settings& AbstractPlatform::GetSettings | ( | ) | const [pure virtual] |
Retrieve the settings for this application.
Implemented in WindowsPlatform.
virtual unsigned long AbstractPlatform::GetSystemTime | ( | ) | [pure virtual] |
Used to retrieve the current system time from the underlying platform.
Implemented in WindowsPlatform.
virtual Rect AbstractPlatform::GetWindowRectangle | ( | ) | [pure virtual] |
Retrieves the rectangle for the game window from the OS.
Implemented in WindowsPlatform.