35 return text_data(std::istreambuf_iterator<char>(handle),
36 std::istreambuf_iterator<char>());
46 if (
auto && handle = std::fstream(filename,
std::ios_base::in | std::ios_base::binary))
47 return binary_data(std::istreambuf_iterator<char>(handle),
48 std::istreambuf_iterator<char>());
59 if (
auto && handle = std::fstream(filename,
std::ios_base::out | std::ios_base::binary))
61 std::copy(data.begin(), data.end(), std::ostreambuf_iterator<char>(handle));
74 if (
auto && handle = std::fstream(filename,
std::ios_base::out | std::ios_base::binary))
76 std::copy(data.begin(), data.end(), std::ostreambuf_iterator<char>(handle));
int64_t unsigned long void * data
virtual void write_binary(const filename_type &filename, const binary_data &data) const
virtual text_data read_text(const filename_type &filename) const
std::string filename_type
virtual void write_text(const filename_type &filename, const text_data &data) const
virtual binary_data read_binary(const filename_type &filename) const
std::vector< char > binary_data