|
SofaBuffers C/C++ 0.12.0
API Documentation
|
Collects a string wrapper sequence into inline storage.
More...
#include <sofab.hpp>
Public Member Functions | |
| void | deserialize (IStreamImpl &is, sofab_id_t id, size_t size, size_t) noexcept override |
| Dispatch one decoded field to the appropriate read. | |
Data Fields | |
| Container * | out = nullptr |
Collects a string wrapper sequence into inline storage.
An element is placed at its index id rather than appended: a default (empty) element is omitted on the wire (§2), so the vector is grown with empty slots up to the id and the value stored there. Inline storage never reallocates, so an element bound earlier stays address-stable while later slots grow — which the deferred C decoder relies on.
An index at or past the fixed capacity N is a schema-bound violation (§5.1/§7) and is rejected with IStreamImpl::invalidate, before the fill loop. That also bounds an over-index amplification: InlineVector's emplace_back is a no-op once full, so an unguarded loop would spin forever on such an index (issue #126).
| Container | Inline vector of FixedString. |
|
inlineoverridevirtualnoexcept |
Dispatch one decoded field to the appropriate read.
Called for each field of this message; implementations typically switch on _id and call _istream.read(member).
| _istream | Stream to bind the field's destination on. |
| _id | Field identifier. |
| _size | Field value size in bytes (e.g. string/blob length). |
| _count | Number of array elements (for array fields). |
Implements sofab::IStreamMessage.
Definition at line 3779 of file sofab.hpp.