LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::IBackend Class Referenceabstract

The base class for an app backend. More...

#include <app.hpp>

Inherited by LiteFX::Rendering::IRenderBackend.

Public Member Functions

virtual ~IBackend () noexcept=default
 
virtual BackendType type () const noexcept=0
 Gets the type of the backend.
 
const BackendStatestate () const noexcept
 Returns the state of the backend.
 
virtual StringView name () const noexcept=0
 Gets the name of the backend.
 

Protected Member Functions

 IBackend () noexcept=default
 
 IBackend (const IBackend &)=default
 
 IBackend (IBackend &&) noexcept=default
 
IBackendoperator= (const IBackend &)=default
 
IBackendoperator= (IBackend &&) noexcept=default
 
BackendStatestate () noexcept
 Returns the state of the backend.
 
virtual void activate ()=0
 Called by the parent App, if the backend is started.
 
virtual void deactivate ()=0
 Called by the parent App, if the backend is stopped.
 

Friends

class App
 

Detailed Description

The base class for an app backend.

An App can have one or more backends configured per BackendType. However, only one backend of a specific backend type can be active at a time. Backends can be configured with a startup and shutdown callback. Starting a backend will automatically shutdown the active backend of the same type, if any. If the app exits, all backends are shutdown accordingly, allowing to properly cleanup any resources.

See also
App

Constructor & Destructor Documentation

◆ IBackend() [1/3]

LiteFX::IBackend::IBackend ( )
protecteddefaultnoexcept

◆ IBackend() [2/3]

LiteFX::IBackend::IBackend ( const IBackend & )
protecteddefault

◆ IBackend() [3/3]

LiteFX::IBackend::IBackend ( IBackend && )
protecteddefaultnoexcept

◆ ~IBackend()

virtual LiteFX::IBackend::~IBackend ( )
virtualdefaultnoexcept

Member Function Documentation

◆ activate()

virtual void LiteFX::IBackend::activate ( )
protectedpure virtual

Called by the parent App, if the backend is started.

Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.

◆ deactivate()

virtual void LiteFX::IBackend::deactivate ( )
protectedpure virtual

Called by the parent App, if the backend is stopped.

Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.

◆ name()

virtual StringView LiteFX::IBackend::name ( ) const
pure virtualnoexcept

Gets the name of the backend.

Returns
The name of the backend.

Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.

◆ operator=() [1/2]

IBackend & LiteFX::IBackend::operator= ( const IBackend & )
protecteddefault

◆ operator=() [2/2]

IBackend & LiteFX::IBackend::operator= ( IBackend && )
protecteddefaultnoexcept

◆ state() [1/2]

const BackendState & LiteFX::IBackend::state ( ) const
inlinenoexcept

Returns the state of the backend.

Returns
The state of the backend.
See also
BackendState

◆ state() [2/2]

BackendState & LiteFX::IBackend::state ( )
inlineprotectednoexcept

Returns the state of the backend.

Returns
The state of the backend.

◆ type()

virtual BackendType LiteFX::IBackend::type ( ) const
pure virtualnoexcept

Gets the type of the backend.

Returns
The type of the backend.
See also
BackendType

Implemented in LiteFX::Rendering::Backends::DirectX12Backend, and LiteFX::Rendering::Backends::VulkanBackend.

Friends And Related Symbol Documentation

◆ App

friend class App
friend