aimstil
5.0.5
|
Smart pointer for constant objects deriving from SmartObject. More...
#include <til/Ptr.h>
Public Types | |
typedef ConstPtr< T > | Self |
typedef T | DataType |
Public Member Functions | |
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 |
ConstPtr & | operator= (const ConstPtr< T > &p) |
ConstPtr & | operator= (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 |
Protected Attributes | |
T * | m_pointer |
Smart pointer for constant objects deriving from SmartObject.
typedef T til::ConstPtr< T >::DataType |
typedef ConstPtr<T> til::ConstPtr< T >::Self |
|
inline |
Default constructor, pointing to NULL.
Definition at line 48 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
|
inline |
Definition at line 50 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
|
inline |
Definition at line 60 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
Definition at line 69 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
|
inlinevirtual |
Definition at line 82 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
|
inline |
Convert a ConstPrt into a const T*.
Definition at line 96 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
|
inline |
Checks whether two pointers do not point to the same object.
Definition at line 155 of file Ptr.h.
References til::ConstPtr< T >::operator==().
|
inline |
Definition at line 156 of file Ptr.h.
References til::ConstPtr< T >::operator==().
|
inline |
Definition at line 100 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
|
inline |
Definition at line 104 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
|
inline |
|
inline |
Assignement to a pointer.
We unsubscribe to the previous object we pointed to, if any. Note that this object will destroy itself if we were the last pointer to point to it (and its lock mode is off). Note that this can therefore be used to free an object before the end of the current block, by setting the pointer to NULL.
Definition at line 118 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
|
inline |
Checks whether two pointers point to the same object.
Definition at line 151 of file Ptr.h.
References til::ConstPtr< T >::m_pointer.
Referenced by til::ConstPtr< T >::operator!=().
|
inline |
Definition at line 152 of file Ptr.h.
References til::ConstPtr< T >::operator==().
Referenced by til::ConstPtr< T >::operator==().
|
protected |
Definition at line 168 of file Ptr.h.
Referenced by til::ConstPtr< T >::ConstPtr(), til::ConstPtr< T >::operator const T *(), til::Ptr< T >::operator T*(), til::ConstPtr< T >::operator*(), til::Ptr< T >::operator*(), til::ConstPtr< T >::operator->(), til::Ptr< T >::operator->(), til::ConstPtr< T >::operator=(), til::ConstPtr< T >::operator==(), and til::ConstPtr< T >::~ConstPtr().