API Documentation
Loading...
Searching...
No Matches
Pointer< t_type > Class Template Reference

Provides shared ownership of a dynamically allocated object. More...

#include <Pointer.hpp>

Inheritance diagram for Pointer< t_type >:
[legend]
Collaboration diagram for Pointer< t_type >:
[legend]

Public Member Functions

bool isNull () const
 
bool operator!= (const Pointer< t_type > &pointer) const
 
bool operator== (const Pointer< t_type > &pointer) const
 
uint04 referenceCount () const
 
void setToNull ()
 
void swap (Pointer< t_type > &pointer)
 

Protected Member Functions

t_type & get () const
 
Pointeroperator= (const Pointer &pointer)
 
Pointeroperator= (t_type *pointer)
 
 Pointer () noexcept
 
 Pointer (const Pointer< t_type > &value) noexcept
 
 Pointer (t_type &&value) noexcept
 
 Pointer (t_type *value) noexcept
 
constexpr t_type * rawptr () const
 
void set (t_type &&value)
 
 ~Pointer ()
 

Protected Attributes

PointerCorem_core = nullptr
 
t_type * m_object = nullptr
 

Detailed Description

template<class t_type>
class NDEVR::Pointer< t_type >

Provides shared ownership of a dynamically allocated object.


Weaker overall logic (Cannot detect circular references) but faster.

Constructor & Destructor Documentation

◆ Pointer() [1/4]

template<class t_type >
Pointer ( )
inlineprotectednoexcept

◆ Pointer() [2/4]

template<class t_type >
Pointer ( t_type * value)
inlineprotectednoexcept

◆ Pointer() [3/4]

template<class t_type >
Pointer ( t_type && value)
inlineprotectednoexcept

◆ Pointer() [4/4]

template<class t_type >
Pointer ( const Pointer< t_type > & value)
inlineprotectednoexcept

◆ ~Pointer()

template<class t_type >
~Pointer ( )
inlineprotected

Member Function Documentation

◆ get()

template<class t_type >
t_type & get ( ) const
inlineprotected

◆ isNull()

template<class t_type >
bool isNull ( ) const
inline

◆ operator!=()

template<class t_type >
bool operator!= ( const Pointer< t_type > & pointer) const
inline

◆ operator=() [1/2]

template<class t_type >
Pointer & operator= ( const Pointer< t_type > & pointer)
inlineprotected

◆ operator=() [2/2]

template<class t_type >
Pointer & operator= ( t_type * pointer)
inlineprotected

◆ operator==()

template<class t_type >
bool operator== ( const Pointer< t_type > & pointer) const
inline

◆ rawptr()

template<class t_type >
t_type * rawptr ( ) const
inlineconstexprprotected

◆ referenceCount()

template<class t_type >
uint04 referenceCount ( ) const
inlinenodiscard

◆ set()

template<class t_type >
void set ( t_type && value)
inlineprotected

◆ setToNull()

template<class t_type >
void setToNull ( )
inline

◆ swap()

template<class t_type >
void swap ( Pointer< t_type > & pointer)
inline

Member Data Documentation

◆ m_core

template<class t_type >
PointerCore* m_core = nullptr
protected

◆ m_object

template<class t_type >
t_type* m_object = nullptr
protected

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