File: ACE_Double_Linked_List_Iterator_Base.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 (167 lines) | stat: -rw-r--r-- 6,285 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
.TH ACE_Double_Linked_List_Iterator_Base 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Double_Linked_List_Iterator_Base \- Implements a common base class for iterators for a double linked list ADT. 
.SH SYNOPSIS
.br
.PP
\fC#include <Containers_T.h>\fR
.PP
Inherited by \fBACE_Double_Linked_List_Iterator\fR, and \fBACE_Double_Linked_List_Reverse_Iterator\fR.
.PP
.SS Public Methods

.in +1c
.ti -1c
.RI "int \fBnext\fR (T *&) const"
.br
.RI "\fIPasses back the <entry> under the iterator. Returns 0 if the iteration has completed, otherwise 1.\fR"
.ti -1c
.RI "T* \fBnext\fR (void) const"
.br
.ti -1c
.RI "int \fBdone\fR (void) const"
.br
.RI "\fIReturns 1 when all items have been seen, else 0.\fR"
.ti -1c
.RI "T& \fBoperator *\fR (void) const"
.br
.RI "\fISTL-like iterator dereference operator: returns a reference to the node underneath the iterator.\fR"
.ti -1c
.RI "void \fBreset\fR (\fBACE_Double_Linked_List\fR<T> &)"
.br
.in -1c
.SS Public Attributes

.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.in -1c
.SS Protected Methods

.in +1c
.ti -1c
.RI "\fBACE_Double_Linked_List_Iterator_Base\fR (const \fBACE_Double_Linked_List\fR<T> &)"
.br
.RI "\fIConstructor.\fR"
.ti -1c
.RI "\fBACE_Double_Linked_List_Iterator_Base\fR (const ACE_Double_Linked_List_Iterator_Base<T> &iter)"
.br
.RI "\fICopy constructor.\fR"
.ti -1c
.RI "int \fBgo_head\fR (void)"
.br
.ti -1c
.RI "int \fBgo_tail\fR (void)"
.br
.RI "\fIMove to the last element of the list. Returns 0 if the list is empty, else 1.\fR"
.ti -1c
.RI "T* \fBnot_done\fR (void) const"
.br
.ti -1c
.RI "T* \fBdo_advance\fR (void)"
.br
.RI "\fIAdvance to the next element in the list. Return the address of the next element if there are more, 0 otherwise.\fR"
.ti -1c
.RI "T* \fBdo_retreat\fR (void)"
.br
.RI "\fIRetreat to the previous element in the list. Return the address of the previous element if there are more, 0 otherwise.\fR"
.ti -1c
.RI "void \fBdump_i\fR (void) const"
.br
.RI "\fIDump the state of an object.\fR"
.in -1c
.SS Protected Attributes

.in +1c
.ti -1c
.RI "T* \fBcurrent_\fR"
.br
.RI "\fIRemember where we are.\fR"
.ti -1c
.RI "const \fBACE_Double_Linked_List\fR<T>* \fBdllist_\fR"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP 

.SS template<class T>  template class ACE_Double_Linked_List_Iterator_Base
Implements a common base class for iterators for a double linked list ADT.
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP 
.SS template<classT> ACE_Double_Linked_List_Iterator_Base<T>::ACE_Double_Linked_List_Iterator_Base<T> (const \fBACE_Double_Linked_List\fR< T >&)\fC [protected]\fR
.PP
Constructor.
.PP
.SS template<classT> ACE_Double_Linked_List_Iterator_Base<T>::ACE_Double_Linked_List_Iterator_Base<T> (const ACE_Double_Linked_List_Iterator_Base< T >& iter)\fC [protected]\fR
.PP
Copy constructor.
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP 
.SS template<classT> T * ACE_Double_Linked_List_Iterator_Base<T>::do_advance (void)\fC [protected]\fR
.PP
Advance to the next element in the list. Return the address of the next element if there are more, 0 otherwise.
.PP
.SS template<classT> T * ACE_Double_Linked_List_Iterator_Base<T>::do_retreat (void)\fC [protected]\fR
.PP
Retreat to the previous element in the list. Return the address of the previous element if there are more, 0 otherwise.
.PP
.SS template<classT> int ACE_Double_Linked_List_Iterator_Base<T>::done (void) const
.PP
Returns 1 when all items have been seen, else 0.
.PP
.SS template<classT> void ACE_Double_Linked_List_Iterator_Base<T>::dump_i (void) const\fC [protected]\fR
.PP
Dump the state of an object.
.PP
.SS template<classT> int ACE_Double_Linked_List_Iterator_Base<T>::go_head (void)\fC [protected]\fR
.PP
Move to the first element of the list. Returns 0 if the list is empty, else 1. Note: the head of the \fBACE_DLList\fR is actually a null entry, so the first element is actually the 2n'd entry 
.SS template<classT> int ACE_Double_Linked_List_Iterator_Base<T>::go_tail (void)\fC [protected]\fR
.PP
Move to the last element of the list. Returns 0 if the list is empty, else 1.
.PP
.SS template<classT> T * ACE_Double_Linked_List_Iterator_Base<T>::next (void) const
.PP
Return the address of next (current) unvisited item in the list. 0 if there is no more element available. DEPRECATED 
.PP
Reimplemented in \fBACE_DLList_Iterator\fR, and \fBACE_DLList_Reverse_Iterator\fR.
.SS template<classT> int ACE_Double_Linked_List_Iterator_Base<T>::next (T *&) const
.PP
Passes back the <entry> under the iterator. Returns 0 if the iteration has completed, otherwise 1.
.PP
.SS template<classT> T * ACE_Double_Linked_List_Iterator_Base<T>::not_done (void) const\fC [protected]\fR
.PP
Check if we reach the end of the list. Can also be used to get the *current* element in the list. Return the address of the current item if there are still elements left , 0 if we run out of element. 
.SS template<classT> T & ACE_Double_Linked_List_Iterator_Base<T>::operator * (void) const
.PP
STL-like iterator dereference operator: returns a reference to the node underneath the iterator.
.PP
.SS template<classT> void ACE_Double_Linked_List_Iterator_Base<T>::reset (\fBACE_Double_Linked_List\fR< T >&)
.PP
Retasks the iterator to iterate over a new Double_Linked_List. This allows clients to reuse an iterator without incurring the constructor overhead. If you do use this, be aware that if there are more than one reference to this iterator, the other "clients" may be very bothered when their iterator changes. @ Here be dragons. Comments? 
.PP
Reimplemented in \fBACE_Double_Linked_List_Iterator\fR, and \fBACE_Double_Linked_List_Reverse_Iterator\fR.
.SH MEMBER DATA DOCUMENTATION
.PP 
.SS template<classT> ACE_Double_Linked_List_Iterator_Base<T>::ACE_ALLOC_HOOK_DECLARE
.PP
Declare the dynamic allocation hooks.
.PP
Reimplemented in \fBACE_Double_Linked_List_Iterator\fR, and \fBACE_Double_Linked_List_Reverse_Iterator\fR.
.SS template<classT> T * ACE_Double_Linked_List_Iterator_Base<T>::current_\fC [protected]\fR
.PP
Remember where we are.
.PP
.SS template<classT> const \fBACE_Double_Linked_List\fR< T >* ACE_Double_Linked_List_Iterator_Base<T>::dllist_\fC [protected]\fR
.PP


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