1 #ifndef SSP21_ENUMFIELD_H 2 #define SSP21_ENUMFIELD_H 4 #include "ssp21/crypto/gen/ParseError.h" 5 #include "ssp21/crypto/gen/FormatError.h" 6 #include "ssp21/crypto/IMessagePrinter.h" 8 #include "ser4cpp/serialization/BigEndian.h" 13 template <
typename Spec>
16 typedef typename Spec::enum_type_t enum_t;
25 operator enum_t ()
const 33 explicit EnumField(enum_t value) : value(value)
41 auto enum_value = Spec::from_type(raw_value);
43 if (enum_value == Spec::enum_type_t::undefined)
48 this->value = enum_value;
60 printer.print(name, Spec::to_string(this->value));
SSP21-cpp main namespace.
an enumeration value was undefined
parser ran out of bytes before completion
not enough output buffer space