Sink wrapper that counts the number of bytes written through it. More...
#include <staticlib/io/counting_sink.hpp>
Public Member Functions | |
| counting_sink (Sink &&sink) | |
| Constructor, created sink wrapper will own specified sink. | |
| counting_sink (const counting_sink &) | |
| Deleted copy constructor. | |
| counting_sink & | operator= (const counting_sink &) |
| Deleted copy assignment operator. | |
| counting_sink (counting_sink &&other) STATICLIB_NOEXCEPT | |
| Move constructor. | |
| counting_sink & | operator= (counting_sink &&other) STATICLIB_NOEXCEPT |
| Move assignment operator. | |
| std::streamsize | write (span< const char > span) |
| Counting write implementation. | |
| std::streamsize | flush () |
| Flushes destination sink. | |
| size_t | get_count () |
| Returns number of bytes written through this instance. | |
| Sink & | get_sink () |
| Underlying sink accessor. | |
Sink wrapper that counts the number of bytes written through it.
|
inlineexplicit |
Constructor, created sink wrapper will own specified sink.
| sink | destination sink |
| staticlib::io::counting_sink< Sink >::counting_sink | ( | const counting_sink< Sink > & | ) |
Deleted copy constructor.
| other | instance |
|
inline |
Move constructor.
| other | other instance |
|
inline |
Flushes destination sink.
|
inline |
Returns number of bytes written through this instance.
|
inline |
Underlying sink accessor.
| counting_sink& staticlib::io::counting_sink< Sink >::operator= | ( | const counting_sink< Sink > & | ) |
Deleted copy assignment operator.
| other | instance |
|
inline |
Move assignment operator.
| other | other instance |
|
inline |
Counting write implementation.
| span | buffer span |
1.8.1.2