cpp-mate
0.7
Helpful library for C++.
|
Represents sink implementation which splits source data into chunks with specified size. More...
#include <BinarySink.hpp>
Public Member Functions | |
Counter (BinarySink &sink) | |
Constructor. More... | |
Counter (std::shared_ptr< BinarySink > sink) | |
Constructor. More... | |
uint64_t | getBytesWritten () const |
Returns total bytes written into the sink. More... | |
void | resetCounter () |
Resets counter. More... | |
void | write (const void *data, uint64_t size) override |
Writes data into the sink. More... | |
![]() | |
virtual | ~BinarySink ()=default |
Represents sink implementation which splits source data into chunks with specified size.
|
inline |
Constructor.
sink | the underlying sink. |
|
inline |
Constructor.
sink | the underlying sink. |
std::invalid_argument |
|
inline |
Returns total bytes written into the sink.
|
inline |
Resets counter.
|
inlineoverridevirtual |
Writes data into the sink.
data | the pointer to data. |
size | the size of data. |
std::invalid_argument,std::ostream::failure |
Implements CppMate::BinarySink.