| 39 | IHeader *Mdf3File::Header() const { return hd_block_.get(); } |
| 40 | |
| 41 | void Mdf3File::ReadHeader(std::streambuf& buffer) { |
| 42 | if (!id_block_) { |
| 43 | id_block_ = std::make_unique<IdBlock>(); |
| 44 | } |
| 45 | if (id_block_->FilePosition() < 0) { |
| 46 | SetFilePosition(buffer, 0); |
| 47 | id_block_->Read(buffer); |
| 48 | } |
| 49 | |
| 50 | if (!hd_block_) { |
| 51 | hd_block_ = std::make_unique<Hd3Block>(); |
| 52 | } |
| 53 | if (hd_block_->FilePosition() <= 0) { |
| 54 | hd_block_->Init(*id_block_); |
| 55 | SetFilePosition(buffer, 64); |
| 56 | hd_block_->Read(buffer); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | void Mdf3File::ReadMeasurementInfo(std::streambuf& buffer) { |
| 61 | ReadHeader(buffer); |
nothing calls this directly
no test coverage detected