Updated formatting of documentation plus a little reorganization.
[cmake.git] / Source / kwsys / kwsys_ios_iostream.h.in
blob7378f671aa51bb44f87b6860206635df83753f57
1 /*=========================================================================
3 Program: KWSys - Kitware System Library
4 Module: $RCSfile: kwsys_ios_iostream.h.in,v $
6 Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
13 =========================================================================*/
14 #ifndef @KWSYS_NAMESPACE@_ios_iostream
15 #define @KWSYS_NAMESPACE@_ios_iostream
17 #include <@KWSYS_NAMESPACE@/Configure.hxx>
19 #ifdef _MSC_VER
20 # pragma warning (push, 1)
21 # pragma warning (disable: 4702)
22 # pragma warning (disable: 4995) /* Old streams are deprecated. */
23 #endif
25 #if @KWSYS_NAMESPACE@_IOS_USE_ANSI
26 # include <iostream>
27 #else
28 # include <iostream.h>
29 #endif
31 // The HP implementation of iostream defines cin, cout, cerr, and clog
32 // as macros in order to do thread-private streams.
33 // See /opt/aCC/include/iostream/iostream.h for details.
34 // This block redefines the macros in a safe way that is also compatible
35 // with the HP definitions and the using declarations below.
37 #if !@KWSYS_NAMESPACE@_IOS_USE_SSTREAM
38 # if defined(__HP_aCC) && (defined(HP_THREAD_SAFE) || defined(_THREAD_SAFE))
39 # if defined(cin) && !defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CIN)
40 # define @KWSYS_NAMESPACE@_IOS_HP_HACK_CIN
41 # undef cin
42 # define cin __tcin.ref()
43 # endif
44 # if defined(cout) && !defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_COUT)
45 # define @KWSYS_NAMESPACE@_IOS_HP_HACK_COUT
46 # undef cout
47 # define cout __tcout.ref()
48 # endif
49 # if defined(cerr) && !defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CERR)
50 # define @KWSYS_NAMESPACE@_IOS_HP_HACK_CERR
51 # undef cerr
52 # define cerr __tcerr.ref()
53 # endif
54 # if defined(clog) && !defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CLOG)
55 # define @KWSYS_NAMESPACE@_IOS_HP_HACK_CLOG
56 # undef clog
57 # define clog __tclog.ref()
58 # endif
59 # endif
60 #endif
62 // If using our own sstream emulation code, put the standard
63 // streams in the same namespace.
64 #if !@KWSYS_NAMESPACE@_IOS_USE_SSTREAM
65 namespace @KWSYS_NAMESPACE@_ios
67 typedef int streamsize;
68 typedef int streamoff;
69 using @KWSYS_NAMESPACE@_ios_namespace::ostream;
70 using @KWSYS_NAMESPACE@_ios_namespace::istream;
71 using @KWSYS_NAMESPACE@_ios_namespace::ios;
72 using @KWSYS_NAMESPACE@_ios_namespace::endl;
73 using @KWSYS_NAMESPACE@_ios_namespace::flush;
74 # if defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CIN)
75 using @KWSYS_NAMESPACE@_ios_namespace::__tcin;
76 # else
77 using @KWSYS_NAMESPACE@_ios_namespace::cin;
78 # endif
79 # if defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_COUT)
80 using @KWSYS_NAMESPACE@_ios_namespace::__tcout;
81 # else
82 using @KWSYS_NAMESPACE@_ios_namespace::cout;
83 # endif
84 # if defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CERR)
85 using @KWSYS_NAMESPACE@_ios_namespace::__tcerr;
86 # else
87 using @KWSYS_NAMESPACE@_ios_namespace::cerr;
88 # endif
89 # if defined(@KWSYS_NAMESPACE@_IOS_HP_HACK_CLOG)
90 using @KWSYS_NAMESPACE@_ios_namespace::__tclog;
91 # else
92 using @KWSYS_NAMESPACE@_ios_namespace::clog;
93 # endif
95 #endif
97 #ifdef _MSC_VER
98 # pragma warning(pop)
99 #endif
101 #endif