C++ Utilities
4.17.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
The CopyHelper class helps to copy bytes from one stream to another. More...
#include <copy.h>
Public Member Functions | |
CopyHelper () | |
Constructs a new copy helper. More... | |
void | copy (std::istream &input, std::ostream &output, std::size_t count) |
Copies count bytes from input to output. More... | |
void | callbackCopy (std::istream &input, std::ostream &output, std::size_t count, const std::function< bool(void)> &isAborted, const std::function< void(double)> &callback) |
Copies count bytes from input to output. More... | |
char * | buffer () |
Returns the internal buffer. More... | |
The CopyHelper class helps to copy bytes from one stream to another.
Specifies | the buffer size. |
IoUtilities::CopyHelper< bufferSize >::CopyHelper | ( | ) |
char * IoUtilities::CopyHelper< bufferSize >::buffer | ( | ) |
void IoUtilities::CopyHelper< bufferSize >::callbackCopy | ( | std::istream & | input, |
std::ostream & | output, | ||
std::size_t | count, | ||
const std::function< bool(void)> & | isAborted, | ||
const std::function< void(double)> & | callback | ||
) |
Copies count bytes from input to output.
The procedure might be aborted and progress updates will be reported.
Copying is aborted when isAborted returns true. The current progress is reported by calling the specified callback function.
void IoUtilities::CopyHelper< bufferSize >::copy | ( | std::istream & | input, |
std::ostream & | output, | ||
std::size_t | count | ||
) |