Loading...
Searching...
No Matches
q3.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * Q3BinaryRecordFormat — raw sequential binary record I/O.
5 *
6 * No record framing — data is written as raw bytes. Used by Q3's
7 * native checkpoint format for compact, fast serialization.
8 */
9
11
12namespace q3 {
13
15 public:
16 void write_record(std::ofstream& output_file,
17 const void* data,
18 int32_t number_of_bytes) const override {
19 output_file.write(reinterpret_cast<const char*>(data), number_of_bytes);
20 }
21
22 void
23 read_record(std::ifstream& input_file, void* data, int32_t number_of_bytes) const override {
24 input_file.read(reinterpret_cast<char*>(data), number_of_bytes);
25 }
26};
27
28} // namespace q3
void read_record(std::ifstream &input_file, void *data, int32_t number_of_bytes) const override
Definition q3.hpp:23
void write_record(std::ofstream &output_file, const void *data, int32_t number_of_bytes) const override
Definition q3.hpp:16