| 517 | } |
| 518 | |
| 519 | void Cc4Block::Formula(const std::string& formula) { |
| 520 | // The formula should be place in ref_list[0]. |
| 521 | constexpr size_t index = 0; |
| 522 | while (index >= ref_list_.size()) { |
| 523 | auto temp = std::make_unique<Tx4Block>(); |
| 524 | ref_list_.emplace_back(std::move(temp)); |
| 525 | } |
| 526 | auto* tx4 = dynamic_cast<Tx4Block*>(ref_list_[0].get()); |
| 527 | if (tx4 != nullptr) { |
| 528 | tx4->Text(formula); |
| 529 | } |
| 530 | IChannelConversion::Formula(formula); |
| 531 | } |
| 532 | |
| 533 | const std::string& Cc4Block::Formula() const { |
| 534 | const auto* tx4 = ref_list_.empty() ? nullptr : |
no test coverage detected