All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_SharedPtr.h File Reference
#include <memory>
#include <stddef.h>
+ Include dependency graph for UT_SharedPtr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  UT::DefaultClearer< T >
struct  UT::DefaultClearer< UT_SharedPtr< T > >




#define UTmakeShared   std::make_shared
#define UTstatic_pointer_cast   std::static_pointer_cast
#define UTdynamic_pointer_cast   std::dynamic_pointer_cast
#define UTconst_pointer_cast   std::const_pointer_cast
#define UTreinterpret_pointer_cast   std::reinterpret_pointer_cast


template<typename T >
using UT_SharedPtr = std::shared_ptr< T >
 Wrapper around std::shared_ptr. More...


template<typename T >
UT_SharedPtr< T > UTmakeSharedArrayPtr (size_t len)

Macro Definition Documentation

#define UTconst_pointer_cast   std::const_pointer_cast

Definition at line 34 of file UT_SharedPtr.h.

#define UTdynamic_pointer_cast   std::dynamic_pointer_cast

Definition at line 33 of file UT_SharedPtr.h.

#define UTmakeShared   std::make_shared

Definition at line 30 of file UT_SharedPtr.h.

#define UTreinterpret_pointer_cast   std::reinterpret_pointer_cast

Definition at line 35 of file UT_SharedPtr.h.

#define UTstatic_pointer_cast   std::static_pointer_cast

Definition at line 32 of file UT_SharedPtr.h.

Typedef Documentation

template<typename T >
using UT_SharedPtr = std::shared_ptr<T>

Wrapper around std::shared_ptr.

An shared pointer takes ownership of the object referenced. The reference counting is done outside the object interface, so the size of a UT_SharedPtr is larger than a vanilla pointer.

As this is a wrapper around the boost shared pointer template, the type (T) must have a Copy Constructor and a valid Assignment Operator

See Also

Definition at line 28 of file UT_SharedPtr.h.

Function Documentation

template<typename T >
UT_SharedPtr<T> UTmakeSharedArrayPtr ( size_t  len)

Return a UT_SharedPtr<T> that points to an array of T[len] buffer. Only needed until we have proper support in C++20.

Definition at line 41 of file UT_SharedPtr.h.