class IterableView

Defined at line 106 of file ../../sdk/lib/iob/include/lib/iob/blob-id-allocator.h

IterableView provides a more conventional means of iterating through the

blobs and IDs within a BlobIdAllocator, which cannot be done on the latter

as that would not be threadsafe. IterableView follows an "error-checking

view" pattern: the container/range/view API of begin() and end() iterators

is supported, but when begin() or iterator::operator++() encounters an

error, it simply returns end() so that loops terminate normally.

Thereafter, take_error() must be called to check whether the loop

terminated because it may have encountered an error. Once begin() has been

called, take_error() must be called before the IterableView is destroyed,

so no error goes undetected. After take_error() is called the error state

is consumed and take_error() cannot be called again until another begin()

or iterator::operator++() call has been made.

An IterableView is intended to be constructed via

BlobIdAllocator::iterable().

Public Methods

void ~IterableView ()

Defined at line 191 of file ../../sdk/lib/iob/include/lib/iob/blob-id-allocator.h

iterator begin ()

After calling begin(), it's mandatory to call take_error() before

destroying the IterableView object. See the IterableView docstring

for more detail.

Defined at line 202 of file ../../sdk/lib/iob/include/lib/iob/blob-id-allocator.h

iterator end ()

Defined at line 204 of file ../../sdk/lib/iob/include/lib/iob/blob-id-allocator.h

iterator find (uint32_t id)

Returns the iterator associated with a given ID if allocated, or else

end(). As with end(), it's mandatory to call take_error() after calling

find().

Defined at line 209 of file ../../sdk/lib/iob/include/lib/iob/blob-id-allocator.h

fit::result<BlobError> take_error ()

Check the container for errors after using iterators. See the

IterableView docstring for more detail.

Defined at line 216 of file ../../sdk/lib/iob/include/lib/iob/blob-id-allocator.h

Records

Friends

class BlobIdAllocator