template <typename CharT, ::std::size_t kAlignment, ::std::size_t kOffset, ::std::size_t kBits>

struct MemoryAccessor

Defined at line 40 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h

MemoryAccessor reads and writes big- and little-endian unsigned integers in

and out of memory, using optimized routines where possible.

The default MemoryAccessor just proxies to the MemoryAccessor with the

next-smallest alignment and equivalent offset: MemoryAccessor

<C

, 8, 0, 32>

and MemoryAccessor

<C

, 8, 4, 32> will proxy to MemoryAccessor

<C

, 4, 0, 32>,

since an 8-byte-aligned pointer is also 4-byte-aligned, as is a pointer that

is 4 bytes away from 8-byte alignment.

Public Methods

Unsigned ReadLittleEndianUInt (const CharT * bytes)

Defined at line 50 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h

void WriteLittleEndianUInt (CharT * bytes, Unsigned value)

Defined at line 53 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h

Unsigned ReadBigEndianUInt (const CharT * bytes)

Defined at line 56 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h

void WriteBigEndianUInt (CharT * bytes, Unsigned value)

Defined at line 59 of file ../../third_party/github.com/google/emboss/src/runtime/cpp/emboss_memory_util.h