9 #ifndef CPPCOMMON_UTILITY_IOSTREAM_H
10 #define CPPCOMMON_UTILITY_IOSTREAM_H
23 {
return stream <<
'\'' << writer._ch <<
'\''; }
25 {
return stream <<
'\'' << writer._ch <<
'\''; }
38 {
return stream <<
'\'' << (char)writer._ch <<
'\''; }
40 {
return stream <<
'\'' << writer._ch <<
'\''; }
51 explicit WriteString(
const char (&str)[N]) : _str(str), _size(N) {}
56 stream.write(writer._str, writer._size);
63 for (
size_t i = 0; i < writer._size; ++i)
64 stream << writer._str[i];
79 explicit WriteWString(
const wchar_t (&str)[N]) : _str(str), _size(N) {}
84 for (
size_t i = 0; i < writer._size; ++i)
85 stream << (
char)writer._str[i];
92 stream.write(writer._str, writer._size);
Write character stream manipulator.
friend std::wostream & operator<<(std::wostream &stream, const WriteChar &writer)
friend std::ostream & operator<<(std::ostream &stream, const WriteChar &writer)
Write string stream manipulator.
WriteString(const char(&str)[N])
friend std::wostream & operator<<(std::wostream &stream, const WriteString &writer)
friend std::ostream & operator<<(std::ostream &stream, const WriteString &writer)
Write wide character stream manipulator.
friend std::wostream & operator<<(std::wostream &stream, const WriteWChar &writer)
friend std::ostream & operator<<(std::ostream &stream, const WriteWChar &writer)
Write wide string stream manipulator.
friend std::ostream & operator<<(std::ostream &stream, const WriteWString &writer)
WriteWString(const wchar_t(&str)[N])
friend std::wostream & operator<<(std::wostream &stream, const WriteWString &writer)
C++ Common project definitions.