File indexing completed on 2025-01-18 09:42:46
0001
0002
0003
0004
0005
0006
0007 #ifndef BOOST_NOWIDE_IOSTREAM_HPP_INCLUDED
0008 #define BOOST_NOWIDE_IOSTREAM_HPP_INCLUDED
0009
0010 #include <boost/nowide/config.hpp>
0011 #ifdef BOOST_WINDOWS
0012 #include <istream>
0013 #include <memory>
0014 #include <ostream>
0015
0016 #include <boost/config/abi_prefix.hpp> // must be the last #include
0017 #else
0018 #include <iostream>
0019 #endif
0020
0021 #ifdef BOOST_MSVC
0022 #pragma warning(push)
0023 #pragma warning(disable : 4251)
0024 #endif
0025
0026 namespace boost {
0027 namespace nowide {
0028 #if !defined(BOOST_WINDOWS) && !defined(BOOST_NOWIDE_DOXYGEN)
0029 using std::cout;
0030 using std::cerr;
0031 using std::cin;
0032 using std::clog;
0033 #else
0034
0035
0036 namespace detail {
0037 class console_output_buffer;
0038 class console_input_buffer;
0039
0040 class BOOST_NOWIDE_DECL winconsole_ostream : public std::ostream
0041 {
0042 public:
0043 winconsole_ostream(bool isBuffered, winconsole_ostream* tieStream);
0044 ~winconsole_ostream();
0045
0046 private:
0047 std::unique_ptr<console_output_buffer> d;
0048
0049 std::ios_base::Init init_;
0050 };
0051
0052 class BOOST_NOWIDE_DECL winconsole_istream : public std::istream
0053 {
0054 public:
0055 explicit winconsole_istream(winconsole_ostream* tieStream);
0056 ~winconsole_istream();
0057
0058 private:
0059 std::unique_ptr<console_input_buffer> d;
0060
0061 std::ios_base::Init init_;
0062 };
0063 }
0064
0065
0066
0067
0068
0069
0070
0071
0072 extern BOOST_NOWIDE_DECL detail::winconsole_istream cin;
0073
0074
0075
0076
0077
0078 extern BOOST_NOWIDE_DECL detail::winconsole_ostream cout;
0079
0080
0081
0082
0083
0084 extern BOOST_NOWIDE_DECL detail::winconsole_ostream cerr;
0085
0086
0087
0088
0089
0090 extern BOOST_NOWIDE_DECL detail::winconsole_ostream clog;
0091
0092 #endif
0093
0094 }
0095 }
0096
0097 #ifdef BOOST_MSVC
0098 #pragma warning(pop)
0099 #endif
0100
0101 #ifdef BOOST_WINDOWS
0102 #include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
0103 #endif
0104
0105 #endif