MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / GetFilePosition

Function GetFilePosition

lib/mdflib/mdflib/src/mdfblock.cpp:139–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137*/
138
139int64_t GetFilePosition(std::streambuf& buffer) {
140 const auto pos = buffer.pubseekoff(0, std::ios_base::cur);
141 if (pos < 0) {
142 throw std::ios_base::failure("Failed to get a stream position");
143 }
144 return pos;
145}
146
147int64_t GetLastFilePosition(std::streambuf& buffer) {
148 const auto pos = buffer.pubseekoff(0, std::ios_base::end);

Callers 15

TESTFunction · 0.85
ReadMethod · 0.85
ReadMethod · 0.85
ReadMethod · 0.85
ReadMethod · 0.85
ReadMethod · 0.85
WriteMethod · 0.85
ReadMethod · 0.85
WriteMethod · 0.85
ReadMethod · 0.85
ReadMethod · 0.85
WriteMethod · 0.85

Calls 1

failureFunction · 0.85

Tested by 1

TESTFunction · 0.68