FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
Loading...
Searching...
No Matches
key.cpp File Reference
#include <fcb/generated/header_generated.h>
#include <fcb/key.hpp>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  fcb
 

Macros

#define FCB_KV_INT(NAME, TYPE, KIND, FIELD)
 

Functions

std::size_t fcb::key_serialized_size (KeyKind kind)
 Serialized width in bytes. DateTime is 12: i64 seconds + u32 nanos.
 
std::vector< std::uint8_t > fcb::encode_key (const KeyValue &v)
 
KeyValue fcb::decode_key (KeyKind kind, bytes_view b)
 
int fcb::compare_keys (const KeyValue &a, const KeyValue &b)
 Three-way comparison.
 
KeyValue fcb::key_min (KeyKind kind)
 Sentinels used to lower open-ended range queries.
 
KeyValue fcb::key_max (KeyKind kind)
 
KeyKind fcb::key_kind_for_column (std::uint8_t column_type)
 Column type to key kind, following what the WRITER emits.
 

Macro Definition Documentation

◆ FCB_KV_INT

#define FCB_KV_INT (   NAME,
  TYPE,
  KIND,
  FIELD 
)
Value:
KeyValue KeyValue::NAME(TYPE v) { \
KeyValue k; \
k.kind_ = KeyKind::KIND; \
k.FIELD = static_cast<decltype(k.FIELD)>(v); \
return k; \
}

Definition at line 90 of file key.cpp.