Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SmartPtr< T > Class Template Reference

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

#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_)
 
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...
 

Constructor & Destructor Documentation

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

Member Function Documentation

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::get().

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

assignment

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

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

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

References SmartPtr< T >::p.

Friends And Related Function Documentation

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

Member Data Documentation

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

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