|
Zserio C++17 runtime library 1.3.0
Built for Zserio 2.20.0
|
#include <BitBuffer.h>
Public Types | |
| using | allocator_type = ALLOC |
Class which holds any bit sequence.
Because bit buffer size does not have to be byte aligned (divisible by 8), it's possible that not all bits of the last byte are used. In this case, only most significant bits of the corresponded size are used.
Definition at line 35 of file BitBuffer.h.
| using zserio::BasicBitBuffer< ALLOC >::allocator_type = ALLOC |
Definition at line 41 of file BitBuffer.h.
| zserio::BasicBitBuffer< ALLOC >::BasicBitBuffer | ( | ) |
Empty constructor.
| allocator | Allocator to use for internal vector allocation. |
Definition at line 269 of file BitBuffer.h.
|
explicit |
Constructor from given allocator.
| allocator | Allocator to use for internal vector allocation. |
Definition at line 275 of file BitBuffer.h.
|
explicit |
Constructor from bit size.
| bitSize | Size in bits of created bit buffer. |
| allocator | Allocator to use for internal vector allocation. |
Definition at line 281 of file BitBuffer.h.
|
explicit |
Constructor from span.
| buffer | Span of bytes from which the bit buffer should be created. |
| allocator | Allocator to use for internal vector allocation. |
Definition at line 287 of file BitBuffer.h.
|
explicit |
Constructor from span and bit size.
| buffer | Span of bytes from which the bit buffer should be created. |
| bitSize | Number of bits stored in buffer to use. |
| allocator | Allocator to use for internal vector allocation. |
| CppRuntimeException | If given bit size is out of range for given Span. |
Definition at line 293 of file BitBuffer.h.
|
explicit |
Constructor from moved STL vector.
| buffer | STL vector of bytes from which the bit buffer should be created. |
Definition at line 306 of file BitBuffer.h.
|
explicit |
Constructor from moved STL vector and bit size.
| buffer | STL vector of bytes from which the bit buffer should be created. |
| bitSize | Number of bits stored in buffer to use. |
| CppRuntimeException | If given bit size is out of range for given vector. |
Definition at line 312 of file BitBuffer.h.
|
inline |
Allocator aware copy constructor.
Definition at line 325 of file BitBuffer.h.
|
inline |
Allocator aware move constructor.
Definition at line 331 of file BitBuffer.h.
|
default |
Method generated by default.
|
default |
Method generated by default.
|
default |
Method generated by default.
|
inline |
Get copy of the allocator used for dynamic memory allocations.
Definition at line 48 of file BitBuffer.h.
| size_t zserio::BasicBitBuffer< ALLOC >::getBitSize | ( | ) | const |
Gets the number of bits stored in the bit buffer.
Definition at line 448 of file BitBuffer.h.
| uint8_t * zserio::BasicBitBuffer< ALLOC >::getBuffer | ( | ) |
Gets the underlying buffer.
Definition at line 442 of file BitBuffer.h.
Gets the underlying buffer.
Definition at line 436 of file BitBuffer.h.
| const std::vector< uint8_t, ALLOC > & zserio::BasicBitBuffer< ALLOC >::getBytes | ( | ) | const |
Convenience getter for the underlying buffer.
Definition at line 460 of file BitBuffer.h.
| size_t zserio::BasicBitBuffer< ALLOC >::getByteSize | ( | ) | const |
Gets the number of bytes stored in the bit buffer.
Not all bits of the last byte must be used. Unused bits of the last byte are set to zero.
Definition at line 454 of file BitBuffer.h.
Convenience getter for the underlying buffer.
Definition at line 472 of file BitBuffer.h.
Convenience getter for the underlying buffer.
Definition at line 466 of file BitBuffer.h.
| uint32_t zserio::BasicBitBuffer< ALLOC >::hashCode | ( | ) | const |
Calculates hash code of the bit buffer.
Definition at line 415 of file BitBuffer.h.
|
inline |
Non-equal operator.
| other | The another instance of bit buffer to which compare this bit buffer. |
Definition at line 152 of file BitBuffer.h.
| bool zserio::BasicBitBuffer< ALLOC >::operator< | ( | const BasicBitBuffer< ALLOC > & | other | ) | const |
Operator less than.
| other | The another instance of bit buffer to which compare this bit buffer. |
Definition at line 368 of file BitBuffer.h.
|
inline |
Operator less than or equal.
| other | The another instance of bit buffer to which compare this bit buffer. |
Definition at line 186 of file BitBuffer.h.
|
default |
Method generated by default.
|
default |
Method generated by default.
| bool zserio::BasicBitBuffer< ALLOC >::operator== | ( | const BasicBitBuffer< ALLOC > & | other | ) | const |
Equal operator.
| other | The another instance of bit buffer to which compare this bit buffer. |
Definition at line 337 of file BitBuffer.h.
|
inline |
Operator greater than.
| other | The another instance of bit buffer to which compare this bit buffer. |
Definition at line 174 of file BitBuffer.h.
|
inline |
Operator greater than or equal.
| other | The another instance of bit buffer to which compare this bit buffer. |
Definition at line 198 of file BitBuffer.h.