class BaseBufferView

Defined at line 62 of file ../../src/storage/minfs/buffer_view.h

BaseBufferView and BufferView are views of a buffer, a contiguous range in memory. It can be

mutable or immutable. It keeps track of the use of mutable methods to record whether or not it is

dirty. A flusher object is provided for flushing the buffer and is called via the Flush method if

the buffer is deemed dirty. If no flusher is provided, the view is considered immutable. The

underlying buffer can be memory, or it can be a BlockBuffer which we specialise for, in case

BlockBuffer is resized, in which case its mapped address can change.

Public Methods

BaseBufferView & operator= (BaseBufferView && other)

Defined at line 11 of file ../../src/storage/minfs/buffer_view.cc

void ~BaseBufferView ()

Defined at line 9 of file ../../src/storage/minfs/buffer_view.cc

zx::result<> Flush ()

Does nothing if the buffer is not dirty. The buffer is always marked clean after calling flush;

it is up to the caller to handle errors appropriately.

Defined at line 24 of file ../../src/storage/minfs/buffer_view.cc

void BaseBufferView ()

Defined at line 66 of file ../../src/storage/minfs/buffer_view.h

void BaseBufferView (BufferPtr buffer, size_t offset, size_t length)

Defined at line 68 of file ../../src/storage/minfs/buffer_view.h

void BaseBufferView (BufferPtr buffer, size_t offset, size_t length, Flusher flusher)

Defined at line 70 of file ../../src/storage/minfs/buffer_view.h

void BaseBufferView (BaseBufferView && other)

Movable, but not copyable.

Defined at line 74 of file ../../src/storage/minfs/buffer_view.h

bool IsValid ()

Defined at line 79 of file ../../src/storage/minfs/buffer_view.h

size_t length ()

Defined at line 80 of file ../../src/storage/minfs/buffer_view.h

size_t offset ()

Defined at line 81 of file ../../src/storage/minfs/buffer_view.h

ByteRange GetByteRange ()

Defined at line 82 of file ../../src/storage/minfs/buffer_view.h

bool dirty ()

Defined at line 83 of file ../../src/storage/minfs/buffer_view.h

void set_dirty (bool v)

Defined at line 84 of file ../../src/storage/minfs/buffer_view.h

Protected Methods

template <typename T>
const T & as ()

Returns const T

&

.

Defined at line 100 of file ../../src/storage/minfs/buffer_view.h

template <typename T>
T & as_mut ()

Returns T

&

.

Defined at line 108 of file ../../src/storage/minfs/buffer_view.h