CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Types | Static Private Member Functions | List of all members
CYB::API::UniquePointer< AType > Class Template Reference

UniquePointer that uses our Allocator. More...

#include <UniquePointer.hpp>

Inheritance diagram for CYB::API::UniquePointer< AType >:
Inheritance graph
[legend]
Collaboration diagram for CYB::API::UniquePointer< AType >:
Collaboration graph
[legend]

Public Member Functions

constexpr UniquePointer () noexcept
 Initialize an empty UniquePointer. More...
 
constexpr UniquePointer (const std::nullptr_t AIgnored) noexcept
 Initialize an empty UniquePointer. More...
 
 UniquePointer (AType *const APointer) noexcept
 Initialize a UniquePointer with APointer. More...
 

Private Types

using BaseType = std::unique_ptr< AType, void(*)(AType *const)>
 For readibility and fighting a bug with namespaced template base class constructors.
 

Static Private Member Functions

static BaseType InitBase (AType *const APointer, std::true_type AIsDestructible) noexcept
 Used by this type's constructors. More...
 
static BaseType InitBase (AType *const APointer, std::false_type AIsDestructible) noexcept
 Used by this type's constructors. More...
 
static void Deallocate (AType *const APointer) noexcept
 Deallocates APointer using the Allocator's Heap. More...
 
static void Delete (AType *const APointer) noexcept
 Deletes APointer using the Allocator. More...
 

Detailed Description

template<typename AType>
class CYB::API::UniquePointer< AType >

UniquePointer that uses our Allocator.

Definition at line 7 of file UniquePointer.hpp.

Constructor & Destructor Documentation

template<typename AType>
constexpr CYB::API::UniquePointer< AType >::UniquePointer ( )
noexcept

Initialize an empty UniquePointer.

Thread Safety
This function requires no thread safety
template<typename AType>
constexpr CYB::API::UniquePointer< AType >::UniquePointer ( const std::nullptr_t  AIgnored)
noexcept

Initialize an empty UniquePointer.

Parameters
AIgnoredThis parameter is included for STL compliance
Thread Safety
This function requires no thread safety
template<typename AType>
CYB::API::UniquePointer< AType >::UniquePointer ( AType *const  APointer)
explicitnoexcept

Initialize a UniquePointer with APointer.

Parameters
APointerThe pointer the UniquePointer will contain
Thread Safety
This function requires no thread safety

Member Function Documentation

template<typename AType>
static void CYB::API::UniquePointer< AType >::Deallocate ( AType *const  APointer)
staticprivatenoexcept

Deallocates APointer using the Allocator's Heap.

Parameters
APointerThe pointer to deallocate
Thread Safety
This function requires no thread safety
template<typename AType>
static void CYB::API::UniquePointer< AType >::Delete ( AType *const  APointer)
staticprivatenoexcept

Deletes APointer using the Allocator.

Parameters
APointerThe pointer to delete
Thread Safety
This function requires no thread safety
template<typename AType>
static BaseType CYB::API::UniquePointer< AType >::InitBase ( AType *const  APointer,
std::true_type  AIsDestructible 
)
staticprivatenoexcept

Used by this type's constructors.

Parameters
APointerThe pointer the UniquePointer will contain
AIsDestructibleUsed for overloading. Ignored
Returns
An std::unique_ptr of AType with the properly set Deleter
Thread Safety
This function requires no thread safety
template<typename AType>
static BaseType CYB::API::UniquePointer< AType >::InitBase ( AType *const  APointer,
std::false_type  AIsDestructible 
)
staticprivatenoexcept

Used by this type's constructors.

Parameters
APointerThe pointer the UniquePointer will contain
AIsDestructibleUsed for overloading. Ignored
Returns
An std::unique_ptr of AType with the properly set Deleter
Thread Safety
This function requires no thread safety

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