| 81 | } |
| 82 | |
| 83 | uint64_t Tx4Block::Write(std::streambuf& buffer) { |
| 84 | const bool update = FilePosition() > 0; |
| 85 | if (update) { |
| 86 | return block_size_; |
| 87 | } |
| 88 | const bool is_xml = !text_.empty() && text_[0] == '<'; |
| 89 | block_type_ = is_xml ? "##MD" : "##TX"; |
| 90 | block_size_ = static_cast<uint16_t>(24 + text_.size() + 1); |
| 91 | link_list_.clear(); |
| 92 | |
| 93 | uint64_t bytes = MdfBlock::Write(buffer); |
| 94 | bytes += WriteStr(buffer, text_, text_.size()); |
| 95 | bytes += WriteBytes(buffer, 1); |
| 96 | UpdateBlockSize(buffer, bytes); |
| 97 | return bytes; |
| 98 | } |
| 99 | |
| 100 | std::string Tx4Block::Text() const { |
| 101 | std::string temp = text_; |
nothing calls this directly
no test coverage detected