Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F123514
Platform.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
Platform.h
View Options
#ifndef _ECHOPLATFORM_H_
#define _ECHOPLATFORM_H_
#include
<string>
#include
<echo/Kernel/ExecutionModel.h>
namespace
Echo
{
class
RenderTarget
;
class
FileSystem
;
class
Kernel
;
class
Audio
;
class
InputManager
;
class
FunctionBinder
;
class
Shell
;
namespace
Platform
{
/**
* Get the platform name.
* See each platform specific implementation or documentation for what value to expect.
* Here are some examples though:
* - Linux
* - Windows
* - Wii
* @return The platform name.
*/
std
::
string
GetName
();
//!\brief Creates an execution model object for the target platform.
//!\details An execution model object is used by Kernel objects to allow them to to update. The execution
//! environment may differ on platform to platform and these objects provide the Kernel with the
//! mechanism to work with the system, sometimes in multiple ways.
//! The execution model returned by this method is different depending on the platform.
//!\return The platform's execution model.
shared_ptr
<
ExecutionModel
>
CreateExecutionModel
();
//!\brief Creates a render target.
//!\details This factory method will create a render target of the specified type. If the type is not specified
//! then the default render target for the platform will be created. Common types are:
//! (empty string) - Default
//! Texture - Texture render target
//! Window - Window render target
//!\param type The render target type to create.
//!\retrun A shared pointer to the requested render target. May be a null pointer if the type is not available.
shared_ptr
<
RenderTarget
>
CreateRenderTarget
(
const
std
::
string
&
type
,
const
std
::
string
&
name
,
Kernel
&
kernel
,
u32
width
,
u32
height
,
u8
bpp
,
bool
fullScreen
);
//!\brief Creates a file system object configured with default data paths.
//!\details This method will create a FileSystem object will the default data paths for Echo standard access.
//! Default data paths include:
//! - A default data source for data access.
//! - "persistent://" for saving data
//!\param applicationName The name of the application. This may be used by the platform to create persistent data storage.
shared_ptr
<
FileSystem
>
CreateDefaultFileSystem
(
const
std
::
string
&
applicationName
);
shared_ptr
<
Audio
>
CreateDefaultAudioSystem
();
/**
* Create a default input manager.
* The default input manager will set up input devices for the platform.
* Be sure to check that the input requested is valid before attempting to use it.
* @note Some platforms require window or similar object in order to set up a mouse-like device.
* @param target A render target used as the coordinate space for pointing devices.
*/
shared_ptr
<
InputManager
>
CreateDefaultInputManager
(
shared_ptr
<
RenderTarget
>
target
);
/**
* Create a shell object.
* @return a shell object for the platform, otherwise a null pointer if a shell isn't available.
*/
shared_ptr
<
Shell
>
CreateShell
();
/**
* Register available render target creation functions.
* Prototype: shared_ptr<RenderTarget> Type(std::string name, u32 width, u32 height, u8 bpp, bool fullScreen)
* A kernel is passed because some render targets are responsible for pause and resume events, in such cases register
* the function and pass the kernel directly to the bind method.
* @param functionBinder the function binder to register functions with.
* @param kernel the kernel to be paused/resumed if the render target is responsible for such events.
*/
void
RegisterRenderTargets
(
FunctionBinder
&
functionBinder
,
Kernel
&
kernel
);
/**
* Register available audio systems creation functions.
* Prototype: shared_ptr<Audio> Type()
* @param functionBinder the function binder to register functions with.
*/
void
RegisterAudioSystems
(
FunctionBinder
&
functionBinder
);
}
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Thu, Jan 16, 2:10 AM (14 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
72129
Default Alt Text
Platform.h (3 KB)
Attached To
Mode
rEE Echo 3
Attached
Detach File
Event Timeline
Log In to Comment