SofaBuffers C/C++ 0.12.0
API Documentation
Loading...
Searching...
No Matches
sofab::OutputMessage Concept Reference

Concept: a serializable message type usable with OStreamObject. More...

#include <sofab.hpp>

Concept definition

template<class T>
std::derived_from<T, OStreamMessage> &&
Detects the pre-0.11 spelling. Deprecated; see OutputMessage.
Definition sofab.hpp:1799
Detects the CORELIB_PLAN §6.1.1 spelling of the worst-case size.
Definition sofab.hpp:1793
Concept: a serializable message type usable with OStreamObject.
Definition sofab.hpp:1832

Detailed Description

Concept: a serializable message type usable with OStreamObject.

Derives from OStreamMessage and declares its worst-case encoded size.

CORELIB_PLAN §6.1.1 closes the generated-object name set and puts **MAX_SIZE** in it, permitting "only casing/idiom …, never the words". This concept required _maxSize, an underscore-prefixed private-marker spelling that is past casing — and because the concept is a hard requirement, it fixed that name for every generated type built against this corelib. (The C side was never affected: generated C emits MESSAGE_<NAME>_MAX_SIZE, an idiomatic C macro spelling.)

Both spellings are accepted so the rename is not a flag day: a generated tree built against 0.10 keeps compiling while the cpp backend switches over. _maxSize is deprecated and will be dropped once no emitter uses it.

Definition at line 1832 of file sofab.hpp.