template <class UnderlyingBitBlockType>
class OffsetBitBlock
Defined at line 900 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
OffsetBitBlock is a filter on another BitBlock class, which adds a fixed
offset to reads from underlying bit block. This is used by Emboss generated
classes to read bitfields: the parent provides an OffsetBitBlock of its
buffer to the child's view.
OffsetBitBlock is always statically sized, but because
BitBlock::GetOffsetStorage and OffsetBitBlock::GetOffsetStorage must have the
same signature as ContiguousBuffer::GetOffsetStorage, OffsetBitBlock's size
parameter must be a runtime value.
TODO(bolms): Figure out how to add size as a template parameter to
OffsetBitBlock.
Public Methods
void OffsetBitBlock<UnderlyingBitBlockType> ()
Defined at line 910 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void OffsetBitBlock<UnderlyingBitBlockType> (UnderlyingBitBlockType bit_block, ::std::size_t offset, ::std::size_t size, bool ok)
Defined at line 911 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void OffsetBitBlock<UnderlyingBitBlockType> (const OffsetBitBlock<UnderlyingBitBlockType> & other)
Defined at line 917 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
OffsetBitBlock<UnderlyingBitBlockType> & operator= (const OffsetBitBlock<UnderlyingBitBlockType> & other)
Defined at line 918 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 921 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
ValueType ReadUInt ()
ReadUInt reads the entire underlying bit block, then shifts and masks to
the appropriate size.
Defined at line 929 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
ValueType UncheckedReadUInt ()
Defined at line 936 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void WriteUInt (ValueType value)
WriteUInt writes the entire underlying bit block; in order to only write
the specific bits that should be changed, the current value is first read,
then masked out and or'ed with the new value, and finally the result is
written back to memory.
Defined at line 945 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
void UncheckedWriteUInt (ValueType value)
Defined at line 956 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
::std::size_t SizeInBits ()
Defined at line 961 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h
bool Ok ()
Defined at line 962 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h