#include <it_cal/auto_ptr.h>
Inheritance diagram for IT_AutoPtr< T >:
The template class IT_Bus::Var<T>, described in it_bus/var.h, is a smart pointer for reference counted objects.
Definition at line 49 of file auto_ptr.h.
Public Member Functions | |
IT_EXPLICIT | IT_AutoPtr (T *ptr=0) IT_THROW_DECL(()) |
Constructor. | |
IT_AutoPtr (const IT_AutoPtr< T > &other) IT_THROW_DECL(()) | |
Constructor. | |
~IT_AutoPtr () IT_THROW_DECL(()) | |
Destructor. | |
IT_AutoPtr< T > & | operator= (const IT_AutoPtr< T > &rhs) IT_THROW_DECL(()) |
Assignment operator. | |
T & | operator * () const IT_THROW_DECL(()) |
Dereferencing operator. | |
T * | operator-> () const IT_THROW_DECL(()) |
Pointer operator. | |
T * | get () const IT_THROW_DECL(()) |
Get the pointer but do not give up ownership. | |
T * | release () IT_THROW_DECL(()) |
Release the reference, giving up responsibility for memory management to the caller. | |
void | reset (T *ptr=0) IT_THROW_DECL(()) |
Set the internal pointer to a different object and release the memory used by the current object. | |
Private Attributes | |
T * | m_ptr |
IT_EXPLICIT IT_AutoPtr< T >::IT_AutoPtr | ( | T * | ptr = 0 |
) | [inline] |
IT_AutoPtr< T >::IT_AutoPtr | ( | const IT_AutoPtr< T > & | other | ) | [inline] |
Constructor.
A | reference to another IT_AutoPtr instance. |
Definition at line 70 of file auto_ptr.h.
IT_AutoPtr<T>& IT_AutoPtr< T >::operator= | ( | const IT_AutoPtr< T > & | rhs | ) | [inline] |
Assignment operator.
A | reference to an IT_AutoPtr instance. |
Definition at line 93 of file auto_ptr.h.
T& IT_AutoPtr< T >::operator * | ( | ) | const [inline] |
Dereferencing operator.
Definition at line 107 of file auto_ptr.h.
T* IT_AutoPtr< T >::operator-> | ( | ) | const [inline] |
T* IT_AutoPtr< T >::get | ( | ) | const [inline] |
Get the pointer but do not give up ownership.
Definition at line 129 of file auto_ptr.h.
Referenced by IT_Bus::NillablePtr< T >::is_nil(), IT_Bus::NillablePtr< T >::operator=(), and IT_Bus::NillablePtr< T >::set().
T* IT_AutoPtr< T >::release | ( | ) | [inline] |
Release the reference, giving up responsibility for memory management to the caller.
Set internal pointer to 0 since it no longer points to a valid reference.
Definition at line 142 of file auto_ptr.h.
Referenced by IT_AutoPtr< ServiceHelper >::operator=().
void IT_AutoPtr< T >::reset | ( | T * | ptr = 0 |
) | [inline] |
Set the internal pointer to a different object and release the memory used by the current object.
A | pointer to the new object. |
Definition at line 156 of file auto_ptr.h.
Referenced by IT_AutoPtr< ServiceHelper >::operator=(), IT_Bus::NillablePtr< T >::operator=(), IT_Bus::NillablePtr< T >::set(), and IT_Bus::NillablePtr< T >::set_nil().