|
Zserio C++17 runtime library
0.5.0
Built for Zserio 2.17.0
|
Functions | |
| uint8_t | numBits (uint64_t numValues) |
| template<typename BITMASK1 , typename BITMASK2 > | |
| bool | isSet (BITMASK1 bitmaskValue, BITMASK2 requiredMask) |
| template<typename T , std::enable_if_t< std::is_enum_v< T >, int > = 0> | |
| constexpr auto | valueOf (T value) |
| bool zserio::builtin::isSet | ( | BITMASK1 | bitmaskValue, |
| BITMASK2 | requiredMask | ||
| ) |
Checks whether the requiredMask is set within the bitmaskValue.
This method implements zserio built-in operator isset.
| bitmaskValue | Bitmask value to check. |
| requiredMask | Mask to use. |
Definition at line 26 of file BuiltInOperators.h.
| uint8_t zserio::builtin::numBits | ( | uint64_t | numValues | ) |
Gets the minimum number of bits required to encode numValues different values.
This method implements Zserio built-in operator numbits.
Note: Please note that this method returns 0 if numValues is zero.
Examples: numbits(0) = 0 numbits(1) = 1 numbits(2) = 1 numbits(3) = 2 numbits(4) = 2 numbits(8) = 3 numbits(16) = 4
| numValues | The number of different values from which to calculate number of bits. |
numValues different values. Definition at line 9 of file BuiltInOperators.cpp.
|
constexpr |
Gets the underlying numeric value of an enumeration.
| value | Enumeration item. |
Gets the underlying numeric value of an bitmask.
| value | Bitmask value. |
Definition at line 61 of file BuiltInOperators.h.