File: vcl_iostream.h

package info (click to toggle)
insighttoolkit 3.6.0-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 94,956 kB
  • ctags: 74,981
  • sloc: cpp: 355,621; ansic: 195,070; fortran: 28,713; python: 3,802; tcl: 1,996; sh: 1,175; java: 583; makefile: 415; csh: 184; perl: 175
file content (65 lines) | stat: -rw-r--r-- 1,780 bytes parent folder | download | duplicates (4)
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
// This is vcl/vcl_iostream.h
#ifndef vcl_iostream_h_
#define vcl_iostream_h_
//: 
// \file
// \brief Include compiler's <iostream.h> in a uniform way.
// \author awf@robots.ox.ac.uk
//
//  In particular, define the following
// \code
//   vcl_ostream
//   vcl_ios_X (as in ios::X)
//   operator>>(vcl_ostream &, T &) for T in {signed char, bool}
//   vcl_hex
//   vcl_dec
//   vcl_ws
//   vcl_setprecision
//   vcl_streampos
//   vcl_streambuf
//   vcl_streamsize
//   vcl_cin
//   vcl_cout
//   vcl_cerr
// \endcode
//

// Include this to ensure the two are consistent.
#include "vcl_iosfwd.h"

// Notes to maintainers.
//   The purpose of this file is to repair broken iostream
// headers. Thus in conditional logic, the compilers that 
// behave in a non-standard way should be treated first, as
// special cases, and the #else arm should contain the 
// appropriate action for an ISO compiler.

// On win32, <iostream.h> contains old crufty iostreams and
// <iostream> contains new standard ones. There is no iosfwd
// for the old ones and <string> includes the new iostreams.
// So we must avoid the old ones at any price.

// ------------------------------------------------------------

#if defined(VCL_SGI_CC_720)
# include "sgi/vcl_iostream.h"

#else // -------------------- ISO
# include "iso/vcl_iostream.h"
#endif

// -------------------- miscellaneous fixes which can go at the end:

// Need std::ios::nocreate to avoid creating an empty file on 
// attempts to read a non-existent one. Don't we? -- fsm
#if defined(VCL_VC50)
# undef  vcl_ios_in
# define vcl_ios_in      (std::ios::in | std::ios::nocreate)
#endif

// It seems that VC++ can show strange behaviour without this include:
#if defined(VCL_VC)
# include <vcl_fstream.h>
#endif

#endif // vcl_iostream_h_