summaryrefslogtreecommitdiff
path: root/ACE/ace/streams.h
blob: d26ceb73dd70759db5c5261d5a2729baae9fb7bc (plain)
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
// -*- C++ -*-

//=============================================================================
/**
 *  @file    streams.h
 *
 *  $Id$
 *
 *  @author Irfan Pyarali
 *
 *  This file contains the portability ugliness for the Standard C++
 *  Library.  As implementations of the "standard" emerge, this file
 *  will need to be updated.
 *
 *  This files deals with the streams includes.
 *
 *
 */
//=============================================================================


#ifndef ACE_STREAMS_H
#define ACE_STREAMS_H
#include /**/ "ace/pre.h"

#include /**/ "ace/config-all.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

// Do this so the #pragma warning in the MSVC headers do not
// affect our #pragma warning settings
#if defined (_MSC_VER)
#pragma warning(push)
#endif /* _MSC_VER*/


#if !defined (ACE_LACKS_IOSTREAM_TOTALLY)

#  if defined (ACE_HAS_STANDARD_CPP_LIBRARY)  && \
      (ACE_HAS_STANDARD_CPP_LIBRARY != 0)

#   if defined (_MSC_VER)
#     pragma warning(disable: 4018 4114 4146 4245)
#     pragma warning(disable: 4663 4664 4665 4511 4512)
#   endif /* _MSC_VER */

#   if defined (ACE_USES_OLD_IOSTREAMS)
#     include /**/ <iostream.h>
#     include /**/ <fstream.h>
  // This has been commented as it is not needed and causes problems with Qt.
  // (brunsch) But has been uncommented since it should be included.  Qt
  // probably should have some sort of macro that will prevent including this
  // when it is used.
#     include /**/ <iomanip.h>
#   else
#     if defined (__BORLANDC__) && (__BORLANDC__ == 0x551)
#       include /**/ <iterator>
#     endif /* __BORLANDC__ && __BORLANDC__ == 0x551 */
#     include /**/ <iostream>
#     include /**/ <fstream>
#     include /**/ <istream>
#     include /**/ <ostream>
#     include /**/ <streambuf>
#     include /**/ <iomanip>
#     include /**/ <ios>
#   endif /* ACE_USES_OLD_IOSTREAMS */

#   if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \
       (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0)

#     if !defined (ACE_USES_OLD_IOSTREAMS)
        // Make these available in the global name space
        using std::ios;
        using std::ios_base;
        using std::streambuf;
        using std::istream;
        using std::ostream;
        using std::iostream;
        using std::filebuf;
        using std::ifstream;
        using std::ofstream;
        using std::fstream;

        using std::cin;
        using std::cout;
        using std::cerr;
        using std::clog;

        using std::endl;
        using std::ends;
        using std::flush;

        using std::ws;

        using std::resetiosflags;
        using std::setfill;
        using std::setiosflags;
        using std::setprecision;
        using std::setw;

        using std::dec;
        using std::hex;
        using std::oct;
#     endif /* ! ACE_USES_OLD_IOSTREAMS */

#   endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */

#   if defined (_MSC_VER)
#     pragma warning(4: 4018 4114 4146 4245)
#     pragma warning(4: 4663 4664 4665 4512 4511)
#   endif /* _MSC_VER */

# else /* ! ACE_HAS_STANDARD_CPP_LIBRARY */

#   include /**/ <fstream.h>
#   include /**/ <iostream.h>
#   include /**/ <iomanip.h>

#   if defined (ACE_WIN32) && !defined(__MINGW32__)
#     if defined(_MSC_VER) // VSB
#       include /**/ <ios.h>
#       include /**/ <streamb.h>
#       include /**/ <istream.h>
#       include /**/ <ostream.h>
#     endif /* _MSC_VER */
#   endif /* ACE_WIN32 && !__MINGW32__ */

# endif /* ! ACE_HAS_STANDARD_CPP_LIBRARY */

#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */

// Do this so the #pragma warning in the MSVC headers do not
// affect our #pragma warning settings
#if defined (_MSC_VER)
#pragma warning(pop)
#endif /* _MSC_VER */

#include /**/ "ace/post.h"
#endif /* ACE_STREAMS_H */