28#ifndef DCCLV3FIELDCODECDEFAULT20140403H
29#define DCCLV3FIELDCODECDEFAULT20140403H
31#include "../codecs2/field_codec_default.h"
39template <
typename WireType,
typename FieldType = WireType>
59 int32 pre_encode(
const google::protobuf::EnumValueDescriptor*
const& field_value)
override;
60 const google::protobuf::EnumValueDescriptor* post_decode(
const int32& wire_value)
override;
62 std::size_t
hash()
override
64 return std::hash<std::string>{}(
this_field()->enum_type()->DebugString());
68 double max()
override;
69 double min()
override;
82 unsigned size()
override;
83 unsigned size(
const std::string& wire_value)
override;
A variable size container of bits (subclassed from std::deque<bool>) with an optional hierarchy....
const google::protobuf::FieldDescriptor * this_field() const
Returns the FieldDescriptor (field schema meta-data) for this field.
Base class for static-typed (no dccl::any) field encoders/decoders. Most single-valued user defined v...
Provides a bool encoder. Uses 1 bit if field is required, 2 bits if optional
Provides an fixed length byte string encoder.
Provides a basic bounded arbitrary length numeric (double, float, uint32, uint64, int32,...
Placeholder codec that takes no space on the wire (0 bits).
Provides an enum encoder. This converts the enumeration to an integer and uses DefaultNumericFieldCod...
std::size_t hash() override
Generate a field specific hash to be combined with the descriptor hash.
void validate() override
Validate a field. Use require() inside your overloaded validate() to assert requirements or throw Exc...
Provides an variable length ASCII string encoder.
unsigned max_size() override
Calculate maximum size of the field in bits.
unsigned min_size() override
Calculate minimum size of the field in bits.
std::string decode(Bitset *bits) override
Decode a field. If the field is empty (i.e. was encoded using the zero-argument encode()),...
Bitset encode() override
Encode an empty field.
unsigned size() override
Calculate the size (in bits) of an empty field.
void validate() override
Validate a field. Use require() inside your overloaded validate() to assert requirements or throw Exc...
Dynamic Compact Control Language namespace.
google::protobuf::int32 int32
a signed 32 bit integer