aimstil  5.0.5
til::Ptr< T > Class Template Reference

Smart pointer for objects that can be modified. More...

#include <til/Ptr.h>

Inheritance diagram for til::Ptr< T >:
Collaboration diagram for til::Ptr< T >:

Public Types

typedef Ptr< T > Self
 
- Public Types inherited from til::ConstPtr< T >
typedef ConstPtr< T > Self
 
typedef T DataType
 

Public Member Functions

 Ptr ()
 
 Ptr (T *p)
 
template<class U >
 Ptr (U *p)
 
 operator T* (void) const
 
T & operator* (void) const
 
T * operator-> (void) const
 
Ptroperator= (T *p)
 
- Public Member Functions inherited from til::ConstPtr< T >
 ConstPtr ()
 Default constructor, pointing to NULL. More...
 
 ConstPtr (const ConstPtr< T > &ptr)
 
 ConstPtr (const T *p)
 
template<class U >
 ConstPtr (const U *p)
 
virtual ~ConstPtr ()
 
 operator const T * (void) const
 Convert a ConstPrt into a const T*. More...
 
const T & operator* (void) const
 
const T * operator-> (void) const
 
ConstPtroperator= (const ConstPtr< T > &p)
 
ConstPtroperator= (const T *p)
 Assignement to a pointer. More...
 
bool operator== (const T *p) const
 Checks whether two pointers point to the same object. More...
 
bool operator== (const ConstPtr< T > &p) const
 
bool operator!= (const T *p) const
 Checks whether two pointers do not point to the same object. More...
 
bool operator!= (const ConstPtr< T > &p) const
 

Additional Inherited Members

- Protected Attributes inherited from til::ConstPtr< T >
T * m_pointer
 

Detailed Description

template<class T>
class til::Ptr< T >

Smart pointer for objects that can be modified.

Simply overloads some of ConstPtr's operators to let us do non-const operations on the object.

Definition at line 177 of file Ptr.h.

Member Typedef Documentation

◆ Self

template<class T >
typedef Ptr<T> til::Ptr< T >::Self

Definition at line 181 of file Ptr.h.

Constructor & Destructor Documentation

◆ Ptr() [1/3]

template<class T >
til::Ptr< T >::Ptr ( )
inline

Definition at line 185 of file Ptr.h.

◆ Ptr() [2/3]

template<class T >
til::Ptr< T >::Ptr ( T *  p)
inline

Definition at line 186 of file Ptr.h.

◆ Ptr() [3/3]

template<class T >
template<class U >
til::Ptr< T >::Ptr ( U *  p)
inline

Definition at line 188 of file Ptr.h.

Member Function Documentation

◆ operator T*()

template<class T >
til::Ptr< T >::operator T* ( void  ) const
inline

Definition at line 195 of file Ptr.h.

References til::ConstPtr< T >::m_pointer.

◆ operator*()

template<class T >
T& til::Ptr< T >::operator* ( void  ) const
inline

Definition at line 196 of file Ptr.h.

References til::ConstPtr< T >::m_pointer.

◆ operator->()

template<class T >
T* til::Ptr< T >::operator-> ( void  ) const
inline

Definition at line 197 of file Ptr.h.

References til::ConstPtr< T >::m_pointer.

◆ operator=()

template<class T >
Ptr& til::Ptr< T >::operator= ( T *  p)
inline

Definition at line 198 of file Ptr.h.


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