suanPan
ResourceHolder< T > Class Template Referencefinal

#include <ResourceHolder.h>

Collaboration diagram for ResourceHolder< T >:

Public Member Functions

 ResourceHolder ()=default
 
 ResourceHolder (std::unique_ptr< T > &&obj)
 
ResourceHolderoperator= (const std::shared_ptr< T > &original_object)
 
ResourceHolderoperator= (std::unique_ptr< T > &&original_object)
 
 ResourceHolder (const ResourceHolder &old_holder)
 
 ResourceHolder (ResourceHolder &&old_holder) noexcept
 
ResourceHolderoperator= (const ResourceHolder &)=delete
 
ResourceHolderoperator= (ResourceHolder &&) noexcept=delete
 
 ~ResourceHolder ()=default
 
Toperator-> () const
 
 operator bool () const
 
bool operator== (const ResourceHolder &other) const
 
bool operator== (const T &other) const
 
bool operator== (std::nullptr_t null) const
 

Detailed Description

template<typename T>
requires requires(T* copyable) { copyable->get_copy(); }
class ResourceHolder< T >
Author
tlc
Date
15/02/2023

Constructor & Destructor Documentation

◆ ResourceHolder() [1/4]

template<typename T >
ResourceHolder< T >::ResourceHolder ( )
default

◆ ResourceHolder() [2/4]

template<typename T >
ResourceHolder< T >::ResourceHolder ( std::unique_ptr< T > &&  obj)
inlineexplicit

◆ ResourceHolder() [3/4]

template<typename T >
ResourceHolder< T >::ResourceHolder ( const ResourceHolder< T > &  old_holder)
inline

◆ ResourceHolder() [4/4]

template<typename T >
ResourceHolder< T >::ResourceHolder ( ResourceHolder< T > &&  old_holder)
inlinenoexcept

◆ ~ResourceHolder()

template<typename T >
ResourceHolder< T >::~ResourceHolder ( )
default

Member Function Documentation

◆ operator bool()

template<typename T >
ResourceHolder< T >::operator bool ( ) const
inlineexplicit

◆ operator->()

template<typename T >
T * ResourceHolder< T >::operator-> ( ) const
inline

◆ operator=() [1/4]

template<typename T >
ResourceHolder & ResourceHolder< T >::operator= ( const ResourceHolder< T > &  )
delete

◆ operator=() [2/4]

template<typename T >
ResourceHolder & ResourceHolder< T >::operator= ( const std::shared_ptr< T > &  original_object)
inline

◆ operator=() [3/4]

template<typename T >
ResourceHolder & ResourceHolder< T >::operator= ( ResourceHolder< T > &&  )
deletenoexcept

◆ operator=() [4/4]

template<typename T >
ResourceHolder & ResourceHolder< T >::operator= ( std::unique_ptr< T > &&  original_object)
inline

◆ operator==() [1/3]

template<typename T >
bool ResourceHolder< T >::operator== ( const ResourceHolder< T > &  other) const
inline

◆ operator==() [2/3]

template<typename T >
bool ResourceHolder< T >::operator== ( const T other) const
inline

◆ operator==() [3/3]

template<typename T >
bool ResourceHolder< T >::operator== ( std::nullptr_t  null) const
inline

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