| 155 | size_t size_ = 0; |
| 156 | |
| 157 | explicit MMapImpl(const std::string& fn) { |
| 158 | map_.open(boost::filesystem::path(IfcUtil::path::from_utf8(fn))); |
| 159 | if (!map_.is_open()) throw std::runtime_error("Failed to open mapped_file_source"); |
| 160 | size_ = static_cast<size_t>(map_.size()); |
| 161 | } |
| 162 | |
| 163 | size_t size() const override { return size_; } |
| 164 |