24#include "field_codec_id.h" 
   34    if (
id <= ONE_BYTE_MAX_ID)
 
   43        return_bits.
set(0, 
true);
 
 
   55        bits->
get_more_bits((LONG_FORM_ID_BYTES - SHORT_FORM_ID_BYTES) * BITS_IN_BYTE);
 
 
   72unsigned dccl::DefaultIdentifierCodec::this_size(
const uint32& 
id)
 
   74    if (
id > TWO_BYTE_MAX_ID)
 
   76            "dccl.id provided (" + std::to_string(
id) +
 
   77            ") exceeds maximum: " + std::to_string(
int(TWO_BYTE_MAX_ID))));
 
   79    return (
id <= ONE_BYTE_MAX_ID) ? SHORT_FORM_ID_BYTES * BITS_IN_BYTE
 
   80                                   : LONG_FORM_ID_BYTES * BITS_IN_BYTE;
 
A variable size container of bits (subclassed from std::deque<bool>) with an optional hierarchy....
void get_more_bits(size_type num_bits)
Retrieve more bits from the parent Bitset.
bool test(size_type n) const
Test a bit (return its value)
unsigned long to_ulong() const
Returns the value of the Bitset as an unsigned long integer. Equivalent to to<unsigned long>().
Bitset & set(size_type n, bool val=true)
Set a bit to a given value.
Bitset encode() override
Encode an empty field.
unsigned size() override
Calculate the size (in bits) of an empty field.
uint32 decode(Bitset *bits) override
Decode a field. If the field is empty (i.e. was encoded using the zero-argument encode()),...
unsigned min_size() override
Calculate minimum size of the field in bits.
unsigned max_size() override
Calculate maximum size of the field in bits.
Exception class for DCCL.
google::protobuf::uint32 uint32
an unsigned 32 bit integer