| 23 | IHeader *Mdf4File::Header() const { return hd_block_.get(); } |
| 24 | |
| 25 | void Mdf4File::ReadHeader(std::streambuf& buffer) { |
| 26 | if (!id_block_) { |
| 27 | id_block_ = std::make_unique<IdBlock>(); |
| 28 | SetFilePosition(buffer, 0); |
| 29 | id_block_->Read(buffer); |
| 30 | } |
| 31 | if (!hd_block_) { |
| 32 | hd_block_ = std::make_unique<Hd4Block>(); |
| 33 | hd_block_->Init(*id_block_); |
| 34 | SetFilePosition(buffer, 64); |
| 35 | hd_block_->Read(buffer); |
| 36 | } |
| 37 | |
| 38 | |
| 39 | } |
| 40 | |
| 41 | void Mdf4File::ReadMeasurementInfo(std::streambuf& buffer) { |
| 42 | ReadHeader(buffer); |