|
| | OStreamInline () noexcept |
| | Construct with no flush callback.
|
| |
| | OStreamInline (flushCallback callback) noexcept |
| | Construct with a flush callback.
|
| |
| | OStreamImpl (const OStreamImpl &)=delete |
| | Copy construction is deleted (the context owns raw buffer pointers).
|
| |
| OStreamImpl & | operator= (const OStreamImpl &)=delete |
| | Copy assignment is deleted (the context owns raw buffer pointers).
|
| |
| | OStreamImpl (OStreamImpl &&) noexcept=default |
| | Move construction (transfers the underlying context).
|
| |
| OStreamImpl & | operator= (OStreamImpl &&) noexcept=default |
| | Move assignment (transfers the underlying context).
|
| |
| virtual | ~OStreamImpl () noexcept |
| | Destructor; flushes any buffered bytes.
|
| |
| size_t | flush () noexcept |
| | Flush buffered bytes through the flush callback (if any).
|
| |
| size_t | bytesUsed () noexcept |
| | Number of bytes written to the active buffer since the last flush.
|
| |
| const uint8_t * | data () const noexcept |
| | Pointer to the start of the active encode buffer.
|
| |
| template<typename T > |
| Result | write (sofab_id_t id, const T &value) noexcept |
| | Encode a single field, deducing the wire type from T.
|
| |
| template<typename T > |
| Result | writeLazy (sofab_id_t id, const T &value) noexcept |
| | Encode a nested message field, omitting it when all-default.
|
| |
| Result | write (sofab_id_t id, const void *value, int32_t size) noexcept |
| | Encode a raw binary blob field.
|
| |
| template<typename T > |
| Result | writeIf (sofab_id_t id, const T &value, bool condition) noexcept |
| | Encode a field only when condition is true.
|
| |
| Result | sequenceBeginLazy (sofab_id_t id) noexcept |
| | Open a nested sequence whose header is held back until it turns out to have content.
|
| |
| Result | sequenceEnd () noexcept |
| | Close the current nested sequence, letting it vanish if it got no content (MESSAGE_SPEC ยง2).
|
| |
| Result | sequenceEndKeep () noexcept |
| | Close the current nested sequence, keeping its frame even without content.
|
| |
| bool | ok () const noexcept |
| | Whether every write on this stream has succeeded.
|
| |
| Error | error () const noexcept |
| | The first failure this stream saw, or Error::None.
|
| |
| Result | rejectArgument () noexcept |
| | Refuse the value being encoded: latch Error::InvalidArgument.
|
| |
template<
size_t N,
size_t Offset = 0>
class sofab::OStreamInline< N, Offset >
Output stream backed by an inline, fixed-size buffer.
Stores the N-byte buffer inside the object (no heap allocation), making it well suited to embedded use.
- Template Parameters
-
| N | Total buffer size in bytes (must be > 0). |
| Offset | Initial write offset within the buffer (must be < N). |
Definition at line 1716 of file sofab.hpp.