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

Method FindReferencedBlocks

lib/mdflib/mdflib/src/ev4block.cpp:312–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312void Ev4Block::FindReferencedBlocks(const Hd4Block &hd4) {
313 parent_event_ = dynamic_cast<const Ev4Block *>(hd4.Find(Link(kIndexParent)));
314 range_event_ = dynamic_cast<const Ev4Block *>(hd4.Find(Link(kIndexRange)));
315 scope_list_.clear();
316 for (size_t index_m = 0; index_m < length_m_; ++index_m) {
317 const auto index = 5 + index_m;
318 if (index < link_list_.size()) {
319 scope_list_.push_back(hd4.Find(Link(index)));
320 }
321 }
322
323 attachment_list_.clear();
324 for (size_t index_n = 0; index_n < length_n_; ++index_n) {
325 const auto index = 5 + length_m_ + index_n;
326 if (index < link_list_.size()) {
327 attachment_list_.push_back(
328 dynamic_cast<const At4Block *>(hd4.Find(Link(index))));
329 }
330 }
331}
332
333} // namespace mdf::detail

Callers 1

ReadEverythingButDataMethod · 0.45

Calls 3

FindMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected