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

Dummy class for a shared pointer. More...

#include <Resource.hpp>

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

Public Member Functions

constexpr SharedPtr (T *pointer=nullptr)
 
 SharedPtr (const SharedPtr< T > &rhs)
 
 SharedPtr (SharedPtr< T > &&rhs)
 
SharedPtr< T > & operator= (const SharedPtr< T > &rhs)
 
SharedPtr< T > & operator= (SharedPtr< T > &&rhs)
 
 ~SharedPtr ()
 
T & operator* () const
 
T * operator-> () const
 
 operator bool () const
 
T * get () const
 
template<typename T >
constexpr SharedPtr (T *pointer)
 
template<typename T >
 SharedPtr (const Resource::SharedPtr< T > &rhs)
 
template<typename T >
 SharedPtr (Resource::SharedPtr< T > &&rhs)
 
template<typename RhsT >
Resource::SharedPtr< T > cast (const Resource::SharedPtr< RhsT > &rhs)
 

Static Public Member Functions

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

Private Attributes

T * _resource {nullptr}
 

Friends

template<typename RhsT >
class SharedPtr
 

Detailed Description

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

Dummy class for a shared pointer.

Template Parameters
TThe type of the pointer.

Definition at line 66 of file Resource.hpp.

Constructor & Destructor Documentation

◆ SharedPtr() [1/6]

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

◆ SharedPtr() [2/6]

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

◆ SharedPtr() [3/6]

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

◆ ~SharedPtr()

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

Definition at line 50 of file Resource.inl.

◆ SharedPtr() [4/6]

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

Definition at line 4 of file Resource.inl.

◆ SharedPtr() [5/6]

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

Definition at line 11 of file Resource.inl.

◆ SharedPtr() [6/6]

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

Definition at line 18 of file Resource.inl.

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator*()

template<typename T>
T & Resource::SharedPtr::operator* ( ) const

Definition at line 120 of file Resource.inl.

◆ operator->()

template<typename T>
T * Resource::SharedPtr::operator-> ( ) const

Definition at line 125 of file Resource.inl.

◆ operator bool()

template<typename T>
lug::Graphics::Resource::SharedPtr< T >::operator bool ( ) const
inlineexplicit

Definition at line 89 of file Resource.hpp.

◆ get()

template<typename T>
T * Resource::SharedPtr::get ( ) const

Definition at line 59 of file Resource.inl.

◆ cast() [1/2]

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

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

Template Parameters
RhsTThe type of the old SharedPtr

◆ cast() [2/2]

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

Definition at line 65 of file Resource.inl.

Friends And Related Function Documentation

◆ SharedPtr

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

Definition at line 68 of file Resource.hpp.

Member Data Documentation

◆ _resource

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

Definition at line 105 of file Resource.hpp.


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