|
FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
|
Classes | |
| struct | FeatureAccess |
| Internal gateway to Feature's generated FlatBuffers pointer. More... | |
| struct | HeaderAccess |
| Internal gateway to HeaderView's generated FlatBuffers pointer. More... | |
Functions | |
| std::uint64_t | checked_add (std::uint64_t a, std::uint64_t b, const char *what="add") |
| std::uint64_t | checked_mul (std::uint64_t a, std::uint64_t b, const char *what="mul") |
| std::uint64_t | ceil_div (std::uint64_t a, std::uint64_t b) |
| ceil(a / b) without the (a + b - 1) overflow hazard. | |
| std::uint64_t | range_end (std::uint64_t offset, std::uint64_t length) |
| End of a range, checked. | |
| void | require_within (std::uint64_t offset, std::uint64_t length, std::uint64_t limit, const char *what) |
Throws unless [offset, offset+length) lies wholly within limit. | |
|
inline |
ceil(a / b) without the (a + b - 1) overflow hazard.
Throws on b == 0 rather than trapping, because callers pass file-supplied divisors.
Definition at line 34 of file checked.hpp.
References ceil_div(), and fcb::IllegalHeaderSize.
Referenced by ceil_div(), fcb::rtree_level_bounds(), fcb::rtree_num_nodes(), fcb::stree_level_bounds(), and fcb::stree_num_nodes().
|
inline |
Definition at line 16 of file checked.hpp.
References checked_add(), and fcb::IllegalHeaderSize.
Referenced by checked_add(), fcb::FeatureIterator::next(), range_end(), fcb::rtree_level_bounds(), fcb::rtree_num_nodes(), fcb::rtree_search_bbox(), fcb::stree_level_bounds(), fcb::stree_num_nodes(), and fcb::stree_query().
|
inline |
Definition at line 24 of file checked.hpp.
References checked_mul(), and fcb::IllegalHeaderSize.
Referenced by checked_mul(), fcb::rtree_search_bbox(), and fcb::stree_query().
|
inline |
End of a range, checked.
Use at EVERY place that forms offset+length: cache coverage tests, feature cursor advance, node slab bounds, payload entry bounds, and HTTP Range header construction.
Definition at line 44 of file checked.hpp.
References checked_add(), and offset.
Referenced by fcb::CurlRangeReader::read(), and require_within().
|
inline |
Throws unless [offset, offset+length) lies wholly within limit.
Definition at line 49 of file checked.hpp.
References fcb::IllegalHeaderSize, offset, and range_end().
Referenced by fcb::FeatureIterator::next().