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

Method ReadMdComment

lib/mdflib/mdflib/src/mdfblock.cpp:498–505  ·  view source on GitHub ↗

std::size_t MdfBlock::ReadBool(std::FILE *file, bool &dest) const { uint16_t temp = 0; auto bytes = ReadNumber(file, temp); dest = temp != 0; return bytes; } std::size_t MdfBlock::WriteBool(std::FILE *file, bool value) const { const uint16_t temp = value ? 1 : 0; return WriteNumber(file, temp); } */

Source from the content-addressed store, hash-verified

496}
497*/
498void MdfBlock::ReadMdComment(std::streambuf& buffer, size_t index_md) {
499 if (!md_comment_ && Link(index_md) > 0) {
500 md_comment_ = std::make_unique<Md4Block>();
501 md_comment_->Init(*this);
502 SetFilePosition(buffer, Link(index_md));
503 md_comment_->Read(buffer);
504 }
505}
506
507void MdfBlock::WriteMdComment(std::streambuf& buffer, size_t index_md) {
508 if (md_comment_ && Link(index_md) == 0) {

Callers

nothing calls this directly

Calls 3

SetFilePositionFunction · 0.85
InitMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected