File: ACE_Refcounted_Auto_Ptr_Rep.3

package info (click to toggle)
ace 5.2.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 26,856 kB
  • ctags: 18,677
  • sloc: cpp: 171,831; makefile: 48,840; sh: 10,192; perl: 8,582; exp: 787; yacc: 387; lex: 140; csh: 20
file content (172 lines) | stat: -rw-r--r-- 6,888 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
.TH ACE_Refcounted_Auto_Ptr_Rep 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Refcounted_Auto_Ptr_Rep \- An ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> object incapsulates a pointer to an object of type X. It is pointed to by \fBACE_Refcounted_Auto_Ptr\fR<X, ACE_LOCK> object[s] and only accessible through them. 
.SH SYNOPSIS
.br
.PP
\fC#include <Refcounted_Auto_Ptr.h>\fR
.PP
.SS Private Methods

.in +1c
.ti -1c
.RI "X* \fBrelease\fR (void)"
.br
.RI "\fISets the pointer value to 0 and returns its old value.\fR"
.ti -1c
.RI "void \fBreset\fR (X *p = 0)"
.br
.RI "\fIInvokes delete on the previous pointer value and then sets the pointer value to the specified value.\fR"
.ti -1c
.RI "X* \fBget\fR (void)"
.br
.RI "\fIGet the pointer value.\fR"
.ti -1c
.RI "int \fBcount\fR (void) const"
.br
.RI "\fIGet the reference count value.\fR"
.ti -1c
.RI "int \fBnull\fR (void) const"
.br
.RI "\fIAllows us to check for NULL on all \fBACE_Refcounted_Auto_Ptr\fR objects.\fR"
.ti -1c
.RI "\fBACE_Refcounted_Auto_Ptr_Rep\fR (X *p = 0)"
.br
.ti -1c
.RI "\fB~ACE_Refcounted_Auto_Ptr_Rep\fR (void)"
.br
.in -1c
.SS Private Attributes

.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.ti -1c
.RI "\fBACE_Auto_Basic_Ptr\fR<X> \fBptr_\fR"
.br
.RI "\fIPointer to the result.\fR"
.ti -1c
.RI "int \fBref_count_\fR"
.br
.RI "\fIReference count.\fR"
.ti -1c
.RI "ACE_LOCK \fBlock_\fR"
.br
.RI "\fISynchronization variable for the MT_SAFE .\fR"
.in -1c
.SS Static Private Methods

.in +1c
.ti -1c
.RI "ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>* \fBinternal_create\fR (X *p)"
.br
.RI "\fIAllocate a new ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> instance, returning NULL if it cannot be created.\fR"
.ti -1c
.RI "ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>* \fBcreate\fR (X *p)"
.br
.RI "\fICreate a ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> and initialize the reference count.\fR"
.ti -1c
.RI "ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>* \fBattach\fR (ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> *&rep)"
.br
.RI "\fIIncrease the reference count and return argument. Uses the attribute "ace_lock_" to synchronize reference count updating. Precondition (rep != 0).\fR"
.ti -1c
.RI "void \fBdetach\fR (ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> *&rep)"
.br
.RI "\fIDecreases the reference count and and deletes rep if there are no more references to rep. Precondition (rep != 0).\fR"
.ti -1c
.RI "void \fBassign\fR (ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> *&rep, ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> *new_rep)"
.br
.RI "\fIDecreases the rep's reference count and and deletes rep if there are no more references to rep. Then assigns new_rep to rep. Precondition (rep != 0 && new_rep != 0).\fR"
.in -1c
.SS Friends

.in +1c
.ti -1c
.RI "class \fBACE_Refcounted_Auto_Ptr< X,ACE_LOCK >\fR"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP 

.SS template<class X, class ACE_LOCK>  template class ACE_Refcounted_Auto_Ptr_Rep
An ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> object incapsulates a pointer to an object of type X. It is pointed to by \fBACE_Refcounted_Auto_Ptr\fR<X, ACE_LOCK> object[s] and only accessible through them.
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP 
.SS template<classX, classACE_LOCK> ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> (X * p = 0)\fC [private]\fR
.PP
.SS template<classX, classACE_LOCK> ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::~ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> (void)\fC [private]\fR
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP 
.SS template<classX, classACE_LOCK> void ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::assign (ACE_Refcounted_Auto_Ptr_Rep< X,ACE_LOCK >*& rep, ACE_Refcounted_Auto_Ptr_Rep< X,ACE_LOCK >* new_rep)\fC [static, private]\fR
.PP
Decreases the rep's reference count and and deletes rep if there are no more references to rep. Then assigns new_rep to rep. Precondition (rep != 0 && new_rep != 0).
.PP
.SS template<classX, classACE_LOCK> ACE_Refcounted_Auto_Ptr_Rep< X,ACE_LOCK >* ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::attach (ACE_Refcounted_Auto_Ptr_Rep< X,ACE_LOCK >*& rep)\fC [static, private]\fR
.PP
Increase the reference count and return argument. Uses the attribute "ace_lock_" to synchronize reference count updating. Precondition (rep != 0).
.PP
.SS template<classX, classACE_LOCK> int ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::count (void) const\fC [private]\fR
.PP
Get the reference count value.
.PP
.SS template<classX, classACE_LOCK> ACE_Refcounted_Auto_Ptr_Rep< X,ACE_LOCK >* ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::create (X * p)\fC [static, private]\fR
.PP
Create a ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> and initialize the reference count.
.PP
.SS template<classX, classACE_LOCK> void ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::detach (ACE_Refcounted_Auto_Ptr_Rep< X,ACE_LOCK >*& rep)\fC [static, private]\fR
.PP
Decreases the reference count and and deletes rep if there are no more references to rep. Precondition (rep != 0).
.PP
.SS template<classX, classACE_LOCK> X * ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::get (void)\fC [private]\fR
.PP
Get the pointer value.
.PP
.SS template<classX, classACE_LOCK> ACE_Refcounted_Auto_Ptr_Rep< X,ACE_LOCK >* ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::internal_create (X * p)\fC [static, private]\fR
.PP
Allocate a new ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK> instance, returning NULL if it cannot be created.
.PP
.SS template<classX, classACE_LOCK> int ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::null (void) const\fC [private]\fR
.PP
Allows us to check for NULL on all \fBACE_Refcounted_Auto_Ptr\fR objects.
.PP
.SS template<classX, classACE_LOCK> X * ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::release (void)\fC [private]\fR
.PP
Sets the pointer value to 0 and returns its old value.
.PP
.SS template<classX, classACE_LOCK> void ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::reset (X * p = 0)\fC [private]\fR
.PP
Invokes delete on the previous pointer value and then sets the pointer value to the specified value.
.PP
.SH FRIENDS AND RELATED FUNCTION DOCUMENTATION
.PP 
.SS template<classX, classACE_LOCK> class \fBACE_Refcounted_Auto_Ptr\fR\fC [friend]\fR
.PP
.SH MEMBER DATA DOCUMENTATION
.PP 
.SS template<classX, classACE_LOCK> ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::ACE_ALLOC_HOOK_DECLARE\fC [private]\fR
.PP
Declare the dynamic allocation hooks.
.PP
.SS template<classX, classACE_LOCK> ACE_LOCK ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::lock_\fC [private]\fR
.PP
Synchronization variable for the MT_SAFE .
.PP
.SS template<classX, classACE_LOCK> \fBACE_Auto_Basic_Ptr\fR< X > ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::ptr_\fC [private]\fR
.PP
Pointer to the result.
.PP
.SS template<classX, classACE_LOCK> int ACE_Refcounted_Auto_Ptr_Rep<X, ACE_LOCK>::ref_count_\fC [private]\fR
.PP
Reference count.
.PP


.SH AUTHOR
.PP 
Generated automatically by Doxygen for ACE from the source code.