Kale
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Kale::Vulkan::ChildResource< Parent > Class Template Reference

#include <ChildResource.hpp>

Public Member Functions

virtual void freeResources (bool remove=true)
 

Protected Member Functions

 ChildResource ()
 
 ChildResource (Parent &parent)
 
virtual void init (Parent &parent)
 
 ~ChildResource ()
 

Protected Attributes

Parent * parentPtr = nullptr
 

Friends

class ParentResource< Parent >
 

Detailed Description

template<typename Parent>
class Kale::Vulkan::ChildResource< Parent >

Represents a single child resource, all child resources must inherit from this class

Forward declaration of child resource

Definition at line 33 of file ChildResource.hpp.

Constructor & Destructor Documentation

◆ ChildResource() [1/2]

template<typename Parent >
Kale::Vulkan::ChildResource< Parent >::ChildResource ( )
inlineprotected

Creates an uninitialized resource, if this constructor is used then the setup method MUST be called if the derived object is ever created

Definition at line 40 of file ChildResource.hpp.

◆ ChildResource() [2/2]

template<typename Parent >
Kale::Vulkan::ChildResource< Parent >::ChildResource ( Parent & parent)
inlineprotected

Adds a child resource to the list of child resources to be managed

Parameters
parentThe parent resource managing this resource

Definition at line 48 of file ChildResource.hpp.

◆ ~ChildResource()

template<typename Parent >
Kale::Vulkan::ChildResource< Parent >::~ChildResource ( )
inlineprotected

Removes the child resource from the list of child resources to be managed

Definition at line 65 of file ChildResource.hpp.

Member Function Documentation

◆ freeResources()

template<typename Parent >
virtual void Kale::Vulkan::ChildResource< Parent >::freeResources ( bool remove = true)
inlinevirtual

Frees resources if not already freed

Parameters
removeWhether or not to remove this from the list

Reimplemented in Kale::Vulkan::FrameBuffer, Kale::Vulkan::DeviceMemory, Kale::Vulkan::GraphicsPipeline, Kale::Vulkan::Renderer, Kale::Vulkan::Shader, and Kale::Vulkan::SwapChain.

Definition at line 82 of file ChildResource.hpp.

◆ init()

template<typename Parent >
virtual void Kale::Vulkan::ChildResource< Parent >::init ( Parent & parent)
inlineprotectedvirtual

Adds a child resource to the list of child resources to be managed

Parameters
parentThe parent resource managing this resource

Reimplemented in Kale::Vulkan::SwapChain.

Definition at line 56 of file ChildResource.hpp.

Friends And Related Symbol Documentation

◆ ParentResource< Parent >

template<typename Parent >
friend class ParentResource< Parent >
friend

Definition at line 72 of file ChildResource.hpp.

Member Data Documentation

◆ parentPtr

template<typename Parent >
Parent* Kale::Vulkan::ChildResource< Parent >::parentPtr = nullptr
protected

The pointer to the parent

Definition at line 72 of file ChildResource.hpp.


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