Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Attributes | Friends | List of all members
blowbox::Get Class Reference

#include <get.h>

Static Public Member Functions

static BlowboxCoreBlowboxCore ()
 
static SharedPtr< GLFWManagerGLFWManager ()
 
static SharedPtr< WindowMainWindow ()
 
static SharedPtr< ForwardRendererForwardRenderer ()
 
static SharedPtr< DeferredRendererDeferredRenderer ()
 
static SharedPtr< CommandContextManagerCommandContextManager ()
 
static SharedPtr< CommandManagerCommandManager ()
 
static SharedPtr< DeviceDevice ()
 
static SharedPtr< DescriptorHeapRtvHeap ()
 
static SharedPtr< DescriptorHeapDsvHeap ()
 
static SharedPtr< DescriptorHeapCbvSrvUavHeap ()
 
static SharedPtr< SwapChainSwapChain ()
 
static SharedPtr< ImGuiManagerImGuiManager ()
 
static SharedPtr< SceneManagerSceneManager ()
 
static SharedPtr< DebugMenuDebugMenu ()
 
static SharedPtr< ConsoleConsole ()
 
static SharedPtr< TimeTime ()
 
static SharedPtr< PerformanceProfilerPerformanceProfiler ()
 
static SharedPtr< MemoryProfilerMemoryProfiler ()
 
static SharedPtr< FrameStatsFrameStats ()
 
static SharedPtr< MemoryStatsMemoryStats ()
 

Protected Member Functions

 Get ()
 
 ~Get ()
 
void Finalize ()
 
void Set (blowbox::BlowboxCore *blowbox_core)
 
void Set (SharedPtr< blowbox::GLFWManager > glfw_manager)
 
void Set (SharedPtr< blowbox::Window > main_window)
 
void Set (SharedPtr< blowbox::ForwardRenderer > forward_renderer)
 
void Set (SharedPtr< blowbox::DeferredRenderer > deferred_renderer)
 
void Set (SharedPtr< blowbox::CommandContextManager > command_context_manager)
 
void Set (SharedPtr< blowbox::CommandManager > command_manager)
 
void Set (SharedPtr< blowbox::Device > device)
 
void SetRtvHeap (SharedPtr< blowbox::DescriptorHeap > heap)
 
void SetDsvHeap (SharedPtr< blowbox::DescriptorHeap > heap)
 
void SetCbvSrvUavHeap (SharedPtr< blowbox::DescriptorHeap > heap)
 
void Set (SharedPtr< blowbox::SwapChain > swap_chain)
 
void Set (SharedPtr< blowbox::ImGuiManager > imgui_manager)
 
void Set (SharedPtr< blowbox::SceneManager > scene_manager)
 
void Set (SharedPtr< blowbox::DebugMenu > debug_menu)
 
void Set (SharedPtr< blowbox::Console > console)
 
void Set (SharedPtr< blowbox::Time > time)
 
void Set (SharedPtr< blowbox::PerformanceProfiler > instance)
 
void Set (SharedPtr< blowbox::MemoryProfiler > instance)
 
void Set (SharedPtr< blowbox::FrameStats > instance)
 
void Set (SharedPtr< blowbox::MemoryStats > instance)
 

Static Protected Attributes

static Getinstance_ = nullptr
 

Private Attributes

bool finalized_
 
blowbox::BlowboxCoreblowbox_core_
 
WeakPtr< blowbox::GLFWManagerglfw_manager_
 
WeakPtr< blowbox::Windowmain_window_
 
WeakPtr< blowbox::ForwardRendererforward_renderer_
 
WeakPtr< blowbox::DeferredRendererdeferred_renderer_
 
WeakPtr< blowbox::CommandContextManagercommand_context_manager_
 
WeakPtr< blowbox::CommandManagercommand_manager_
 
WeakPtr< blowbox::Devicedevice_
 
WeakPtr< blowbox::DescriptorHeaprtv_descriptor_heap_
 
WeakPtr< blowbox::DescriptorHeapdsv_descriptor_heap_
 
WeakPtr< blowbox::DescriptorHeapcbv_srv_uav_descriptor_heap_
 
WeakPtr< blowbox::SwapChainswap_chain_
 
WeakPtr< blowbox::ImGuiManagerimgui_manager_
 
WeakPtr< blowbox::SceneManagerscene_manager_
 
WeakPtr< blowbox::DebugMenudebug_menu_
 
WeakPtr< blowbox::Consoleconsole_
 
WeakPtr< blowbox::Timetime_
 
WeakPtr< blowbox::PerformanceProfilerperformance_profiler_
 
WeakPtr< blowbox::MemoryProfilermemory_profiler_
 
WeakPtr< blowbox::FrameStatsframe_stats_
 
WeakPtr< blowbox::MemoryStatsmemory_stats_
 

Friends

class BlowboxCore
 

Detailed Description

Provides clean access to all subsystems.

The Get class is essentially a set of getters. It allows you to access all the subsystems in the entire engine via a very simple interface that just works. The Get class itself stores only WeakPtr's of the subsystems, so it doesn't own any subsystems - it only caches them. Upon request of a subsystem, the WeakPtr is converted into a SharedPtr that is provided to you.

Remarks
Do NOT store the SharedPtr's that are returned by the getters - instead, convert them first to a WeakPtr. But preferably, just don't store them. Issues might arise with subsystem shutdown if you store the subsystems yourself. Be warned.

Constructor & Destructor Documentation

blowbox::Get::Get ( )
protected

Constructs the Get class.

Remarks
Only accessible to BlowboxCore.
blowbox::Get::~Get ( )
protected

Destructs the Get class.

Remarks
Only accessible to BlowboxCore.

Member Function Documentation

static BlowboxCore* blowbox::Get::BlowboxCore ( )
static
Returns
The BlowboxCore instance
SharedPtr< DescriptorHeap > blowbox::Get::CbvSrvUavHeap ( )
static
Returns
The DescriptorHeap instance for cbv/srv/uavs.
SharedPtr< CommandContextManager > blowbox::Get::CommandContextManager ( )
static
Returns
The CommandContextManager instance.
SharedPtr< CommandManager > blowbox::Get::CommandManager ( )
static
Returns
The CommandManager instance.
SharedPtr< Console > blowbox::Get::Console ( )
static
Returns
The Console instance.
SharedPtr< DebugMenu > blowbox::Get::DebugMenu ( )
static
Returns
The DebugMenu instance.
SharedPtr< DeferredRenderer > blowbox::Get::DeferredRenderer ( )
static
Returns
The DeferredRenderer instance.
SharedPtr< Device > blowbox::Get::Device ( )
static
Returns
The Device instance.
SharedPtr< DescriptorHeap > blowbox::Get::DsvHeap ( )
static
Returns
The DescriptorHeap instance for depth stencil views.
void blowbox::Get::Finalize ( )
protected

Checks if all systems are set. If any are missing, it will assert.

SharedPtr< ForwardRenderer > blowbox::Get::ForwardRenderer ( )
static
Returns
The ForwardRenderer instance.
SharedPtr< FrameStats > blowbox::Get::FrameStats ( )
static
Returns
The FrameStats instance.
SharedPtr< GLFWManager > blowbox::Get::GLFWManager ( )
static
Returns
The GLFWManager instance.
SharedPtr< ImGuiManager > blowbox::Get::ImGuiManager ( )
static
Returns
The ImGuiManager instance.
SharedPtr< Window > blowbox::Get::MainWindow ( )
static
Returns
The main Window instance.
SharedPtr< MemoryProfiler > blowbox::Get::MemoryProfiler ( )
static
Returns
The MemoryProfiler instance.
SharedPtr< MemoryStats > blowbox::Get::MemoryStats ( )
static
Returns
The MemoryStats instance.
SharedPtr< PerformanceProfiler > blowbox::Get::PerformanceProfiler ( )
static
Returns
The PerformanceProfiler instance.
SharedPtr< DescriptorHeap > blowbox::Get::RtvHeap ( )
static
Returns
The DescriptorHeap instance for render target views.
SharedPtr< SceneManager > blowbox::Get::SceneManager ( )
static
Returns
The SceneManager instance.
void blowbox::Get::Set ( blowbox::BlowboxCore blowbox_core)
protected

Sets the BlowboxCore instance.

Parameters
[in]blowbox_coreThe instance of BlowboxCore.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::GLFWManager glfw_manager)
protected

Sets the GLFWManager instance.

Parameters
[in]glfw_managerThe instance of GLFWManager.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::Window main_window)
protected

Sets the main Window instance.

Parameters
[in]main_windowThe instance of Window.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::ForwardRenderer forward_renderer)
protected

Sets the ForwardRenderer instance.

Parameters
[in]forward_rendererThe instance of ForwardRenderer.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::DeferredRenderer deferred_renderer)
protected

Sets the DeferredRenderer instance.

Parameters
[in]deferred_rendererThe instance of DeferredRenderer.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::CommandContextManager command_context_manager)
protected

Sets the CommandContextManager instance.

Parameters
[in]command_context_managerThe instance of CommandContextManager.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::CommandManager command_manager)
protected

Sets the CommandManager instance.

Parameters
[in]command_managerThe instance of CommandManager.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::Device device)
protected

Sets the Device instance.

Parameters
[in]deviceThe instance of Device.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::SwapChain swap_chain)
protected

Sets the SwapChain instance.

Parameters
[in]swap_chainThe instance of the SwapChain.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::ImGuiManager imgui_manager)
protected

Sets the ImGuiManager instance.

Parameters
[in]imgui_managerThe instance of the ImGuiManager.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::SceneManager scene_manager)
protected

Sets the SceneManager instance.

Parameters
[in]scene_managerThe instance of the SceneManager.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::DebugMenu debug_menu)
protected

Sets the DebugMenu instance.

Parameters
[in]debug_menuThe instance of the DebugMenu.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::Console console)
protected

Sets the Console instance.

Parameters
[in]consoleThe instance of the Console.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::Time time)
protected

Sets the Time instance.

Parameters
[in]timeThe instance of the Time.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::PerformanceProfiler instance)
protected

Sets the PerformanceProfiler instance.

Parameters
[in]instanceThe instance of the PerformanceProfiler.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::MemoryProfiler instance)
protected

Sets the MemoryProfiler instance.

Parameters
[in]instanceThe instance of the MemoryProfiler.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::FrameStats instance)
protected

Sets the FrameStats instance.

Parameters
[in]instanceThe instance of the FrameStats.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::Set ( SharedPtr< blowbox::MemoryStats instance)
protected

Sets the MemoryStats instance.

Parameters
[in]instanceThe instance of the MemoryStats.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::SetCbvSrvUavHeap ( SharedPtr< blowbox::DescriptorHeap heap)
protected

Sets the DescriptorHeap instance for cbv/srv/uavs.

Parameters
[in]heapThe instance of DescriptorHeap for cbv/srv/uavs.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::SetDsvHeap ( SharedPtr< blowbox::DescriptorHeap heap)
protected

Sets the DescriptorHeap instance for depth stencil views.

Parameters
[in]heapThe instance of DescriptorHeap for depth stencil views.
Remarks
Only accessible to BlowboxCore.
void blowbox::Get::SetRtvHeap ( SharedPtr< blowbox::DescriptorHeap heap)
protected

Sets the DescriptorHeap instance for render target views.

Parameters
[in]heapThe instance of DescriptorHeap for render target views.
Remarks
Only accessible to BlowboxCore.
SharedPtr< SwapChain > blowbox::Get::SwapChain ( )
static
Returns
The SwapChain instance.
SharedPtr< Time > blowbox::Get::Time ( )
static
Returns
The Time instance.

Member Data Documentation

blowbox::BlowboxCore* blowbox::Get::blowbox_core_
private

The BlowboxCore instance.

WeakPtr<blowbox::DescriptorHeap> blowbox::Get::cbv_srv_uav_descriptor_heap_
private

DescriptorHeap for cbv/srv/uavs.

WeakPtr<blowbox::CommandContextManager> blowbox::Get::command_context_manager_
private

The CommandContextManager instance.

WeakPtr<blowbox::CommandManager> blowbox::Get::command_manager_
private

The CommandManager instance.

WeakPtr<blowbox::Console> blowbox::Get::console_
private

The Console instance.

WeakPtr<blowbox::DebugMenu> blowbox::Get::debug_menu_
private

The DebugMenu instance.

WeakPtr<blowbox::DeferredRenderer> blowbox::Get::deferred_renderer_
private

The DeferredRenderer that is used to render stuff to the main Window.

WeakPtr<blowbox::Device> blowbox::Get::device_
private

The render Device instance.

WeakPtr<blowbox::DescriptorHeap> blowbox::Get::dsv_descriptor_heap_
private

DescriptorHeap for dsvs.

bool blowbox::Get::finalized_
private

Whether the Get system has been finalized.

WeakPtr<blowbox::ForwardRenderer> blowbox::Get::forward_renderer_
private

The ForwardRenderer that is used to render stuff to the main Window.

WeakPtr<blowbox::FrameStats> blowbox::Get::frame_stats_
private

The FrameStats instance.

WeakPtr<blowbox::GLFWManager> blowbox::Get::glfw_manager_
private

The GLFWManager instance.

WeakPtr<blowbox::ImGuiManager> blowbox::Get::imgui_manager_
private

The ImGuiManager instance.

Get * blowbox::Get::instance_ = nullptr
staticprotected

The instance of the Get class.

WeakPtr<blowbox::Window> blowbox::Get::main_window_
private

The main Window instance.

WeakPtr<blowbox::MemoryProfiler> blowbox::Get::memory_profiler_
private

The MemoryProfiler instance.

WeakPtr<blowbox::MemoryStats> blowbox::Get::memory_stats_
private

The MemoryStats instance.

WeakPtr<blowbox::PerformanceProfiler> blowbox::Get::performance_profiler_
private

The PerformanceProfiler instance.

WeakPtr<blowbox::DescriptorHeap> blowbox::Get::rtv_descriptor_heap_
private

DescriptorHeap for rtvs.

WeakPtr<blowbox::SceneManager> blowbox::Get::scene_manager_
private

The SceneManager instance.

WeakPtr<blowbox::SwapChain> blowbox::Get::swap_chain_
private

The SwapChain instance.

WeakPtr<blowbox::Time> blowbox::Get::time_
private

The Time instance.


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