MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / ObjectFileReader

Class ObjectFileReader

Tactility/Include/Tactility/file/ObjectFile.h:14–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace tt::file {
13
14class ObjectFileReader {
15
16 const std::string filePath;
17 const uint32_t recordSize = 0;
18
19 std::unique_ptr<FILE, FileCloser> file;
20 uint32_t recordCount = 0;
21 uint32_t recordVersion = 0;
22 uint32_t recordsRead = 0;
23
24public:
25
26 ObjectFileReader(std::string filePath, uint32_t recordSize) :
27 filePath(std::move(filePath)),
28 recordSize(recordSize)
29 {}
30
31 bool open();
32 void close();
33
34 bool hasNext() const { return recordsRead < recordCount; }
35 bool readNext(void* output);
36
37 uint32_t getRecordCount() const { return recordCount; }
38 uint32_t getRecordSize() const { return recordSize; }
39 uint32_t getRecordVersion() const { return recordVersion; }
40};
41
42class ObjectFileWriter {
43

Callers 2

ObjectFileTest.cppFile · 0.85
getGpsConfigurationsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected