8 #ifndef BOOST_NOWIDE_DETAIL_CONSOLE_BUFFER_HPP_INCLUDED 9 #define BOOST_NOWIDE_DETAIL_CONSOLE_BUFFER_HPP_INCLUDED 12 #include <boost/nowide/utf/utf.hpp> 16 #include <boost/config/abi_prefix.hpp> 24 class BOOST_NOWIDE_DECL console_output_buffer_base :
public std::streambuf
28 int overflow(
int c)
override;
34 int write(
const char* p,
int n);
36 do_write(
const wchar_t* buffer, std::size_t num_chars_to_write, std::size_t& num_chars_written) = 0;
38 static constexpr
int buffer_size = 1024;
39 static constexpr
int wbuffer_size = buffer_size * encoder::max_width;
40 char buffer_[buffer_size];
41 wchar_t wbuffer_[wbuffer_size];
46 #pragma warning(disable : 4251) 49 class BOOST_NOWIDE_DECL console_input_buffer_base :
public std::streambuf
53 int pbackfail(
int c)
override;
54 int underflow()
override;
61 virtual bool do_read(
wchar_t* buffer, std::size_t num_chars_to_read, std::size_t& num_chars_read) = 0;
63 static constexpr
size_t wbuffer_size = 1024;
64 static constexpr
size_t buffer_size = wbuffer_size * encoder::max_width;
65 char buffer_[buffer_size];
66 wchar_t wbuffer_[wbuffer_size];
68 std::vector<char> pback_buffer_;
69 bool was_newline_ =
true;
82 #include <boost/config/abi_suffix.hpp> UTF Traits class - functions to convert UTF sequences to and from Unicode code points.
Definition: utf.hpp:57