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

Method WriteReferences

lib/mdflib/mdflib/src/ca4block.cpp:674–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674size_t Ca4Block::WriteReferences(std::streambuf& buffer,
675 const std::vector<CaTripleReference>& list,
676 size_t max_fill,
677 size_t start_index) {
678 size_t nof_links = 0;
679 for (size_t index = 0; index < max_fill; ++index) {
680 if (index < list.size()) {
681 const auto& ref = list[index];
682 WriteReference(buffer, ref, start_index + nof_links);
683 UpdateLink(buffer, start_index + nof_links,
684 ref.DataGroup != nullptr ? ref.DataGroup->Index() : 0 );
685 } else {
686 UpdateLink(buffer, start_index + nof_links,0 );
687 UpdateLink(buffer, start_index + nof_links + 1, 0 );
688 UpdateLink(buffer, start_index + nof_links + 2, 0 );
689 }
690 nof_links += 3;
691 }
692 return nof_links;
693}
694
695void Ca4Block::SetParentChannel(const Cn4Block* parent) {
696 parent_channel_ = parent;

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
IndexMethod · 0.45

Tested by

no test coverage detected