FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
Loading...
Searching...
No Matches
stree.hpp File Reference
#include <fcb/error.hpp>
#include <fcb/header.hpp>
#include <fcb/key.hpp>
#include <fcb/range_reader.hpp>
#include <cstdint>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  fcb::AttrCondition
 One condition of an attribute query. More...
 
struct  fcb::AttrQueryOptions
 
struct  fcb::StreeLevelBound
 Half-open [start, end) node index range for one tree level, in the flat node array shared by every level. More...
 

Namespaces

namespace  fcb
 

Typedefs

using fcb::AttrQuery = std::vector< AttrCondition >
 

Enumerations

enum class  fcb::Operator {
  fcb::Eq , fcb::Ne , fcb::Gt , fcb::Ge ,
  fcb::Lt , fcb::Le
}
 Comparison operators the attribute index supports. More...
 

Functions

bool fcb::is_payload_ref (std::uint64_t off)
 
std::uint64_t fcb::payload_offset (std::uint64_t off)
 
std::uint64_t fcb::stree_num_nodes (std::uint64_t num_items, std::uint16_t branching_factor)
 Total node count.
 
std::vector< StreeLevelBoundfcb::stree_level_bounds (std::uint64_t num_items, std::uint16_t branching_factor)
 Mirrors Stree::generate_level_bounds (stree.rs:474-508).
 
std::vector< std::uint64_t > fcb::decode_payload_entry (bytes_view b)
 Decode a payload entry: u32 count then count x u64, all little-endian.
 
void fcb::encode_payload_entry (std::vector< std::uint8_t > &out, const std::vector< std::uint64_t > &offsets)
 Encode a payload entry: u32 count then count x u64, all little-endian (mirrors PayloadEntry::serialize, payload.rs:42-49).
 
std::vector< SearchResultItemfcb::stree_query (RangeReader &reader, const AttrIndexInfo &index, KeyKind kind, Operator op, const KeyValue &value)
 Run one condition against one column's index blob, returning candidate feature offsets (relative to the features section).
 

Variables

constexpr std::uint64_t fcb::kPayloadTag = 1ULL << 63
 The MSB of a leaf offset marks a payload reference rather than a direct feature offset (stree.rs:15-17).
 
constexpr std::uint64_t fcb::kPayloadMask = ~kPayloadTag