Lugdunum  0.1.0
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
lug::Graphics::Resource::WeakPtr< T > Class Template Reference

Dummy class for a weak ptr. More...

#include <Resource.hpp>

Collaboration diagram for lug::Graphics::Resource::WeakPtr< T >:
[legend]

Public Member Functions

constexpr WeakPtr (T *pointer=nullptr)
 
constexpr WeakPtr (const SharedPtr< T > &rhs)
 
 WeakPtr (const WeakPtr< T > &rhs)
 
 WeakPtr (WeakPtr< T > &&rhs)
 
WeakPtr< T > & operator= (const WeakPtr< T > &rhs)
 
WeakPtr< T > & operator= (WeakPtr< T > &&rhs)
 
 ~WeakPtr ()
 
SharedPtr< T > lock () const
 Transforms a WeakPtr to a SharedPtr. More...
 
template<typename T >
constexpr WeakPtr (T *pointer)
 
template<typename T >
constexpr WeakPtr (const SharedPtr< T > &rhs)
 
template<typename T >
 WeakPtr (const Resource::WeakPtr< T > &rhs)
 
template<typename T >
 WeakPtr (Resource::WeakPtr< T > &&rhs)
 
template<typename RhsT >
Resource::WeakPtr< T > cast (const Resource::WeakPtr< RhsT > &rhs)
 

Static Public Member Functions

template<typename RhsT >
static WeakPtr< T > cast (const WeakPtr< RhsT > &rhs)
 Dynamic casting of a WeakPtr to another one (RhsT to T) More...
 

Private Attributes

T * _resource {nullptr}
 

Friends

template<typename RhsT >
class WeakPtr
 

Detailed Description

template<typename T>
class lug::Graphics::Resource::WeakPtr< T >

Dummy class for a weak ptr.

Template Parameters
TThe type of the pointer

Definition at line 114 of file Resource.hpp.

Constructor & Destructor Documentation

◆ WeakPtr() [1/8]

template<typename T>
constexpr lug::Graphics::Resource::WeakPtr< T >::WeakPtr ( T *  pointer = nullptr)

◆ WeakPtr() [2/8]

template<typename T>
constexpr lug::Graphics::Resource::WeakPtr< T >::WeakPtr ( const SharedPtr< T > &  rhs)

◆ WeakPtr() [3/8]

template<typename T>
lug::Graphics::Resource::WeakPtr< T >::WeakPtr ( const WeakPtr< T > &  rhs)

◆ WeakPtr() [4/8]

template<typename T>
lug::Graphics::Resource::WeakPtr< T >::WeakPtr ( WeakPtr< T > &&  rhs)

◆ ~WeakPtr()

template<typename T>
Resource::WeakPtr::~WeakPtr ( )

Definition at line 101 of file Resource.inl.

◆ WeakPtr() [5/8]

template<typename T>
template<typename T >
constexpr lug::Graphics::Resource::WeakPtr< T >::WeakPtr ( T *  pointer)

Definition at line 72 of file Resource.inl.

◆ WeakPtr() [6/8]

template<typename T>
template<typename T >
constexpr lug::Graphics::Resource::WeakPtr< T >::WeakPtr ( const SharedPtr< T > &  rhs)

Definition at line 75 of file Resource.inl.

◆ WeakPtr() [7/8]

template<typename T>
template<typename T >
lug::Graphics::Resource::WeakPtr< T >::WeakPtr ( const Resource::WeakPtr< T > &  rhs)

Definition at line 78 of file Resource.inl.

◆ WeakPtr() [8/8]

template<typename T>
template<typename T >
lug::Graphics::Resource::WeakPtr< T >::WeakPtr ( Resource::WeakPtr< T > &&  rhs)

Definition at line 81 of file Resource.inl.

Member Function Documentation

◆ operator=() [1/2]

template<typename T>
WeakPtr<T>& lug::Graphics::Resource::WeakPtr< T >::operator= ( const WeakPtr< T > &  rhs)

◆ operator=() [2/2]

template<typename T>
WeakPtr<T>& lug::Graphics::Resource::WeakPtr< T >::operator= ( WeakPtr< T > &&  rhs)

◆ lock()

template<typename T>
Resource::SharedPtr< T > Resource::WeakPtr::lock ( ) const

Transforms a WeakPtr to a SharedPtr.

Definition at line 106 of file Resource.inl.

◆ cast() [1/2]

template<typename T>
template<typename RhsT >
static WeakPtr<T> lug::Graphics::Resource::WeakPtr< T >::cast ( const WeakPtr< RhsT > &  rhs)
static

Dynamic casting of a WeakPtr to another one (RhsT to T)

Template Parameters
RhsTThe type of the old WeakPtr

◆ cast() [2/2]

template<typename T>
template<typename RhsT >
Resource::WeakPtr<T> lug::Graphics::Resource::WeakPtr< T >::cast ( const Resource::WeakPtr< RhsT > &  rhs)

Definition at line 113 of file Resource.inl.

Friends And Related Function Documentation

◆ WeakPtr

template<typename T>
template<typename RhsT >
friend class WeakPtr
friend

Definition at line 116 of file Resource.hpp.

Member Data Documentation

◆ _resource

template<typename T>
T* lug::Graphics::Resource::WeakPtr< T >::_resource {nullptr}
private

Definition at line 150 of file Resource.hpp.


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