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