2 * PROJECT: ReactOS Automatic Testing Utility
3 * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
4 * PURPOSE: Template similar to std::auto_ptr for arrays
5 * COPYRIGHT: Copyright 2009 Colin Finck <colin@reactos.org>
8 template<typename Type
>
15 typedef Type element_type
;
17 /* Construct an auto_array_ptr from a pointer */
18 explicit auto_array_ptr(Type
* Ptr
= 0) throw()
23 /* Construct an auto_array_ptr from an existing auto_array_ptr */
24 auto_array_ptr(auto_array_ptr
<Type
>& Right
) throw()
25 : m_Ptr(Right
.release())
29 /* Destruct the auto_array_ptr and remove the corresponding array from memory */
30 ~auto_array_ptr() throw()
35 /* Get the pointer address */
36 Type
* get() const throw()
41 /* Release the pointer */
42 Type
* release() throw()
50 /* Reset to a new pointer */
51 void reset(Type
* Ptr
= 0) throw()
59 /* Simulate all the functionality of real arrays by casting the auto_array_ptr to Type* on demand */
60 operator Type
*() const throw()