AbstractPlatform Class Reference

Provides a basic interface between the platform and the game engine. More...

#include <AbstractPlatform.h>

Inherited by WindowsPlatform.

List of all members.

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 SettingsGetSettings () const =0
 Retrieve the settings for this application.
virtual void PrintError (const std::wstring &message) const =0
 Prints an error message.

Detailed Description

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.


Member Function Documentation

virtual void AbstractPlatform::Exit ( int  code  )  [pure virtual]

Called in order to force the application to exit.

Parameters:
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.

See also:
Settings
Returns:
A const reference to a settings structure.

Implemented in WindowsPlatform.

virtual unsigned long AbstractPlatform::GetSystemTime (  )  [pure virtual]

Used to retrieve the current system time from the underlying platform.

Returns:
The current system time in milliseconds.

Implemented in WindowsPlatform.

virtual Rect AbstractPlatform::GetWindowRectangle (  )  [pure virtual]

Retrieves the rectangle for the game window from the OS.

Returns:
A rectangle representing the on screen position and width and height of the window.

Implemented in WindowsPlatform.


The documentation for this class was generated from the following file:
 All Classes Functions Variables

Generated on Fri Nov 20 15:29:20 2009 for PhysTank by  doxygen 1.6.1