template <class BufferType, ::std::size_t kBufferSizeInBits>
class BitBlock
Defined at line 991 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
BitBlock is a view of a short, fixed-size sequence of bits somewhere in
memory. Big- and little-endian values are handled by BufferType, which is
typically BigEndianByteOrderer
<ContiguousBuffer
<
...>> or
LittleEndianByteOrderer
<ContiguousBuffer
<
...>>.
BitBlock is implemented such that it always reads and writes its entire
buffer; unlike ContiguousBuffer for bytes, there is no way to modify part of
the underlying data without doing a read-modify-write of the full value.
This sidesteps a lot of weirdness with converting between bit addresses and
byte addresses for big-endian values, though it does mean that in certain
cases excess bits will be read or written, particularly if care is not taken
in the .emb definition to keep `bits` types to a minimum size.
Public Methods
void BitBlock<BufferType, kBufferSizeInBits> ()
Defined at line 1006 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void BitBlock<BufferType, kBufferSizeInBits> (BufferType buffer)
Defined at line 1007 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void BitBlock<BufferType, kBufferSizeInBits> (typename BufferType::BufferType buffer)
Defined at line 1008 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void BitBlock<BufferType, kBufferSizeInBits> (const BitBlock<BufferType, kBufferSizeInBits> & )
Defined at line 1009 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void BitBlock<BufferType, kBufferSizeInBits> (BitBlock<BufferType, kBufferSizeInBits> && )
Defined at line 1010 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
BitBlock<BufferType, kBufferSizeInBits> & operator= (const BitBlock<BufferType, kBufferSizeInBits> & )
Defined at line 1011 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
BitBlock<BufferType, kBufferSizeInBits> & operator= (BitBlock<BufferType, kBufferSizeInBits> && )
Defined at line 1012 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void ~BitBlock<BufferType, kBufferSizeInBits> ()
Defined at line 1013 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
::std::size_t Bits ()
Defined at line 1015 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
template <::std::size_t kNewAlignment, ::std::size_t kNewOffset>
OffsetStorageType<kNewAlignment, kNewOffset> GetOffsetStorage (::std::size_t offset, ::std::size_t size)
Defined at line 1018 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
ValueType ReadUInt ()
BitBlock clients must read or write the entire BitBlock value as an
unsigned integer. OffsetBitBlock can be used to extract a portion of the
value via shift and mask, and individual view types such as IntView or
BcdView are expected to convert ValueType to/from their desired types.
Defined at line 1028 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
ValueType UncheckedReadUInt ()
Defined at line 1031 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void WriteUInt (ValueType value)
Defined at line 1034 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void UncheckedWriteUInt (ValueType value)
Defined at line 1038 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
::std::size_t SizeInBits ()
Defined at line 1042 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
bool Ok ()
Defined at line 1043 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h