TrinityCore
UniqueTrackablePtr.h File Reference
#include <memory>
+ Include dependency graph for UniqueTrackablePtr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Trinity::unique_trackable_ptr< T >
 Specialized variant of std::shared_ptr that enforces unique ownership and/or std::unique_ptr with std::weak_ptr capabilities Implementation has the same overhead as a std::shared_ptr, that is, a separate allocation for control block that holds use counters. More...
 
class  Trinity::unique_weak_ptr< T >
 Trinity::unique_trackable_ptr companion class, replicating what std::weak_ptr is to std::shared_ptr. More...
 
class  Trinity::unique_strong_ref_ptr< T >
 Result of unique_weak_ptr::lock() function, this class holds a temporary strong reference to held object to prevent it from being deallocated by another thread while it is being actively accessed. This class is non-movable and non-copypable and is intended only for short lived local variables. More...
 

Namespaces

namespace  Trinity
 

Functions

template<typename T1 , typename T2 >
bool Trinity::operator== (unique_trackable_ptr< T1 > const &left, unique_trackable_ptr< T2 > const &right)
 
template<typename T1 , typename T2 >
std::strong_ordering Trinity::operator<=> (unique_trackable_ptr< T1 > const &left, unique_trackable_ptr< T2 > const &right)
 
template<typename T1 >
bool Trinity::operator== (unique_trackable_ptr< T1 > const &left, std::nullptr_t)
 
template<typename T1 >
std::strong_ordering Trinity::operator<=> (unique_trackable_ptr< T1 > const &left, std::nullptr_t)
 
template<typename T , typename... Args>
std::enable_if_t<!std::is_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable (Args &&... args)
 
template<typename T >
std::enable_if_t< std::is_unbounded_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable (std::size_t N)
 
template<typename T >
std::enable_if_t< std::is_unbounded_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable (std::size_t N, std::remove_extent_t< T > const &val)
 
template<typename T >
std::enable_if_t< std::is_bounded_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable ()
 
template<typename T >
std::enable_if_t< std::is_bounded_array_v< T >, unique_trackable_ptr< T > > Trinity::make_unique_trackable (std::remove_extent_t< T > const &val)
 
template<class To , class From >
unique_weak_ptr< To > Trinity::static_pointer_cast (unique_weak_ptr< From > const &other)
 
template<class To , class From >
unique_weak_ptr< To > Trinity::const_pointer_cast (unique_weak_ptr< From > const &other)
 
template<class To , class From >
unique_weak_ptr< To > Trinity::reinterpret_pointer_cast (unique_weak_ptr< From > const &other)
 
template<class To , class From >
unique_weak_ptr< To > Trinity::dynamic_pointer_cast (unique_weak_ptr< From > const &other)
 
template<typename T1 , typename T2 >
bool Trinity::operator== (unique_strong_ref_ptr< T1 > const &left, unique_strong_ref_ptr< T2 > const &right)
 
template<typename T1 , typename T2 >
std::strong_ordering Trinity::operator<=> (unique_strong_ref_ptr< T1 > const &left, unique_strong_ref_ptr< T2 > const &right)
 
template<typename T1 >
bool Trinity::operator== (unique_strong_ref_ptr< T1 > const &left, std::nullptr_t)
 
template<typename T1 >
std::strong_ordering Trinity::operator<=> (unique_strong_ref_ptr< T1 > const &left, std::nullptr_t)
 
template<class To , class From >
unique_strong_ref_ptr< To > Trinity::static_pointer_cast (unique_strong_ref_ptr< From > const &other)
 
template<class To , class From >
unique_strong_ref_ptr< To > Trinity::static_pointer_cast (unique_strong_ref_ptr< From > &&other)
 
template<class To , class From >
unique_strong_ref_ptr< To > Trinity::const_pointer_cast (unique_strong_ref_ptr< From > const &other)
 
template<class To , class From >
unique_strong_ref_ptr< To > Trinity::const_pointer_cast (unique_strong_ref_ptr< From > &&other)
 
template<class To , class From >
unique_strong_ref_ptr< To > Trinity::reinterpret_pointer_cast (unique_strong_ref_ptr< From > const &other)
 
template<class To , class From >
unique_strong_ref_ptr< To > Trinity::reinterpret_pointer_cast (unique_strong_ref_ptr< From > &&other)
 
template<class To , class From >
unique_strong_ref_ptr< To > Trinity::dynamic_pointer_cast (unique_strong_ref_ptr< From > const &other)
 
template<class To , class From >
unique_strong_ref_ptr< To > Trinity::dynamic_pointer_cast (unique_strong_ref_ptr< From > &&other)