LiteFX 0.3.1.2022
Computer Graphics Engine
LiteFX::Resource< THandle > Class Template Reference

Implements the IResource interface. More...

#include <containers.hpp>

Inherits LiteFX::IResource< THandle >.

Inherited by LiteFX::Rendering::Backends::DirectX12Backend, LiteFX::Rendering::Backends::DirectX12Buffer, LiteFX::Rendering::Backends::DirectX12CommandBuffer, LiteFX::Rendering::Backends::DirectX12Device, LiteFX::Rendering::Backends::DirectX12GraphicsAdapter, LiteFX::Rendering::Backends::DirectX12Image, LiteFX::Rendering::Backends::DirectX12PipelineLayout, LiteFX::Rendering::Backends::DirectX12PipelineState, LiteFX::Rendering::Backends::DirectX12Queue, LiteFX::Rendering::Backends::DirectX12ShaderModule, and LiteFX::Rendering::Backends::DirectX12SwapChain.

Public Member Functions

 Resource (const Resource &)=delete
 
 Resource (Resource &&)=delete
 
virtual ~Resource () noexcept=default
 
const THandle & handle () const noexcept override
 Returns the resource managed by the class. More...
 
- Public Member Functions inherited from LiteFX::IResource< THandle >
virtual ~IResource () noexcept=default
 
virtual const THandle & handle () const noexcept=0
 Returns the resource managed by the class. More...
 

Protected Member Functions

 Resource (const THandle handle) noexcept
 Initializes the managed resource. More...
 
THandle & handle () noexcept override
 Returns the resource managed by the class. More...
 
virtual THandle & handle () noexcept=0
 Returns the resource managed by the class. More...
 

Detailed Description

template<class THandle>
class LiteFX::Resource< THandle >

Implements the IResource interface.

Template Parameters
THandleThe type of the resource.

Constructor & Destructor Documentation

◆ Resource() [1/3]

template<class THandle >
LiteFX::Resource< THandle >::Resource ( const THandle  handle)
inlineexplicitprotectednoexcept

Initializes the managed resource.

Parameters
handleThe managed resource handle.

◆ Resource() [2/3]

template<class THandle >
LiteFX::Resource< THandle >::Resource ( const Resource< THandle > &  )
delete

◆ Resource() [3/3]

template<class THandle >
LiteFX::Resource< THandle >::Resource ( Resource< THandle > &&  )
delete

◆ ~Resource()

template<class THandle >
virtual LiteFX::Resource< THandle >::~Resource ( )
virtualdefaultnoexcept

Member Function Documentation

◆ handle() [1/2]

template<class THandle >
const THandle & LiteFX::Resource< THandle >::handle ( ) const
inlineoverridevirtualnoexcept

Returns the resource managed by the class.

Implements LiteFX::IResource< THandle >.

◆ handle() [2/2]

template<class THandle >
THandle & LiteFX::Resource< THandle >::handle ( )
inlineoverrideprotectedvirtualnoexcept

Returns the resource managed by the class.

Implements LiteFX::IResource< THandle >.