|
FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
|
Local-file adapter. More...
#include <fcb/range_reader.hpp>
Public Member Functions | |
| FileRangeReader (const std::string &path) | |
| std::uint64_t | total_size () override |
| Total byte length of the resource. | |
| std::vector< std::uint8_t > | read (std::uint64_t offset, std::uint64_t length) override |
Read length bytes at offset, subject to the contract above. | |
Public Member Functions inherited from fcb::RangeReader | |
| virtual | ~RangeReader ()=default |
| virtual void | read_batch (std::vector< RangeRequest > &requests) |
| Fill every request, preserving order. | |
Local-file adapter.
Definition at line 72 of file range_reader.hpp.
|
explicit |
Definition at line 17 of file range_reader.cpp.
References fcb::IoError.
|
overridevirtual |
Read length bytes at offset, subject to the contract above.
Implements fcb::RangeReader.
Definition at line 27 of file range_reader.cpp.
References fcb::IoError, and offset.
|
overridevirtual |
Total byte length of the resource.
This is a REQUIRED bounds/security contract, not a convenience: every computed section offset and range request is validated against it, so a corrupt header cannot make the core read or allocate out of bounds. (It is NOT needed to size the last feature – every feature carries its own 4-byte size prefix.)
Implements fcb::RangeReader.
Definition at line 25 of file range_reader.cpp.