This header file includes <strf.hpp>
|
namespace strf {
template <typename CharT, typename Traits = std::char_traits<CharT> >
class basic_streambuf_writer final: public destination<CharT>
{ /*...*/ };
using streambuf_writer = basic_streambuf_writer<char>;
using wstreambuf_writer = basic_streambuf_writer<wchar_t>;
template <typename CharT, typename Traits>
/* ... */ to(std::basic_streambuf<CharT, Traits>& dest);
template <typename CharT, typename Traits>
/* ... */ to(std::basic_streambuf<CharT, Traits>* dest);
} // namespace strf
1. Class template basic_streambuf_writer
1.1. Synopsis
namespace strf {
template <typename CharT, typename Traits = std::char_traits<CharT> >
class basic_streambuf_writer final: public destination<CharT> {
public:
explicit basic_streambuf_writer(std::basic_streambuf<CharT, Traits>& dest);
explicit basic_streambuf_writer(std::basic_streambuf<CharT, Traits>* dest);
basic_streambuf_writer(const basic_streambuf_writer&) = delete;
basic_streambuf_writer(basic_streambuf_writer&&) = delete;
~basic_streambuf_writer();
void recycle() override;
struct result {
std::streamsize count;
bool success;
};
result finish();
};
// Global type aliases
using streambuf_writer
= basic_streambuf_writer<char, std::char_traits<char> >;
using wstreambuf_writer
= basic_streambuf_writer<wchar_t, std::char_traits<wchar_t> >;
} // namespace strf
1.2. Public member functions
~basic_streambuf_writer();
Effect |
Calls |
void recycle() override;
Effects |
|
Postconditions |
|
result finish();
Effects |
|
Return value |
|
2. Function templates to
namespace strf {
template <typename CharT, typename Traits>
/* see below */ to(std::basic_streambuf<CharT, Traits>& dest);
template <typename CharT, typename Traits>
/* see below */ to(std::basic_streambuf<CharT, Traits>* dest);
} // namespace strf
Return type |
|
Return value |
An object whose
|