|
SofaBuffers C++ 0.12.0
Pure-C++20 SofaBuffers — API Documentation
|
A message that both encodes and decodes: exactly OStreamMessage + IStreamMessage. More...
#include <sofab.hpp>
Additional Inherited Members | |
Public Member Functions inherited from sofab::IStreamMessage | |
| virtual void | deserialize (IStreamImpl &istream, sofab::id id, size_t size, size_t count) noexcept=0 |
Consume one of this message's fields from istream. | |
| virtual | ~IStreamMessage ()=default |
Protected Member Functions inherited from sofab::OStreamMessage | |
| virtual OStreamImpl::Result | serialize (OStreamImpl &ostream) const noexcept=0 |
Write this message's fields into ostream. | |
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:
Both sofab::InputMessage and sofab::OutputMessage are satisfied through it. Inherit a single side directly when a type really is one-way.