OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
dcmdata
include
dcmtk
dcmdata
dclist.h
1
/*
2
*
3
* Copyright (C) 1994-2010, OFFIS e.V.
4
* All rights reserved. See COPYRIGHT file for details.
5
*
6
* This software and supporting documentation were developed by
7
*
8
* OFFIS e.V.
9
* R&D Division Health
10
* Escherweg 2
11
* D-26121 Oldenburg, Germany
12
*
13
*
14
* Module: dcmdata
15
*
16
* Author: Gerd Ehlers
17
*
18
* Purpose: generic list class
19
*
20
* Last Update: $Author: joergr $
21
* Update Date: $Date: 2010-10-14 13:15:41 $
22
* CVS/RCS Revision: $Revision: 1.22 $
23
* Status: $State: Exp $
24
*
25
* CVS/RCS Log at end of file
26
*
27
*/
28
29
#ifndef DCLIST_H
30
#define DCLIST_H
31
32
#include "dcmtk/config/osconfig.h"
/* make sure OS specific configuration is included first */
33
34
#include "dcmtk/ofstd/ofcast.h"
35
#include "dcmtk/ofstd/oftypes.h"
36
37
#define INCLUDE_CSTDDEF
38
#define INCLUDE_CSTDLIB
39
#include "dcmtk/ofstd/ofstdinc.h"
40
#include "dcmtk/dcmdata/dcobject.h"
41
43
const
unsigned
long
DCM_EndOfListIndex = OFstatic_cast(
unsigned
long
, -1L);
44
47
class
DcmListNode
48
{
49
50
public
:
54
DcmListNode
(
DcmObject
*obj );
55
57
~DcmListNode
();
58
60
inline
DcmObject
*
value
() {
return
objNodeValue
; }
61
62
private
:
63
friend
class
DcmList
;
64
66
DcmListNode
*
nextNode
;
67
69
DcmListNode
*
prevNode
;
70
72
DcmObject
*
objNodeValue
;
73
75
DcmListNode
(
const
DcmListNode
&);
76
78
DcmListNode
&
operator=
(
const
DcmListNode
&);
79
80
};
81
83
typedef
enum
84
{
86
ELP_atpos,
87
89
ELP_first,
90
92
ELP_last,
93
95
ELP_prev,
96
98
ELP_next
99
} E_ListPos;
100
105
class
DcmList
106
{
107
public
:
109
DcmList
();
110
112
~DcmList
();
113
118
DcmObject
*
append
(
DcmObject
*obj );
119
124
DcmObject
*
prepend
(
DcmObject
*obj );
125
131
DcmObject
*
insert
(
DcmObject
*obj,
132
E_ListPos pos = ELP_next );
133
137
DcmObject
*
remove
();
138
143
DcmObject
*
get
( E_ListPos pos = ELP_atpos );
144
150
DcmObject
*
seek
( E_ListPos pos = ELP_next );
151
157
DcmObject
*
seek_to
(
unsigned
long
absolute_position);
158
163
void
deleteAllElements
();
164
166
inline
unsigned
long
card
()
const
{
return
cardinality
; }
167
169
inline
OFBool
empty
(
void
)
const
{
return
firstNode
== NULL; }
170
172
inline
OFBool
valid
(
void
)
const
{
return
currentNode
!= NULL; }
173
174
private
:
176
DcmListNode
*
firstNode
;
177
179
DcmListNode
*
lastNode
;
180
182
DcmListNode
*
currentNode
;
183
185
unsigned
long
cardinality
;
186
188
DcmList
&
operator=
(
const
DcmList
&);
189
191
DcmList
(
const
DcmList
&newList);
192
};
193
194
#endif // DCLIST_H
195
196
197
/*
198
* CVS/RCS Log:
199
* $Log: dclist.h,v $
200
* Revision 1.22 2010-10-14 13:15:41 joergr
201
* Updated copyright header. Added reference to COPYRIGHT file.
202
*
203
* Revision 1.21 2010-03-24 11:52:55 onken
204
* Introduced new function to delete all elements (including memory de-allocation)
205
* from DcmList.
206
*
207
* Revision 1.20 2010-03-01 09:08:44 uli
208
* Removed some unnecessary include directives in the headers.
209
*
210
* Revision 1.19 2010-02-22 11:39:53 uli
211
* Remove some unneeded includes.
212
*
213
* Revision 1.18 2009-11-04 09:58:07 uli
214
* Switched to logging mechanism provided by the "new" oflog module
215
*
216
* Revision 1.17 2007-11-29 14:30:35 meichel
217
* Updated doxygen API documentation
218
*
219
* Revision 1.16 2005/12/08 16:28:20 meichel
220
* Changed include path schema for all DCMTK header files
221
*
222
* Revision 1.15 2003/08/08 13:32:45 joergr
223
* Adapted type casts to new-style typecast operators defined in ofcast.h.
224
*
225
* Revision 1.14 2003/08/08 12:30:38 joergr
226
* Made DcmListNode::value() inline.
227
* Renamed member variable "actualNode" to "currentNode".
228
*
229
* Revision 1.13 2002/11/27 12:07:22 meichel
230
* Adapted module dcmdata to use of new header file ofstdinc.h
231
*
232
* Revision 1.12 2001/06/01 15:48:41 meichel
233
* Updated copyright header
234
*
235
* Revision 1.11 2000/03/08 16:26:15 meichel
236
* Updated copyright header.
237
*
238
* Revision 1.10 2000/02/23 15:11:38 meichel
239
* Corrected macro for Borland C++ Builder 4 workaround.
240
*
241
* Revision 1.9 2000/02/01 10:12:02 meichel
242
* Avoiding to include <stdlib.h> as extern "C" on Borland C++ Builder 4,
243
* workaround for bug in compiler header files.
244
*
245
* Revision 1.8 1999/03/31 09:24:41 meichel
246
* Updated copyright header in module dcmdata
247
*
248
*
249
*/
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2