41 String RangeSpec::type_str(
int type) {
46 return (
String)
"metadata";
59 bool start_null = (start_row == 0) || (strlen(start_row)==0);
62 if (start_null || other_start_null) {
63 if (start_null != other_start_null)
70 if (end_row == 0 || other.
end_row == 0) {
75 if (strcmp(end_row, other.
end_row))
82 return !(*
this == other);
86 bool start_null = (start_row == 0) || (strlen(start_row)==0);
89 if (start_null || other_start_null) {
90 if (!other_start_null)
96 int cmpval = strcmp(start_row, other.
start_row);
103 bool end_null = (end_row==0) || (strlen(end_row)==0);
104 bool other_end_null = (other.
end_row == 0) || (strlen(other.
end_row)==0);
106 if (end_null || other_end_null) {
113 int cmpval = strcmp(end_row, other.
end_row);
123 uint8_t RangeSpec::encoding_version()
const {
127 size_t RangeSpec::encoded_length_internal()
const {
147 void RangeSpec::encode_internal(uint8_t **bufp)
const {
152 void RangeSpec::decode_internal(uint8_t version,
const uint8_t **bufp,
154 HT_TRY(
"decoding range spec",
159 void RangeSpecManaged::decode_internal(uint8_t version,
const uint8_t **bufp,
161 RangeSpec::decode_internal(version, bufp, remainp);
char * decode_vstr(const uint8_t **bufp, size_t *remainp)
Decode a vstr (vint64, data, null).
std::string String
A String is simply a typedef to std::string.
Program options handling.
size_t encoded_length_vstr(size_t len)
Computes the encoded length of vstr (vint64, data, null)
Logging routines and macros.
Compatibility Macros for C/C++.
#define HT_DUMP_CSTR(_os_, _label_, _str_)
std::ostream & operator<<(std::ostream &os, const crontab_entry &entry)
Helper function to write crontab_entry to an ostream.
Functions to serialize/deserialize primitives to/from a memory buffer.
bool operator==(const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs)
Declarations for RangeSpec and RangeSpecManaged.
bool operator!=(const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs)
void encode_vstr(uint8_t **bufp, const void *buf, size_t len)
Encode a buffer as variable length string (vint64, data, null)
bool operator<(const directory_entry< _Key, _Tp > &lhs, const directory_entry< _Key, _Tp > &rhs)
#define HT_TRY(_s_, _code_)
String extensions and helpers: sets, maps, append operators etc.