23#ifndef FIELD_CODEC_VAR_BYTES_20181010H
24#define FIELD_CODEC_VAR_BYTES_20181010H
26#include "../field_codec_typed.h"
42 unsigned size()
override;
43 unsigned size(
const std::string& wire_value)
override;
50 unsigned presence_size() {
return use_required() ? 0 : 1; }
A variable size container of bits (subclassed from std::deque<bool>) with an optional hierarchy....
dccl::DCCLFieldOptions dccl_field_options() const
Get the DCCL field option extension value for the current field.
bool use_required()
Whether to use the required or optional encoding.
Base class for static-typed (no dccl::any) field encoders/decoders. Most single-valued user defined v...
std::string decode(dccl::Bitset *bits) override
Decode a field. If the field is empty (i.e. was encoded using the zero-argument encode()),...
unsigned max_size() override
Calculate maximum size of the field in bits.
void validate() override
Validate a field. Use require() inside your overloaded validate() to assert requirements or throw Exc...
dccl::Bitset encode() override
Encode an empty field.
unsigned min_size() override
Calculate minimum size of the field in bits.
unsigned size() override
Calculate the size (in bits) of an empty field.
Dynamic Compact Control Language namespace.
unsigned ceil_log2(dccl::uint64 v)