SofaBuffers C/C++ 0.12.0
API Documentation
Loading...
Searching...
No Matches
sofab::Message Struct Reference

A message that both encodes and decodes: exactly OStreamMessage + IStreamMessage. More...

#include <sofab.hpp>

Inheritance diagram for sofab::Message:
[legend]
Collaboration diagram for sofab::Message:
[legend]

Additional Inherited Members

- Public Member Functions inherited from sofab::IStreamMessage
virtual void deserialize (sofab::IStreamImpl &_istream, sofab::id _id, size_t _size, size_t _count) noexcept=0
 Dispatch one decoded field to the appropriate read.
 
- Protected Member Functions inherited from sofab::OStreamMessage
virtual OStreamImpl::Result serialize (OStreamImpl &_ostream) const noexcept=0
 Serialize this message's fields into _ostream.
 

Detailed Description

A message that both encodes and decodes: exactly OStreamMessage + IStreamMessage.

Almost every message is both, so spelling out the pair at every declaration is noise. This is an empty intermediate base — no storage, no vtable slot of its own, identical layout to inheriting the two directly — so it is a naming convenience and nothing else:

sofab::OStreamImpl::Result serialize(sofab::OStreamImpl &os) const noexcept override;
void deserialize(sofab::IStreamImpl &is, sofab::id id, size_t, size_t) noexcept override;
};
Base input stream: incrementally decodes fed bytes into bound targets.
Definition sofab.hpp:2057
Outcome of an encode operation, supporting fluent chaining.
Definition sofab.hpp:952
Base output stream: encodes fields into a caller-provided buffer.
Definition sofab.hpp:891
bool bitsEqual(const T *a, std::size_t na, const T *b, std::size_t nb) noexcept
True iff both float arrays have the same length and the same bit pattern at every index.
Definition floats.hpp:58
sofab_id_t id
Field identifier type (alias of sofab_id_t).
Definition sofab.hpp:213
A message that both encodes and decodes: exactly OStreamMessage + IStreamMessage.
Definition sofab.hpp:3637

Both sofab::InputMessage and sofab::OutputMessage are satisfied through it. Inherit a single side directly when a type really is one-way.

Definition at line 3636 of file sofab.hpp.


The documentation for this struct was generated from the following file: