ReactOS
0.4.16-dev-927-g467dec4
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
auto_array_ptr.h
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS Automatic Testing Utility
3
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4
* PURPOSE: Template similar to std::auto_ptr for arrays
5
* COPYRIGHT: Copyright 2009 Colin Finck (colin@reactos.org)
6
*/
7
8
template
<
typename
Type>
9
class
auto_array_ptr
10
{
11
private
:
12
Type
*
m_Ptr
;
13
14
public
:
15
typedef
Type
element_type
;
16
17
/* Construct an auto_array_ptr from a pointer */
18
explicit
auto_array_ptr
(
Type
*
Ptr
= 0)
throw
()
19
:
m_Ptr
(
Ptr
)
20
{
21
}
22
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())
26
{
27
}
28
29
/* Destruct the auto_array_ptr and remove the corresponding array from memory */
30
~auto_array_ptr
()
throw
()
31
{
32
delete
[]
m_Ptr
;
33
}
34
35
/* Get the pointer address */
36
Type
*
get
()
const
throw
()
37
{
38
return
m_Ptr
;
39
}
40
41
/* Release the pointer */
42
Type
*
release
()
throw
()
43
{
44
Type
* Tmp =
m_Ptr
;
45
m_Ptr
= 0;
46
47
return
Tmp;
48
}
49
50
/* Reset to a new pointer */
51
void
reset
(
Type
*
Ptr
= 0)
throw
()
52
{
53
if
(
Ptr
!=
m_Ptr
)
54
delete
[]
m_Ptr
;
55
56
m_Ptr
=
Ptr
;
57
}
58
59
/* Simulate all the functionality of real arrays by casting the auto_array_ptr to Type* on demand */
60
operator
Type
*()
const
throw
()
61
{
62
return
m_Ptr
;
63
}
64
};
Type
Type
Definition:
Type.h:7
auto_array_ptr
Definition:
auto_array_ptr.h:10
auto_array_ptr::~auto_array_ptr
~auto_array_ptr()
Definition:
auto_array_ptr.h:30
auto_array_ptr::release
Type * release()
Definition:
auto_array_ptr.h:42
auto_array_ptr::get
Type * get() const
Definition:
auto_array_ptr.h:36
auto_array_ptr::auto_array_ptr
auto_array_ptr(Type *Ptr=0)
Definition:
auto_array_ptr.h:18
auto_array_ptr::m_Ptr
Type * m_Ptr
Definition:
auto_array_ptr.h:12
auto_array_ptr::reset
void reset(Type *Ptr=0)
Definition:
auto_array_ptr.h:51
auto_array_ptr::auto_array_ptr
auto_array_ptr(auto_array_ptr< Type > &Right)
Definition:
auto_array_ptr.h:24
auto_array_ptr::element_type
Type element_type
Definition:
auto_array_ptr.h:15
throw
result_buffer_count char *const _In_ int const _In_ bool const _In_ unsigned const _In_ STRFLT const _In_ bool const _Inout_ __crt_cached_ptd_host &ptd throw()
Definition:
cvt.cpp:119
Ptr
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition:
fsrtlfuncs.h:898
modules
rostests
rosautotest
auto_array_ptr.h
Generated on Sun Mar 30 2025 06:09:02 for ReactOS by
1.9.6