MeVisLab Toolbox Reference
macos::SmartPtr< T > Class Template Reference

Smart pointer to reference counted object (Helper class) More...

#include <macSmartPtr.h>

Public Member Functions

 SmartPtr ()
 
 SmartPtr (const SmartPtr< T > &p)
 
 SmartPtr (T *o)
 
 ~SmartPtr ()
 
SmartPtr< T > & operator= (const SmartPtr< T > &p)
 
SmartPtr< T > & operator= (T *o)
 
bool operator== (const SmartPtr< T > &p) const
 
bool operator!= (const SmartPtr< T > &p) const
 
bool operator== (T *p) const
 
bool operator!= (T *p) const
 
bool isNull () const
 
Toperator-> () const
 
Toperator* () const
 
 operator T* () const
 

Protected Member Functions

Tobject () const
 
void setObject (T *o)
 

Detailed Description

template<class T>
class macos::SmartPtr< T >

Smart pointer to reference counted object (Helper class)

Definition at line 27 of file macSmartPtr.h.

Constructor & Destructor Documentation

◆ SmartPtr() [1/3]

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

Definition at line 31 of file macSmartPtr.h.

◆ SmartPtr() [2/3]

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

◆ SmartPtr() [3/3]

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

Definition at line 37 of file macSmartPtr.h.

◆ ~SmartPtr()

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

Definition at line 42 of file macSmartPtr.h.

Member Function Documentation

◆ isNull()

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

Definition at line 72 of file macSmartPtr.h.

References macos::SmartPtr< T >::object().

◆ object()

◆ operator T*()

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

Definition at line 78 of file macSmartPtr.h.

References macos::SmartPtr< T >::object().

◆ operator!=() [1/2]

template<class T >
bool macos::SmartPtr< T >::operator!= ( const SmartPtr< T > &  p) const
inline

Definition at line 60 of file macSmartPtr.h.

◆ operator!=() [2/2]

template<class T >
bool macos::SmartPtr< T >::operator!= ( T p) const
inline

Definition at line 68 of file macSmartPtr.h.

References macos::SmartPtr< T >::object().

◆ operator*()

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

Definition at line 76 of file macSmartPtr.h.

References macos::SmartPtr< T >::object().

◆ operator->()

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

Definition at line 74 of file macSmartPtr.h.

References macos::SmartPtr< T >::object().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

template<class T >
SmartPtr<T>& macos::SmartPtr< T >::operator= ( T o)
inline

Definition at line 51 of file macSmartPtr.h.

References macos::SmartPtr< T >::setObject().

◆ operator==() [1/2]

template<class T >
bool macos::SmartPtr< T >::operator== ( const SmartPtr< T > &  p) const
inline

Definition at line 56 of file macSmartPtr.h.

References macos::SmartPtr< T >::object().

◆ operator==() [2/2]

template<class T >
bool macos::SmartPtr< T >::operator== ( T p) const
inline

Definition at line 64 of file macSmartPtr.h.

References macos::SmartPtr< T >::object().

◆ setObject()

template<class T >
void macos::SmartPtr< T >::setObject ( T o)
inlineprotected

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