Version: 9.12.0
SmartPtr< T > Class Template Reference

Template class that provides automatic casting for hold RefCount based objects. More...

#include <SUIT_SmartPtr.h>

Public Member Functions

 SmartPtr ()
 default constructor More...
 
template<class Y >
 SmartPtr (Y *y_)
 constructor from any RefCount-based class More...
 
template<class Y >
 SmartPtr (const SmartPtr< Y > &y_)
 copy constructor from any RefCount-based class More...
 
 SmartPtr (const SmartPtr &t_)
 copy constructor More...
 
virtual ~SmartPtr (void)
 destructor More...
 
T & operator* () const
 return *pointer More...
 
T * operator-> () const
 return pointer More...
 
 operator T* () const
 return pointer More...
 
T * get () const
 return pointer More...
 
template<class Y >
SmartPtroperator= (const SmartPtr< Y > &y_)
 assignment More...
 
SmartPtroperator= (const SmartPtr &t_)
 assignment More...
 
SmartPtroperator= (T *p_)
 
int operator== (const SmartPtr &t_)
 comparing More...
 
int operator== (const T *p_)
 comparing More...
 
int operator!= (SmartPtr &t_)
 comparing More...
 
int operator!= (T *p_)
 comparing More...
 
void nullify ()
 nullify More...
 
bool isNull () const
 check for null More...
 

Private Attributes

T * p
 stored pointer More...
 

Friends

int operator== (const T *p_, const SmartPtr &t_)
 comparing More...
 
int operator!= (T *p_, SmartPtr &t_)
 comparing More...
 

Detailed Description

template<class T>
class SmartPtr< T >

Template class that provides automatic casting for hold RefCount based objects.

Constructor & Destructor Documentation

◆ SmartPtr() [1/4]

template<class T >
SmartPtr< T >::SmartPtr ( )
inline

default constructor

◆ SmartPtr() [2/4]

template<class T >
template<class Y >
SmartPtr< T >::SmartPtr ( Y *  y_)
inline

constructor from any RefCount-based class

References SmartPtr< T >::p.

◆ SmartPtr() [3/4]

template<class T >
template<class Y >
SmartPtr< T >::SmartPtr ( const SmartPtr< Y > &  y_)
inline

copy constructor from any RefCount-based class

References SmartPtr< T >::get(), and SmartPtr< T >::p.

◆ SmartPtr() [4/4]

template<class T >
SmartPtr< T >::SmartPtr ( const SmartPtr< T > &  t_)
inline

copy constructor

References SmartPtr< T >::p.

◆ ~SmartPtr()

template<class T >
virtual SmartPtr< T >::~SmartPtr ( void  )
inlinevirtual

destructor

References SmartPtr< T >::p.

Member Function Documentation

◆ get()

template<class T >
T* SmartPtr< T >::get ( ) const
inline

return pointer

References SmartPtr< T >::p.

◆ isNull()

template<class T >
bool SmartPtr< T >::isNull ( ) const
inline

check for null

References SmartPtr< T >::p.

◆ nullify()

template<class T >
void SmartPtr< T >::nullify ( )
inline

nullify

References SmartPtr< T >::p.

◆ operator T*()

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

return pointer

References SmartPtr< T >::p.

◆ operator!=() [1/2]

template<class T >
int SmartPtr< T >::operator!= ( SmartPtr< T > &  t_)
inline

comparing

References SmartPtr< T >::p.

◆ operator!=() [2/2]

template<class T >
int SmartPtr< T >::operator!= ( T *  p_)
inline

comparing

References SmartPtr< T >::p.

◆ operator*()

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

return *pointer

References SmartPtr< T >::p.

◆ operator->()

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

return pointer

References SmartPtr< T >::p.

◆ operator=() [1/3]

template<class T >
SmartPtr& SmartPtr< T >::operator= ( const SmartPtr< T > &  t_)
inline

assignment

assignment

References SmartPtr< T >::get(), and SmartPtr< T >::operator=().

◆ operator=() [2/3]

template<class T >
template<class Y >
SmartPtr& SmartPtr< T >::operator= ( const SmartPtr< Y > &  y_)
inline

assignment

References SmartPtr< T >::get().

◆ operator=() [3/3]

template<class T >
SmartPtr& SmartPtr< T >::operator= ( T *  p_)
inline

References SmartPtr< T >::p.

◆ operator==() [1/2]

template<class T >
int SmartPtr< T >::operator== ( const SmartPtr< T > &  t_)
inline

comparing

References SmartPtr< T >::p.

◆ operator==() [2/2]

template<class T >
int SmartPtr< T >::operator== ( const T *  p_)
inline

comparing

References SmartPtr< T >::p.

Friends And Related Function Documentation

◆ operator!=

template<class T >
int operator!= ( T *  p_,
SmartPtr< T > &  t_ 
)
friend

comparing

◆ operator==

template<class T >
int operator== ( const T *  p_,
const SmartPtr< T > &  t_ 
)
friend

comparing

Member Data Documentation

◆ p

template<class T >
T* SmartPtr< T >::p
private

stored pointer


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