ug4
ConstSmartPtr< void > Class Reference

#include <smart_pointer.h>

Public Member Functions

template<class T , template< class TPtr > class TFreePolicy>
ConstSmartPtr< T, TFreePolicy > cast_reinterpret () const
 Returns a SmartPtr with the specified type and shared reference counting. More...
 
 ConstSmartPtr ()
 
template<class T , template< class TPtr > class TFreePolicy>
 ConstSmartPtr (const ConstSmartPtr< T, TFreePolicy > &sp)
 
 ConstSmartPtr (const ConstSmartPtr< void > &sp)
 
template<class T , template< class TPtr > class TFreePolicy>
 ConstSmartPtr (const SmartPtr< T, TFreePolicy > &sp)
 
 ConstSmartPtr (const SmartPtr< void > &sp)
 
 ConstSmartPtr (NullSmartPtr)
 
 ConstSmartPtr (void *ptr, void(*freeFunc)(const void *))
 
const void * get () const
 
bool invalid () const
 returns true if the pointer is invalid, false if not. More...
 
void invalidate ()
 
 operator bool () const noexcept
 
template<class T , template< class TPtr > class TFreePolicy>
ConstSmartPtr< void > & operator= (const ConstSmartPtr< T, TFreePolicy > &sp)
 
ConstSmartPtr< void > & operator= (const ConstSmartPtr< void > &sp)
 
template<class T , template< class TPtr > class TFreePolicy>
ConstSmartPtr< void > & operator= (const SmartPtr< T, TFreePolicy > &sp)
 
ConstSmartPtr< void > & operator= (const SmartPtr< void > &sp)
 
ConstSmartPtr< void > & operator= (NullSmartPtr)
 
int refcount () const
 
template<class T , template< class TPtr > class TFreePolicy>
void set_impl (const void *ptr)
 sets the void* to a different location correspoding to a cast to a new type T More...
 
bool valid () const
 returns true if the pointer is valid, false if not. More...
 
 ~ConstSmartPtr ()
 

Private Member Functions

void release ()
 

Private Attributes

void(* m_freeFunc )(const void *)
 
const void * m_ptr
 
int * m_refCountPtr
 

Constructor & Destructor Documentation

◆ ConstSmartPtr() [1/7]

ConstSmartPtr< void >::ConstSmartPtr ( )
inlineexplicit

◆ ConstSmartPtr() [2/7]

ConstSmartPtr< void >::ConstSmartPtr ( void *  ptr,
void(*)(const void *)  freeFunc 
)
inlineexplicit

◆ ConstSmartPtr() [3/7]

ConstSmartPtr< void >::ConstSmartPtr ( NullSmartPtr  )
inline

◆ ConstSmartPtr() [4/7]

ConstSmartPtr< void >::ConstSmartPtr ( const SmartPtr< void > &  sp)
inline

◆ ConstSmartPtr() [5/7]

ConstSmartPtr< void >::ConstSmartPtr ( const ConstSmartPtr< void > &  sp)
inline

◆ ConstSmartPtr() [6/7]

template<class T , template< class TPtr > class TFreePolicy>
ConstSmartPtr< void >::ConstSmartPtr ( const SmartPtr< T, TFreePolicy > &  sp)
inline

◆ ConstSmartPtr() [7/7]

template<class T , template< class TPtr > class TFreePolicy>
ConstSmartPtr< void >::ConstSmartPtr ( const ConstSmartPtr< T, TFreePolicy > &  sp)
inline

◆ ~ConstSmartPtr()

Member Function Documentation

◆ cast_reinterpret()

template<class T , template< class TPtr > class TFreePolicy>
ConstSmartPtr<T, TFreePolicy> ConstSmartPtr< void >::cast_reinterpret ( ) const
inline

Returns a SmartPtr with the specified type and shared reference counting.

USE WITH CARE! ONLY COMPATIBLE TYPES SHOULD BE USED

References ConstSmartPtr< T, FreePolicy >::m_ptr.

◆ get()

◆ invalid()

bool ConstSmartPtr< void >::invalid ( ) const
inline

returns true if the pointer is invalid, false if not.

References ConstSmartPtr< T, FreePolicy >::m_ptr.

◆ invalidate()

◆ operator bool()

ConstSmartPtr< void >::operator bool ( ) const
inlineexplicitnoexcept

◆ operator=() [1/5]

template<class T , template< class TPtr > class TFreePolicy>
ConstSmartPtr<void>& ConstSmartPtr< void >::operator= ( const ConstSmartPtr< T, TFreePolicy > &  sp)
inline

◆ operator=() [2/5]

◆ operator=() [3/5]

template<class T , template< class TPtr > class TFreePolicy>
ConstSmartPtr<void>& ConstSmartPtr< void >::operator= ( const SmartPtr< T, TFreePolicy > &  sp)
inline

◆ operator=() [4/5]

◆ operator=() [5/5]

◆ refcount()

int ConstSmartPtr< void >::refcount ( ) const
inline

◆ release()

void ConstSmartPtr< void >::release ( )
inlineprivate

◆ set_impl()

template<class T , template< class TPtr > class TFreePolicy>
void ConstSmartPtr< void >::set_impl ( const void *  ptr)
inline

sets the void* to a different location correspoding to a cast to a new type T

!!! WARNING: THIS METHOD IS DANDGEROUS: DO NOT USE IT UNLESS YOU REALLY KNOW WHAT YOU ARE DOING !!!

References ConstSmartPtr< T, FreePolicy >::m_ptr.

◆ valid()

bool ConstSmartPtr< void >::valid ( ) const
inline

returns true if the pointer is valid, false if not.

References ConstSmartPtr< T, FreePolicy >::m_ptr.

Member Data Documentation

◆ m_freeFunc

void(* ConstSmartPtr< void >::m_freeFunc) (const void *)
private

Referenced by operator=().

◆ m_ptr

const void* ConstSmartPtr< void >::m_ptr
private

Referenced by operator=().

◆ m_refCountPtr

int* ConstSmartPtr< void >::m_refCountPtr
private

Referenced by operator=().


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