| 107 | } |
| 108 | |
| 109 | uint64_t Si4Block::Write(std::streambuf& buffer) { |
| 110 | const bool update = FilePosition() > 0; // True if already written to file |
| 111 | if (update) { |
| 112 | return block_length_; |
| 113 | } |
| 114 | |
| 115 | block_type_ = "##SI"; |
| 116 | block_length_ = 24 + (3 * 8) + 1 + 1 + 1 + 5; |
| 117 | link_list_.resize(3, 0); |
| 118 | WriteTx4(buffer, kIndexName, name_); |
| 119 | WriteTx4(buffer, kIndexPath, path_); |
| 120 | WriteMdComment(buffer, kIndexMd); |
| 121 | |
| 122 | uint64_t bytes = MdfBlock::Write(buffer); |
| 123 | bytes += WriteNumber(buffer, type_); |
| 124 | bytes += WriteNumber(buffer, bus_type_); |
| 125 | bytes += WriteNumber(buffer, flags_); |
| 126 | bytes += WriteBytes(buffer, 5); |
| 127 | UpdateBlockSize(buffer, bytes); |
| 128 | return bytes; |
| 129 | } |
| 130 | |
| 131 | int64_t Si4Block::Index() const { return FilePosition(); } |
| 132 |
nothing calls this directly
no test coverage detected