| 53 | } |
| 54 | |
| 55 | uint64_t Hl4Block::Write(std::streambuf& buffer) { |
| 56 | const bool update = |
| 57 | FilePosition() > 0; // Write or update the values inside the block |
| 58 | if (update) { |
| 59 | // Note that the block_list is used for the dl_list |
| 60 | WriteLink4List(buffer, block_list_,kIndexNext, |
| 61 | UpdateOption::DoNotUpdateWrittenBlock); // Only save non-updated |
| 62 | return block_length_; |
| 63 | } |
| 64 | |
| 65 | block_type_ = "##HL"; |
| 66 | block_length_ = 24 + (1*8) + 2 + 1 + 5; |
| 67 | link_list_.resize(1, 0); |
| 68 | |
| 69 | uint64_t bytes = MdfBlock::Write(buffer); |
| 70 | bytes += WriteNumber(buffer,flags_); |
| 71 | bytes += WriteNumber(buffer,type_); |
| 72 | bytes += WriteBytes(buffer, 5); |
| 73 | UpdateBlockSize(buffer, bytes); |
| 74 | |
| 75 | WriteLink4List(buffer, block_list_,kIndexNext, |
| 76 | UpdateOption::DoNotUpdateWrittenBlock); // Only save non-updated |
| 77 | return bytes; |
| 78 | } |
| 79 | } // namespace mdf::detail |
nothing calls this directly
no test coverage detected