CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::WeakResourceHandle< T > Class Template Reference

#include <CeresEngine/Resource/ResourceHandle.hpp>

Public Member Functions

 WeakResourceHandle () noexcept=default
 
 WeakResourceHandle (std::nullptr_t) noexcept
 
WeakResourceHandleoperator= (std::nullptr_t)
 
 WeakResourceHandle (const WeakResourceHandle &other)
 
WeakResourceHandleoperator= (const WeakResourceHandle &other)
 
template<typename U >
requires (std::is_convertible_v<U*, T*>)
 WeakResourceHandle (const WeakResourceHandle< U > &other) noexcept
 
template<typename U >
requires (std::is_convertible_v<U*, T*>)
WeakResourceHandleoperator= (const WeakResourceHandle< U > &other)
 
 WeakResourceHandle (WeakResourceHandle &&other) noexcept
 
WeakResourceHandleoperator= (WeakResourceHandle &&other) noexcept
 
template<typename U >
requires (std::is_convertible_v<U*, T*>)
 WeakResourceHandle (WeakResourceHandle< U > &&other) noexcept
 
template<typename U >
requires (std::is_convertible_v<U*, T*>)
WeakResourceHandleoperator= (WeakResourceHandle< U > &&other)
 
template<typename U >
requires (std::is_convertible_v<U*, T*>)
 WeakResourceHandle (const ResourceHandle< U > &other) noexcept
 
template<typename U >
requires (std::is_convertible_v<U*, T*>)
WeakResourceHandleoperator= (const ResourceHandle< U > &other)
 
 ~WeakResourceHandle () noexcept
 
ResourceHandle< Tlock () const noexcept
 
const UUIDgetUUID () const noexcept
 

Private Member Functions

 WeakResourceHandle (ResourceHandleData *data)
 
void set (ResourceHandleData *data) noexcept
 Changes the internal resource handle data object of the handle.
 

Private Attributes

ResourceHandleDatamData = nullptr
 

Friends

class ResourceManager
 
template<typename U , typename V >
WeakResourceHandle< Ustatic_resource_cast (const WeakResourceHandle< V > &handle)
 
template<typename U , typename V >
WeakResourceHandle< Ustatic_resource_cast (WeakResourceHandle< V > &&handle)
 

Constructor & Destructor Documentation

◆ WeakResourceHandle() [1/8]

template<typename T >
CeresEngine::WeakResourceHandle< T >::WeakResourceHandle ( )
defaultnoexcept

◆ WeakResourceHandle() [2/8]

template<typename T >
CeresEngine::WeakResourceHandle< T >::WeakResourceHandle ( std::nullptr_t  )
inlinenoexcept

◆ WeakResourceHandle() [3/8]

template<typename T >
CeresEngine::WeakResourceHandle< T >::WeakResourceHandle ( const WeakResourceHandle< T > &  other)
inline

◆ WeakResourceHandle() [4/8]

template<typename T >
template<typename U >
requires (std::is_convertible_v<U*, T*>)
CeresEngine::WeakResourceHandle< T >::WeakResourceHandle ( const WeakResourceHandle< U > &  other)
inlinenoexcept

◆ WeakResourceHandle() [5/8]

template<typename T >
CeresEngine::WeakResourceHandle< T >::WeakResourceHandle ( WeakResourceHandle< T > &&  other)
inlinenoexcept

◆ WeakResourceHandle() [6/8]

template<typename T >
template<typename U >
requires (std::is_convertible_v<U*, T*>)
CeresEngine::WeakResourceHandle< T >::WeakResourceHandle ( WeakResourceHandle< U > &&  other)
inlinenoexcept

◆ WeakResourceHandle() [7/8]

template<typename T >
template<typename U >
requires (std::is_convertible_v<U*, T*>)
CeresEngine::WeakResourceHandle< T >::WeakResourceHandle ( const ResourceHandle< U > &  other)
inlinenoexcept

◆ ~WeakResourceHandle()

template<typename T >
CeresEngine::WeakResourceHandle< T >::~WeakResourceHandle ( )
inlinenoexcept

◆ WeakResourceHandle() [8/8]

template<typename T >
CeresEngine::WeakResourceHandle< T >::WeakResourceHandle ( ResourceHandleData data)
inlineexplicitprivate

Member Function Documentation

◆ getUUID()

template<typename T >
const UUID & CeresEngine::WeakResourceHandle< T >::getUUID ( ) const
inlinenoexcept

◆ lock()

template<typename T >
ResourceHandle< T > CeresEngine::WeakResourceHandle< T >::lock ( ) const
inlinenoexcept

◆ operator=() [1/6]

template<typename T >
template<typename U >
requires (std::is_convertible_v<U*, T*>)
WeakResourceHandle & CeresEngine::WeakResourceHandle< T >::operator= ( const ResourceHandle< U > &  other)
inline

◆ operator=() [2/6]

◆ operator=() [3/6]

template<typename T >
template<typename U >
requires (std::is_convertible_v<U*, T*>)
WeakResourceHandle & CeresEngine::WeakResourceHandle< T >::operator= ( const WeakResourceHandle< U > &  other)
inline

◆ operator=() [4/6]

template<typename T >
WeakResourceHandle & CeresEngine::WeakResourceHandle< T >::operator= ( std::nullptr_t  )
inline

◆ operator=() [5/6]

◆ operator=() [6/6]

template<typename T >
template<typename U >
requires (std::is_convertible_v<U*, T*>)
WeakResourceHandle & CeresEngine::WeakResourceHandle< T >::operator= ( WeakResourceHandle< U > &&  other)
inline

◆ set()

template<typename T >
void CeresEngine::WeakResourceHandle< T >::set ( ResourceHandleData data)
inlineprivatenoexcept

Changes the internal resource handle data object of the handle.

This will keep track of the reference counting calls.

Parameters
dataThe new resource handle data to be set. Can be nullptr.

Friends And Related Symbol Documentation

◆ ResourceManager

template<typename T >
friend class ResourceManager
friend

◆ static_resource_cast [1/2]

template<typename T >
template<typename U , typename V >
WeakResourceHandle< U > static_resource_cast ( const WeakResourceHandle< V > &  handle)
friend

◆ static_resource_cast [2/2]

template<typename T >
template<typename U , typename V >
WeakResourceHandle< U > static_resource_cast ( WeakResourceHandle< V > &&  handle)
friend

Member Data Documentation

◆ mData


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