SofaBuffers C++ 0.12.0
Pure-C++20 SofaBuffers — API Documentation
Loading...
Searching...
No Matches
sofab::OStreamMessage Class Referenceabstract

Base class for user-defined messages that can serialise themselves. More...

#include <sofab.hpp>

Inheritance diagram for sofab::OStreamMessage:
[legend]

Protected Member Functions

virtual OStreamImpl::Result serialize (OStreamImpl &ostream) const noexcept=0
 Write this message's fields into ostream.
 

Friends

class OStreamImpl
 

Detailed Description

Base class for user-defined messages that can serialise themselves.

Derive from this and implement serialize to write the message's fields; the object can then be passed to OStreamImpl::write to be encoded as a nested sub-message.

Definition at line 2691 of file sofab.hpp.

Member Function Documentation

◆ serialize()

virtual OStreamImpl::Result sofab::OStreamMessage::serialize ( OStreamImpl &  ostream) const
protectedpure virtualnoexcept

Write this message's fields into ostream.

Parameters
ostreamStream to encode into.
Returns
A OStreamImpl::Result carrying the outcome.

Friends And Related Symbol Documentation

◆ OStreamImpl

friend class OStreamImpl
friend

Definition at line 2694 of file sofab.hpp.


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