|
SofaBuffers C/C++ 0.12.0
API Documentation
|
Collects a wrapper sequence of rows the stream cannot read on its own, into a growable container. More...
#include <seq.hpp>
Public Types | |
| using | Elem = typename Container::value_type |
| Row type: the container's element. | |
Public Member Functions | |
| void | deserialize (IStreamImpl &is, sofab_id_t id, size_t, size_t count) noexcept override |
| Dispatch one decoded field to the appropriate read. | |
Data Fields | |
| Container * | out = nullptr |
| Destination, bound by IStreamImpl::readSequence. | |
| Reader | readRow {} |
| The row read. | |
Static Public Attributes | |
| static constexpr int | elemWire = static_cast<int>(Reader::wire()) |
Declared row wire type (§7.3), from Reader. | |
Collects a wrapper sequence of rows the stream cannot read on its own, into a growable container.
The heap counterpart of FixedRowSeq, as MessageSeq is of FixedMessageSeq. Named to match sofab::RowSeq in corelib-cpp. The schema count arrives one of two ways:
Count — the bound is then a constant, the collector stores no bound at all and a row at or past it is Error::InvalidMessage. This is the generated layer's form: the footprint profile requires a count on every array level, so a receiver cap could never apply, and neither its storage nor its branch is paid for;Count left at -1, as the runtime member cap, with the §6.2.1 receiver cap dynCap beside it for a schema-unbounded array — applied by seqRefuse exactly as MessageSeq applies them.A row is placed only once its own field opens, i.e. once every target in the row before it has been filled, so growing the container cannot move a destination the deferred decoder still has bound (see MessageSeq).
| Container | Growable container of rows. |
| Reader | The row read, as for FixedRowSeq. |
| Count | Schema count N, or -1 to take the bounds as members. |
|
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 442 of file seq.hpp.
|
staticconstexpr |
Destination, bound by IStreamImpl::readSequence.
| Reader sofab::RowSeq< Container, Reader, Count >::readRow {} |