| 555 | } |
| 556 | |
| 557 | void ChildFrame::RedrawCnBlock(const detail::Cn4Block &cn, |
| 558 | const wxTreeItemId &root) { |
| 559 | std::ostringstream sub_string; |
| 560 | const std::string cn_name = cn.Name(); |
| 561 | const std::string cn_unit = cn.Unit(); |
| 562 | |
| 563 | sub_string << cn_name; |
| 564 | if (!cn_unit.empty()) { |
| 565 | sub_string << " [" << cn_unit << "]"; |
| 566 | } |
| 567 | |
| 568 | std::ostringstream cn_string; |
| 569 | cn_string << cn.BlockType() << " (" << sub_string.str() << ")"; |
| 570 | |
| 571 | |
| 572 | for (size_t array = 0;cn.ChannelArray(array) != nullptr ; ++array) { |
| 573 | if (const auto* channel_array = cn.ChannelArray(array); channel_array != nullptr) { |
| 574 | cn_string << " " << channel_array->DimensionAsString(); |
| 575 | } |
| 576 | |
| 577 | } |
| 578 | |
| 579 | |
| 580 | auto cn_root = left_->AppendItem(root, wxString::FromUTF8(cn_string.str()), |
| 581 | TREE_CN, TREE_CN, new BlockAddress(cn.FilePosition())); |
| 582 | const auto* si = cn.Si(); |
| 583 | if (si != nullptr) { |
| 584 | RedrawSiBlock(*si,cn_root); |
| 585 | } |
| 586 | const auto* cc = cn.Cc(); |
| 587 | if (cc != nullptr) { |
| 588 | RedrawCcBlock(*cc,cn_root); |
| 589 | } |
| 590 | RedrawCxList(cn.Cx4(), cn_root); |
| 591 | RedrawDataList(cn, cn_root); |
| 592 | } |
| 593 | |
| 594 | void ChildFrame::RedrawCaBlock(const Ca4Block &ca4, const wxTreeItemId &root) { |
| 595 | const std::string type = ca4.TypeAsString(); |
nothing calls this directly
no test coverage detected