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; }
Dynamic Compact Control Language namespace.
dccl::Bitset encode() override
Encode an empty field.
unsigned ceil_log2(dccl::uint64 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.
A variable size container of bits (subclassed from std::deque<bool>) with an optional hierarchy....
Base class for static-typed (no dccl::any) field encoders/decoders. Most single-valued user defined v...
void validate() override
Validate a field. Use require() inside your overloaded validate() to assert requirements or throw Exc...
unsigned min_size() override
Calculate minimum size of the field in bits.
bool use_required()
Whether to use the required or optional encoding.
unsigned size() override
Calculate the size (in bits) of an empty field.
dccl::DCCLFieldOptions dccl_field_options() const
Get the DCCL field option extension value for the current field.