Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::PlatformContext Class Referencefinal

#include <PlatformContext.h>

+ Inheritance diagram for Divide::PlatformContext:

Public Types

enum class  SystemComponentType : U32 {
  NONE = 0 , Application = 1 << 1 , GFXDevice = 1 << 2 , SFXDevice = 1 << 3 ,
  PXDevice = 1 << 4 , GUI = 1 << 5 , XMLData = 1 << 6 , Configuration = 1 << 7 ,
  LocalClient = 1 << 8 , DebugInterface = 1 << 9 , Editor = 1 << 10 , InputHandler = 1 << 11 ,
  COUNT = 11 , ALL
}
 

Public Member Functions

 PlatformContext (Application &app)
 
 ~PlatformContext ()
 
void idle (bool fast=true, U64 deltaTimeUSGame=0u, U64 deltaTimeUSApp=0u)
 
void init (Kernel &kernel)
 
void terminate ()
 
Applicationapp () noexcept
 
const Applicationapp () const noexcept
 
GFXDevicegfx () noexcept
 
const GFXDevicegfx () const noexcept
 
GUIgui () noexcept
 
const GUIgui () const noexcept
 
SFXDevicesfx () noexcept
 
const SFXDevicesfx () const noexcept
 
PXDevicepfx () noexcept
 
const PXDevicepfx () const noexcept
 
Configurationconfig () noexcept
 
const Configurationconfig () const noexcept
 
LocalClientclient () noexcept
 
const LocalClientclient () const noexcept
 
Serverserver () noexcept
 
const Serverserver () const noexcept
 
DebugInterfacedebug () noexcept
 
const DebugInterfacedebug () const noexcept
 
Editoreditor () noexcept
 
const Editoreditor () const noexcept
 
TaskPooltaskPool (const TaskPoolType type) noexcept
 
const TaskPooltaskPool (const TaskPoolType type) const noexcept
 
Input::InputHandlerinput () noexcept
 
const Input::InputHandlerinput () const noexcept
 
ParamHandlerparamHandler () noexcept
 
const ParamHandlerparamHandler () const noexcept
 
Kernelkernel () noexcept
 
const Kernelkernel () const noexcept
 
DisplayWindowmainWindow () noexcept
 
const DisplayWindowmainWindow () const noexcept
 
DisplayWindowactiveWindow () noexcept
 
const DisplayWindowactiveWindow () const noexcept
 
 PROPERTY_RW (U32, componentMask, 0u)
 

Protected Member Functions

void onThreadCreated (const TaskPoolType type, const std::thread::id &threadID, bool isMainRenderThread) const
 

Private Attributes

Application_app
 Main application instance.
 
Kernel_kernel {nullptr}
 Main app's kernel.
 
std::array< std::unique_ptr< TaskPool >, to_base(TaskPoolType::COUNT)> _taskPool
 Task pools.
 
std::unique_ptr< ParamHandler_paramHandler
 Param handler.
 
std::unique_ptr< Configuration_config
 User configured settings.
 
std::unique_ptr< DebugInterface_debug
 Debugging interface: read only / editable variables.
 
std::unique_ptr< Input::InputHandler_inputHandler
 Input handler.
 
std::unique_ptr< GFXDevice_gfx
 Access to the GPU.
 
std::unique_ptr< GUI_gui
 The graphical user interface.
 
std::unique_ptr< SFXDevice_sfx
 Access to the audio device.
 
std::unique_ptr< PXDevice_pfx
 Access to the physics system.
 
std::unique_ptr< LocalClient_client
 Networking client.
 
std::unique_ptr< Server_server
 Networking server.
 
std::unique_ptr< Editor_editor
 Game editor.
 

Friends

class Attorney::PlatformContextKernel
 

Additional Inherited Members

- Private Member Functions inherited from Divide::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (NonCopyable &&)=default
 
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 
- Private Member Functions inherited from Divide::NonMovable
 NonMovable (NonMovable &&)=delete
 
NonMovableoperator= (NonMovable &&)=delete
 
 NonMovable (const NonMovable &)=default
 
NonMovableoperator= (const NonMovable &)=default
 
 NonMovable ()=default
 
 ~NonMovable ()=default
 

Detailed Description

Definition at line 70 of file PlatformContext.h.

Member Enumeration Documentation

◆ SystemComponentType

Enumerator
NONE 
Application 
GFXDevice 
SFXDevice 
PXDevice 
GUI 
XMLData 
Configuration 
LocalClient 
DebugInterface 
Editor 
InputHandler 
COUNT 
ALL 

Definition at line 75 of file PlatformContext.h.

Constructor & Destructor Documentation

◆ PlatformContext()

Divide::PlatformContext::PlatformContext ( Application app)
explicit

Definition at line 23 of file PlatformContext.cpp.

◆ ~PlatformContext()

Divide::PlatformContext::~PlatformContext ( )

Definition at line 46 of file PlatformContext.cpp.

Member Function Documentation

◆ activeWindow() [1/2]

const DisplayWindow & Divide::PlatformContext::activeWindow ( ) const
noexcept

Definition at line 130 of file PlatformContext.cpp.

◆ activeWindow() [2/2]

DisplayWindow & Divide::PlatformContext::activeWindow ( )
noexcept

Definition at line 125 of file PlatformContext.cpp.

◆ app() [1/2]

const Application & Divide::PlatformContext::app ( ) const
inlinenoexcept

Definition at line 103 of file PlatformContext.h.

◆ app() [2/2]

Application & Divide::PlatformContext::app ( )
inlinenoexcept

Definition at line 102 of file PlatformContext.h.

◆ client() [1/2]

const LocalClient & Divide::PlatformContext::client ( ) const
inlinenoexcept

Definition at line 121 of file PlatformContext.h.

◆ client() [2/2]

LocalClient & Divide::PlatformContext::client ( )
inlinenoexcept

Definition at line 120 of file PlatformContext.h.

◆ config() [1/2]

const Configuration & Divide::PlatformContext::config ( ) const
inlinenoexcept

Definition at line 118 of file PlatformContext.h.

◆ config() [2/2]

Configuration & Divide::PlatformContext::config ( )
inlinenoexcept

Definition at line 117 of file PlatformContext.h.

◆ debug() [1/2]

const DebugInterface & Divide::PlatformContext::debug ( ) const
inlinenoexcept

Definition at line 127 of file PlatformContext.h.

◆ debug() [2/2]

DebugInterface & Divide::PlatformContext::debug ( )
inlinenoexcept

Definition at line 126 of file PlatformContext.h.

◆ editor() [1/2]

const Editor & Divide::PlatformContext::editor ( ) const
inlinenoexcept

Definition at line 130 of file PlatformContext.h.

◆ editor() [2/2]

Editor & Divide::PlatformContext::editor ( )
inlinenoexcept

Definition at line 129 of file PlatformContext.h.

◆ gfx() [1/2]

const GFXDevice & Divide::PlatformContext::gfx ( ) const
inlinenoexcept

Definition at line 106 of file PlatformContext.h.

◆ gfx() [2/2]

GFXDevice & Divide::PlatformContext::gfx ( )
inlinenoexcept

Definition at line 105 of file PlatformContext.h.

◆ gui() [1/2]

const GUI & Divide::PlatformContext::gui ( ) const
inlinenoexcept

Definition at line 109 of file PlatformContext.h.

◆ gui() [2/2]

GUI & Divide::PlatformContext::gui ( )
inlinenoexcept

Definition at line 108 of file PlatformContext.h.

◆ idle()

void Divide::PlatformContext::idle ( bool  fast = true,
U64  deltaTimeUSGame = 0u,
U64  deltaTimeUSApp = 0u 
)

Definition at line 77 of file PlatformContext.cpp.

◆ init()

void Divide::PlatformContext::init ( Kernel kernel)

Definition at line 51 of file PlatformContext.cpp.

◆ input() [1/2]

const Input::InputHandler & Divide::PlatformContext::input ( ) const
inlinenoexcept

Definition at line 136 of file PlatformContext.h.

◆ input() [2/2]

Input::InputHandler & Divide::PlatformContext::input ( )
inlinenoexcept

Definition at line 135 of file PlatformContext.h.

◆ kernel() [1/2]

const Kernel & Divide::PlatformContext::kernel ( ) const
noexcept

Definition at line 141 of file PlatformContext.cpp.

◆ kernel() [2/2]

Kernel & Divide::PlatformContext::kernel ( )
noexcept

Definition at line 135 of file PlatformContext.cpp.

◆ mainWindow() [1/2]

const DisplayWindow & Divide::PlatformContext::mainWindow ( ) const
noexcept

Definition at line 120 of file PlatformContext.cpp.

◆ mainWindow() [2/2]

DisplayWindow & Divide::PlatformContext::mainWindow ( )
noexcept

Definition at line 115 of file PlatformContext.cpp.

◆ onThreadCreated()

void Divide::PlatformContext::onThreadCreated ( const TaskPoolType  type,
const std::thread::id &  threadID,
bool  isMainRenderThread 
) const
protected

Definition at line 147 of file PlatformContext.cpp.

◆ paramHandler() [1/2]

const ParamHandler & Divide::PlatformContext::paramHandler ( ) const
inlinenoexcept

Definition at line 139 of file PlatformContext.h.

◆ paramHandler() [2/2]

ParamHandler & Divide::PlatformContext::paramHandler ( )
inlinenoexcept

Definition at line 138 of file PlatformContext.h.

◆ pfx() [1/2]

const PXDevice & Divide::PlatformContext::pfx ( ) const
inlinenoexcept

Definition at line 115 of file PlatformContext.h.

◆ pfx() [2/2]

PXDevice & Divide::PlatformContext::pfx ( )
inlinenoexcept

Definition at line 114 of file PlatformContext.h.

◆ PROPERTY_RW()

Divide::PlatformContext::PROPERTY_RW ( U32  ,
componentMask  ,
0u   
)

◆ server() [1/2]

const Server & Divide::PlatformContext::server ( ) const
inlinenoexcept

Definition at line 124 of file PlatformContext.h.

◆ server() [2/2]

Server & Divide::PlatformContext::server ( )
inlinenoexcept

Definition at line 123 of file PlatformContext.h.

◆ sfx() [1/2]

const SFXDevice & Divide::PlatformContext::sfx ( ) const
inlinenoexcept

Definition at line 112 of file PlatformContext.h.

◆ sfx() [2/2]

SFXDevice & Divide::PlatformContext::sfx ( )
inlinenoexcept

Definition at line 111 of file PlatformContext.h.

◆ taskPool() [1/2]

const TaskPool & Divide::PlatformContext::taskPool ( const TaskPoolType  type) const
inlinenoexcept

Definition at line 133 of file PlatformContext.h.

◆ taskPool() [2/2]

TaskPool & Divide::PlatformContext::taskPool ( const TaskPoolType  type)
inlinenoexcept

Definition at line 132 of file PlatformContext.h.

◆ terminate()

void Divide::PlatformContext::terminate ( )

Definition at line 66 of file PlatformContext.cpp.

Friends And Related Function Documentation

◆ Attorney::PlatformContextKernel

friend class Attorney::PlatformContextKernel
friend

Definition at line 72 of file PlatformContext.h.

Member Data Documentation

◆ _app

Application& Divide::PlatformContext::_app
private

Main application instance.

Definition at line 157 of file PlatformContext.h.

◆ _client

std::unique_ptr<LocalClient> Divide::PlatformContext::_client
private

Networking client.

Definition at line 180 of file PlatformContext.h.

◆ _config

std::unique_ptr<Configuration> Divide::PlatformContext::_config
private

User configured settings.

Definition at line 166 of file PlatformContext.h.

◆ _debug

std::unique_ptr<DebugInterface> Divide::PlatformContext::_debug
private

Debugging interface: read only / editable variables.

Definition at line 168 of file PlatformContext.h.

◆ _editor

std::unique_ptr<Editor> Divide::PlatformContext::_editor
private

Game editor.

Definition at line 184 of file PlatformContext.h.

◆ _gfx

std::unique_ptr<GFXDevice> Divide::PlatformContext::_gfx
private

Access to the GPU.

Definition at line 172 of file PlatformContext.h.

◆ _gui

std::unique_ptr<GUI> Divide::PlatformContext::_gui
private

The graphical user interface.

Definition at line 174 of file PlatformContext.h.

◆ _inputHandler

std::unique_ptr<Input::InputHandler> Divide::PlatformContext::_inputHandler
private

Input handler.

Definition at line 170 of file PlatformContext.h.

◆ _kernel

Kernel* Divide::PlatformContext::_kernel {nullptr}
private

Main app's kernel.

Definition at line 159 of file PlatformContext.h.

◆ _paramHandler

std::unique_ptr<ParamHandler> Divide::PlatformContext::_paramHandler
private

Param handler.

Definition at line 164 of file PlatformContext.h.

◆ _pfx

std::unique_ptr<PXDevice> Divide::PlatformContext::_pfx
private

Access to the physics system.

Definition at line 178 of file PlatformContext.h.

◆ _server

std::unique_ptr<Server> Divide::PlatformContext::_server
private

Networking server.

Definition at line 182 of file PlatformContext.h.

◆ _sfx

std::unique_ptr<SFXDevice> Divide::PlatformContext::_sfx
private

Access to the audio device.

Definition at line 176 of file PlatformContext.h.

◆ _taskPool

std::array<std::unique_ptr<TaskPool>, to_base(TaskPoolType::COUNT)> Divide::PlatformContext::_taskPool
private

Task pools.

Definition at line 162 of file PlatformContext.h.


The documentation for this class was generated from the following files: