OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
ofstd
include
dcmtk
ofstd
ofstdinc.h
1
/*
2
*
3
* Copyright (C) 1997-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: ofstd
15
*
16
* Author: Marco Eichelberg
17
*
18
* Purpose: encapsulation of old style vs. ISO C++ standard includes
19
*
20
* Last Update: $Author: joergr $
21
* Update Date: $Date: 2010-10-14 13:15:50 $
22
* CVS/RCS Revision: $Revision: 1.15 $
23
* Status: $State: Exp $
24
*
25
* CVS/RCS Log at end of file
26
*
27
*/
28
29
// this file is not and should not be protected against multiple inclusion
30
31
#include "dcmtk/config/osconfig.h"
32
33
/* DCMTK by default does not anymore pollute the default namespace by
34
* importing namespace std. Earlier releases did this to simplify compatibility
35
* with older compilers where STL classes were not consistently defined
36
* in namespace std. We now have configure macros which should care for this.
37
* If user code still relies on namespace std to be included, compile with
38
* macro USING_STD_NAMESPACE defined.
39
*/
40
#ifdef USING_STD_NAMESPACE
41
namespace
std { }
42
using namespace
std;
43
#endif
44
45
// define STD_NAMESPACE to std:: if the standard namespace exists
46
#ifndef STD_NAMESPACE
47
#ifdef HAVE_STD_NAMESPACE
48
#define STD_NAMESPACE std::
49
#else
50
#define STD_NAMESPACE
51
#endif
52
#endif
53
54
/* Header files as defined in ISO/IEC 14882:1998, Section 17.4.1.2, Table 11
55
* These are header files for the Standard C++ Library.
56
*/
57
58
// define INCLUDE_ALGORITHM to include "ofalgo.h"
59
#ifdef INCLUDE_ALGORITHM
60
#include "dcmtk/ofstd/ofalgo.h"
61
#endif
62
63
// we don't yet support <bitset>, <complex>, <deque>, <exception>, <functional>
64
65
// all stream related headers are handled by "ofstream.h"
66
#if defined(INCLUDE_IOSFWD) || defined(INCLUDE_IOSTREAM) || defined(INCLUDE_ISTREAM) || \
67
defined(INCLUDE_OSTREAM) || defined(INCLUDE_IOMANIP) || defined(INCLUDE_IOS) || \
68
defined(INCLUDE_FSTREAM) || defined(INCLUDE_SSTREAM)
69
#include "dcmtk/ofstd/ofstream.h"
70
#endif
71
72
// we don't yet support <iterator>, <limits>
73
74
// define INCLUDE_LIST to include "oflist.h"
75
#ifdef INCLUDE_LIST
76
#include "dcmtk/ofstd/oflist.h"
77
#endif
78
79
// we don't yet support <locale>, <map>, <memory>, <numeric>, <queue>, <set>
80
81
// define INCLUDE_NEW to include <new> or <new.h> if available
82
#ifdef INCLUDE_NEW
83
#ifdef USE_STD_CXX_INCLUDES
84
#include <new>
85
#elif defined(HAVE_NEW_H)
86
#include <new.h>
87
#endif
88
#endif
89
90
// define INCLUDE_STACK to include "ofstack.h"
91
#ifdef INCLUDE_STACK
92
#include "dcmtk/ofstd/ofstack.h"
93
#endif
94
95
// we don't yet support <stdexcept>
96
97
// define INCLUDE_STREAMBUF to include <streambuf> or <streambuf.h> if available
98
#ifdef INCLUDE_STREAMBUF
99
#ifdef USE_STD_CXX_INCLUDES
100
#include <streambuf>
101
#elif defined(HAVE_STREAMBUF_H)
102
#include <streambuf.h>
103
#endif
104
#endif
105
106
// define INCLUDE_STRING to include "ofstring.h"
107
#ifdef INCLUDE_STRING
108
#include "dcmtk/ofstd/ofstring.h"
109
#endif
110
111
// we don't yet support <typeinfo>, <valarray>, <vector>
112
113
114
/* Header files as defined in ISO/IEC 14882:1998, Section 17.4.1.2, Table 12
115
* These are header files for the Standard C Library.
116
*/
117
118
// define INCLUDE_CASSERT to include <cassert> or <assert.h> if available
119
#ifdef INCLUDE_CASSERT
120
#ifdef USE_STD_CXX_INCLUDES
121
#include <cassert>
122
#elif defined(HAVE_ASSERT_H)
123
BEGIN_EXTERN_C
124
#include <assert.h>
125
END_EXTERN_C
126
#endif
127
#endif
128
129
// define INCLUDE_CCTYPE to include <cctype> or <ctype.h> if available
130
#ifdef INCLUDE_CCTYPE
131
#ifdef USE_STD_CXX_INCLUDES
132
#include <cctype>
133
#elif defined(HAVE_CTYPE_H)
134
BEGIN_EXTERN_C
135
#include <ctype.h>
136
END_EXTERN_C
137
#endif
138
#endif
139
140
// define INCLUDE_CERRNO to include <cerrno> or <errno.h> if available
141
#ifdef INCLUDE_CERRNO
142
#ifdef USE_STD_CXX_INCLUDES
143
#include <cerrno>
144
#elif defined(HAVE_ERRNO_H)
145
BEGIN_EXTERN_C
146
#include <errno.h>
147
END_EXTERN_C
148
#endif
149
#endif
150
151
// define INCLUDE_CFLOAT to include <cfloat> or <float.h> if available
152
#ifdef INCLUDE_CFLOAT
153
#ifdef USE_STD_CXX_INCLUDES
154
#include <cfloat>
155
#elif defined(HAVE_FLOAT_H)
156
BEGIN_EXTERN_C
157
#include <float.h>
158
END_EXTERN_C
159
#endif
160
#endif
161
162
// define INCLUDE_CISO646 to include <ciso646> or <iso646.h> if available
163
#ifdef INCLUDE_CISO646
164
#ifdef USE_STD_CXX_INCLUDES
165
#include <ciso646>
166
#elif defined(HAVE_ISO646_H)
167
BEGIN_EXTERN_C
168
#include <iso646.h>
169
END_EXTERN_C
170
#endif
171
#endif
172
173
// define INCLUDE_CLIMITS to include <climits> or <limits.h> if available
174
#ifdef INCLUDE_CLIMITS
175
#ifdef USE_STD_CXX_INCLUDES
176
#include <climits>
177
#elif defined(HAVE_LIMITS_H)
178
BEGIN_EXTERN_C
179
#include <limits.h>
180
END_EXTERN_C
181
#endif
182
#endif
183
184
// define INCLUDE_CLOCALE to include <clocale> or <locale.h> if available
185
#ifdef INCLUDE_CLOCALE
186
#ifdef USE_STD_CXX_INCLUDES
187
#include <clocale>
188
#elif defined(HAVE_LOCALE_H)
189
BEGIN_EXTERN_C
190
#include <locale.h>
191
END_EXTERN_C
192
#endif
193
#endif
194
195
// define INCLUDE_CMATH to include <cmath> or <math.h> if available
196
#ifdef INCLUDE_CMATH
197
#ifdef USE_STD_CXX_INCLUDES
198
#include <cmath>
199
#elif defined(HAVE_MATH_H)
200
#ifndef INCLUDE_MATH_H_AS_CXX
201
// some systems use C++ language features in <math.h>
202
BEGIN_EXTERN_C
203
#endif
204
#include <math.h>
205
#ifndef INCLUDE_MATH_H_AS_CXX
206
END_EXTERN_C
207
#endif
208
#endif
209
#endif
210
211
// define INCLUDE_CSETJMP to include <csetjmp> or <setjmp.h> if available
212
#ifdef INCLUDE_CSETJMP
213
#ifdef USE_STD_CXX_INCLUDES
214
#include <csetjmp>
215
#elif defined(HAVE_SETJMP_H)
216
BEGIN_EXTERN_C
217
#include <setjmp.h>
218
END_EXTERN_C
219
#endif
220
#endif
221
222
// define INCLUDE_CSIGNAL to include <csignal> or <signal.h> if available
223
#ifdef INCLUDE_CSIGNAL
224
#ifdef USE_STD_CXX_INCLUDES
225
#include <csignal>
226
#elif defined(HAVE_SIGNAL_H)
227
BEGIN_EXTERN_C
228
#include <signal.h>
229
END_EXTERN_C
230
#endif
231
#endif
232
233
// define INCLUDE_CSTDARG to include <cstdarg> or <stdarg.h> if available
234
#ifdef INCLUDE_CSTDARG
235
#ifdef USE_STD_CXX_INCLUDES
236
#include <cstdarg>
237
#elif defined(HAVE_STDARG_H)
238
BEGIN_EXTERN_C
239
#include <stdarg.h>
240
END_EXTERN_C
241
#endif
242
#endif
243
244
// define INCLUDE_CSTDDEF to include <cstddef> or <stddef.h> if available
245
#ifdef INCLUDE_CSTDDEF
246
#ifdef USE_STD_CXX_INCLUDES
247
#include <cstddef>
248
#elif defined(HAVE_STDDEF_H)
249
BEGIN_EXTERN_C
250
#include <stddef.h>
251
END_EXTERN_C
252
#endif
253
#endif
254
255
// define INCLUDE_CSTDIO to include <cstdio> or <stdio.h> if available
256
#ifdef INCLUDE_CSTDIO
257
#ifdef USE_STD_CXX_INCLUDES
258
#include <cstdio>
259
#elif defined(HAVE_STDIO_H)
260
BEGIN_EXTERN_C
261
#include <stdio.h>
262
END_EXTERN_C
263
#endif
264
// MSVC6 doesn't know vsnprintf(), but it does know _vsnprintf()
265
#if defined(_WIN32) && !defined(HAVE_VSNPRINTF)
266
#define vsnprintf _vsnprintf
267
#endif
268
#endif
269
270
// define INCLUDE_CSTDLIB to include <cstdlib> or <stdlib.h> if available
271
#ifdef INCLUDE_CSTDLIB
272
#ifdef USE_STD_CXX_INCLUDES
273
#include <cstdlib>
274
#elif defined(HAVE_STDLIB_H)
275
/* workaround for bug in Borland C++ Builder */
276
#ifndef __BORLANDC__
277
BEGIN_EXTERN_C
278
#endif
279
#include <stdlib.h>
280
#ifndef __BORLANDC__
281
END_EXTERN_C
282
#endif
283
#endif
284
#endif
285
286
// define INCLUDE_CSTRING to include <cstring> or <string.h> if available
287
#ifdef INCLUDE_CSTRING
288
#ifdef USE_STD_CXX_INCLUDES
289
#include <cstring>
290
#elif defined(HAVE_STRING_H)
291
BEGIN_EXTERN_C
292
#include <string.h>
293
END_EXTERN_C
294
#endif
295
// Some platforms define additional string functions like bzero or
296
// strcasecmp in <strings.h>, so we always include this file if available.
297
#ifdef HAVE_STRINGS_H
298
BEGIN_EXTERN_C
299
#include <strings.h>
300
END_EXTERN_C
301
#endif
302
#endif
303
304
// define INCLUDE_CTIME to include <ctime> or <time.h> if available
305
#ifdef INCLUDE_CTIME
306
#ifdef USE_STD_CXX_INCLUDES
307
#include <ctime>
308
#elif defined(HAVE_TIME_H)
309
BEGIN_EXTERN_C
310
#include <time.h>
311
END_EXTERN_C
312
#endif
313
#endif
314
315
// define INCLUDE_CWCTYPE to include <cwctype> or <wctype.h> if available
316
#ifdef INCLUDE_CWCTYPE
317
#ifdef USE_STD_CXX_INCLUDES
318
#include <cwctype>
319
#elif defined(HAVE_WCTYPE_H)
320
BEGIN_EXTERN_C
321
#include <wctype.h>
322
END_EXTERN_C
323
#endif
324
#endif
325
326
327
/* Headers other than ISO C++, such as BSD and Posix.1 headers */
328
329
// define INCLUDE_LIBC to include <libc.h> if available
330
#ifdef INCLUDE_LIBC
331
#ifdef HAVE_LIBC_H
332
#ifndef INCLUDE_LIBC_H_AS_CXX
333
BEGIN_EXTERN_C
334
#endif
335
#include <libc.h>
336
#ifndef INCLUDE_LIBC_H_AS_CXX
337
END_EXTERN_C
338
#endif
339
#endif
340
#endif
341
342
// define INCLUDE_UNISTD to include <unistd.h> if available
343
#ifdef INCLUDE_UNISTD
344
#ifdef HAVE_UNISTD_H
345
BEGIN_EXTERN_C
346
#include <unistd.h>
347
END_EXTERN_C
348
#endif
349
#endif
350
351
352
353
354
/*
355
* CVS/RCS Log:
356
* $Log: ofstdinc.h,v $
357
* Revision 1.15 2010-10-14 13:15:50 joergr
358
* Updated copyright header. Added reference to COPYRIGHT file.
359
*
360
* Revision 1.14 2010-03-11 08:37:24 uli
361
* Use _vsnprintf() on MSVC6 since it doesn't know vsnprintf().
362
*
363
* Revision 1.13 2007-02-19 15:16:16 meichel
364
* Namespace std is not imported into the default namespace anymore,
365
* unless DCMTK is compiled with macro USING_STD_NAMESPACE defined.
366
*
367
* Revision 1.12 2006/08/14 16:42:02 meichel
368
* Defined two new macros: STD_NAMESPACE is defined to std:: if the standard
369
* namespace exists and empty otherwise. OFendl is defined as std::endl if
370
* the standard namespace exists and as endl otherwise.
371
*
372
* Revision 1.11 2005/12/08 16:06:05 meichel
373
* Changed include path schema for all DCMTK header files
374
*
375
* Revision 1.10 2004/08/03 11:45:09 meichel
376
* Added macros INCLUDE_LIBC and INCLUDE_UNISTD that correctly include libc.h
377
*
378
* Revision 1.9 2004/05/07 10:46:32 meichel
379
* Removed unneeded semicolon, reported by gcc 3.4
380
*
381
* Revision 1.8 2003/12/11 13:40:22 meichel
382
* Added support for including <new> or <new.h>
383
*
384
* Revision 1.7 2003/10/13 13:38:44 meichel
385
* Activated Borland stdlib workaround for compiler versions other than 4.
386
*
387
* Revision 1.6 2002/12/16 16:20:45 meichel
388
* Added configure test that checks if extern "C" inclusion
389
* of <math.h> fails, e.g. on HP/UX 10 and WIN32
390
*
391
* Revision 1.5 2002/12/11 15:54:47 meichel
392
* Added empty namespace std declaration, needed on MSVC.
393
*
394
* Revision 1.4 2002/11/28 17:16:39 meichel
395
* Including <math.h> without extern "C" on Win32 to avoid problem with MSVC5.
396
*
397
* Revision 1.3 2002/11/27 17:21:18 meichel
398
* Fixed bug in ofstack inclusion code
399
*
400
* Revision 1.2 2002/11/27 12:33:34 meichel
401
* Now including <strings.h> even if <string.h> is present.
402
*
403
* Revision 1.1 2002/11/27 11:20:52 meichel
404
* Added new file ofstdinc.h that encapsulates the inclusion
405
* of old style vs. ISO C++ standard header files.
406
*
407
*
408
*/
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2