CArray_ptr< PointerType > Class Template Reference#include <Array_ptr.h>
Collaboration diagram for CArray_ptr< PointerType >:
![]()
Detailed Descriptiontemplate<class PointerType>
|
CArray_ptr< PointerType >::CArray_ptr | ( | PointerType * | pData | ) | [inline] |
Definition at line 103 of file Array_ptr.h.
00103 : m_pData(pData), 00104 m_bOwners(TRUE) 00105 { 00106 }
virtual CArray_ptr< PointerType >::~CArray_ptr | ( | ) | [inline, virtual] |
PointerType* CArray_ptr< PointerType >::Get | ( | ) | const [inline] |
PointerType& CArray_ptr< PointerType >::operator* | ( | ) | [inline] |
PointerType* CArray_ptr< PointerType >::operator-> | ( | ) | const [inline] |
CArray_ptr<PointerType> CArray_ptr< PointerType >::operator= | ( | const PointerType * | pData | ) | [inline] |
Definition at line 84 of file Array_ptr.h.
00085 { 00086 //Reset the data 00087 Reset(); 00088 00089 //Take the new one 00090 m_pData=pData; 00091 00092 //We are the owners 00093 m_bOwners=TRUE; 00094 00095 //Release the ownership of the source PTR 00096 pData->ReleaseOwnership(); 00097 00098 //Done 00099 return *this; 00100 }
PointerType* CArray_ptr< PointerType >::Release | ( | ) | const [inline] |
Definition at line 63 of file Array_ptr.h.
00064 { 00065 //We are not the owners 00066 m_bOwners=FALSE; 00067 00068 //Done with it 00069 return Get(); 00070 }
void CArray_ptr< PointerType >::Reset | ( | ) | [inline] |
Definition at line 73 of file Array_ptr.h.
00074 { 00075 //Release the data we have 00076 if (m_bOwners) 00077 delete [] m_pData; 00078 00079 //We don't have it anymore 00080 m_pData=NULL; 00081 }