1 #ifndef ZSERIO_BITMASKS_H_INC
2 #define ZSERIO_BITMASKS_H_INC
20 std::enable_if_t<is_bitmask_v<T>> validate(T value, std::string_view fieldName)
22 validate(value.getValue(), fieldName);
26 std::enable_if_t<is_bitmask_v<T>,
BitSize> bitSizeOf(T value,
BitSize bitPosition = 0)
28 return bitSizeOf(value.getValue(), bitPosition);
32 std::enable_if_t<is_bitmask_v<T>> write(BitStreamWriter& writer, T value)
34 write(writer, value.getValue());
38 std::enable_if_t<is_bitmask_v<T>> read(BitStreamReader& reader, T& value)
40 typename T::ZserioType rawValue;
41 read(reader, rawValue);
46 std::enable_if_t<zserio::is_bitmask_v<T>> initContext(DeltaContext& deltaContext, T value)
48 deltaContext.init(value.getValue());
52 std::enable_if_t<zserio::is_bitmask_v<T>,
BitSize> bitSizeOf(DeltaContext& deltaContext, T value,
BitSize = 0)
54 return deltaContext.bitSizeOf(value.getValue());
58 std::enable_if_t<zserio::is_bitmask_v<T>> write(DeltaContext& deltaContext, BitStreamWriter& writer, T value)
60 deltaContext.write(writer, value.getValue());
64 std::enable_if_t<zserio::is_bitmask_v<T>> read(DeltaContext& deltaContext, BitStreamReader& reader, T& value)
66 typename T::ZserioType rawValue;
67 deltaContext.read(reader, rawValue);
81 template <typename T, typename std::enable_if<is_bitmask<T>::value,
int>::type = 0>
84 exception << value.getValue();
CppRuntimeException & operator<<(CppRuntimeException &exception, const BasicBitBuffer< ALLOC > &bitBuffer)