Public Member Functions | Private Attributes | Friends | List of all members
karto::SmartPointer< T > Class Template Reference

#include <SmartPointer.h>

Public Member Functions

T * Get () const
 
kt_bool IsValid () const
 
 operator T* () const
 
T & operator* () const
 
T * operator-> () const
 
SmartPointeroperator= (const SmartPointer &rOther)
 
template<class Other >
SmartPointeroperator= (const SmartPointer< Other > &rOther)
 
SmartPointeroperator= (T *pPointer)
 
void Release ()
 
 SmartPointer ()
 
 SmartPointer (const SmartPointer &rOther)
 
template<class Other >
 SmartPointer (const SmartPointer< Other > &rOther)
 
 SmartPointer (T *pPointer)
 
virtual ~SmartPointer ()
 

Private Attributes

T * m_pPointer
 

Friends

template<class Other >
class SmartPointer
 

Detailed Description

template<class T>
class karto::SmartPointer< T >

Manages reference-counted shared objects

Definition at line 39 of file SmartPointer.h.

Constructor & Destructor Documentation

◆ SmartPointer() [1/4]

template<class T >
karto::SmartPointer< T >::SmartPointer ( )
inline

Default constructor

Definition at line 45 of file SmartPointer.h.

◆ SmartPointer() [2/4]

template<class T >
karto::SmartPointer< T >::SmartPointer ( const SmartPointer< T > &  rOther)
inline

Copy constructor

Definition at line 53 of file SmartPointer.h.

◆ SmartPointer() [3/4]

template<class T >
template<class Other >
karto::SmartPointer< T >::SmartPointer ( const SmartPointer< Other > &  rOther)
inline

Copy constructor

Definition at line 65 of file SmartPointer.h.

◆ SmartPointer() [4/4]

template<class T >
karto::SmartPointer< T >::SmartPointer ( T *  pPointer)
inline

Assignment operator

Definition at line 77 of file SmartPointer.h.

◆ ~SmartPointer()

template<class T >
virtual karto::SmartPointer< T >::~SmartPointer ( )
inlinevirtual

Destructor

Definition at line 89 of file SmartPointer.h.

Member Function Documentation

◆ Get()

template<class T >
T* karto::SmartPointer< T >::Get ( ) const
inline

Gets the contained pointer

Returns
contained pointer

Definition at line 112 of file SmartPointer.h.

◆ IsValid()

template<class T >
kt_bool karto::SmartPointer< T >::IsValid ( ) const
inline

Whether the contained pointer is valid

Returns
true if the contained pointer is valid

Definition at line 121 of file SmartPointer.h.

◆ operator T*()

template<class T >
karto::SmartPointer< T >::operator T* ( ) const
inline

Gets the contained pointer

Returns
contained pointer

Definition at line 131 of file SmartPointer.h.

◆ operator*()

template<class T >
T& karto::SmartPointer< T >::operator* ( ) const
inline

Gets a reference to the contained pointer

Returns
reference to the contained pointer

Definition at line 140 of file SmartPointer.h.

◆ operator->()

template<class T >
T* karto::SmartPointer< T >::operator-> ( ) const
inline

Gets the contained pointer

Returns
contained pointer

Definition at line 149 of file SmartPointer.h.

◆ operator=() [1/3]

template<class T >
SmartPointer& karto::SmartPointer< T >::operator= ( const SmartPointer< T > &  rOther)
inline

Assignment operator

Definition at line 157 of file SmartPointer.h.

◆ operator=() [2/3]

template<class T >
template<class Other >
SmartPointer& karto::SmartPointer< T >::operator= ( const SmartPointer< Other > &  rOther)
inline

Assignment operator

Definition at line 209 of file SmartPointer.h.

◆ operator=() [3/3]

template<class T >
SmartPointer& karto::SmartPointer< T >::operator= ( T *  pPointer)
inline

Assignment operator

Definition at line 183 of file SmartPointer.h.

◆ Release()

template<class T >
void karto::SmartPointer< T >::Release ( )
inline

Sets pointer to NULL

Definition at line 98 of file SmartPointer.h.

Friends And Related Function Documentation

◆ SmartPointer

template<class T >
template<class Other >
friend class SmartPointer
friend

Definition at line 235 of file SmartPointer.h.

Member Data Documentation

◆ m_pPointer

template<class T >
T* karto::SmartPointer< T >::m_pPointer
private

Definition at line 233 of file SmartPointer.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Wed Mar 2 2022 00:37:23