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

Method RedrawDgBlock

lib/mdflib/mdfviewer/src/childframe.cpp:716–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714}
715
716void ChildFrame::RedrawDgBlock(const detail::Dg4Block &dg4, const wxTreeItemId &root) {
717 std::ostringstream label;
718 label << dg4.BlockType();
719 const std::string desc = dg4.Description();
720
721 if (!desc.empty()) {
722 label << " (" << desc << ")";
723 } else if (dg4.Cg4().size() == 1) {
724 std::ostringstream sub;
725 const auto* cg4 = dg4.Cg4().front().get();
726 if (cg4 != nullptr) {
727 sub << cg4->Name();
728 sub << " Samples: " << cg4->NofSamples();
729 label << " (" << sub.str() << ")";
730 }
731
732 // If the DG only have one CG, use the CG Name instead
733
734 }
735 auto root_dg = left_->AppendItem(root, label.str(), TREE_DG, TREE_DG,
736 new BlockAddress(dg4.FilePosition()));
737 RedrawDataList(dg4,root_dg);
738 RedrawCgList(dg4, root_dg);
739
740}
741
742void ChildFrame::RedrawDgBlock(const detail::Dg3Block &dg3, const wxTreeItemId &root) {
743 auto root_dg = left_->AppendItem(root, CreateBlockText(dg3),

Callers

nothing calls this directly

Calls 10

CreateBlockTextFunction · 0.85
emptyMethod · 0.80
Tr3Method · 0.80
BlockTypeMethod · 0.45
DescriptionMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45
NameMethod · 0.45
NofSamplesMethod · 0.45
FilePositionMethod · 0.45

Tested by

no test coverage detected