C3D Toolkit  Kernel - 110464, Vision - 2.5.0.35

Smart pointer to objects with reference counter. More...

#include <templ_sptr.h>

+ Inheritance diagram for SPtr< T >:

Public Member Functions

 SPtr ()
 Constructor.
 
 SPtr (T *elem)
 Constructor by pointer.
 
 SPtr (const SPtr< T > &ptr)
 Copy constructor.
 
template<class _T >
 SPtr (const SPtr< _T > &ptr)
 Constructor by compatible pointer.
 
 ~SPtr ()
 Destructor.
 
 operator T* (void) const
 An operator for conversion to the type T*.
 
T & operator* () const
 An operator for conversion to a compatible pointer. More...
 
T * operator-> () const
 An access operator.
 
SPtr< T > & operator= (T *elem)
 The assignment operator.
 
SPtr< T > & operator= (const SPtr< T > &ptr)
 The assignment operator.
 
template<class _T >
SPtr< T > & operator= (const SPtr< _T > &ptr)
 An assignment operator for a compatible pointer.
 
template<class _T >
bool operator== (const SPtr< _T > &ptr) const
 An operator for equality check.
 
template<class _T >
bool operator== (const _T *elem) const
 An operator for equality check.
 
bool operator== (T *elem) const
 An operator for equality check.
 
template<class _T >
bool operator!= (const SPtr< _T > &ptr) const
 An operator for inequality check.
 
template<class _T >
bool operator!= (const _T *elem) const
 An operator for inequality check.
 
bool operator!= (T *elem) const
 An operator for inequality check.
 
template<class _T >
bool operator< (const _T *elem) const
 Order relation.
 
template<class _T >
bool operator< (const SPtr< _T > &elem) const
 Order relation.
 
SPtr< T > & assign (T *elem)
 A function of assignment by pointer.
 
SPtr< T > & reset (void)
 A function of release an object.
 
T * get () const
 A function of access to data element.
 
T * detach ()
 A function detaches an object.
 
bool is_null () const
 Is null pointer?
 

Detailed Description

template<class T>
class SPtr< T >

Smart pointer to objects with reference counter.

Smart pointer to objects with reference counter. It requires Implementation of functions AddRef() and Release() from the template parameter.

Member Function Documentation

◆ operator*()

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

An operator for conversion to a compatible pointer.

An access operator.


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