SofaBuffers C/C++ 0.12.0
API Documentation
Loading...
Searching...
No Matches
sofab::IStreamMessage Class Referenceabstract

Base class for decodable message objects. More...

#include <sofab.hpp>

Inheritance diagram for sofab::IStreamMessage:
[legend]

Public Member Functions

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.
 

Friends

class IStreamImpl
 
template<InputMessage MessageType>
class IStreamObject
 
template<InputMessage MessageType>
class IStreamInto
 

Detailed Description

Base class for decodable message objects.

Derive from this and implement deserialize to dispatch each field to the matching IStreamImpl::read(). Instances are decoded standalone via IStreamObject, or as a nested field through IStreamImpl::read().

Definition at line 3564 of file sofab.hpp.

Member Function Documentation

◆ deserialize()

virtual void sofab::IStreamMessage::deserialize ( sofab::IStreamImpl &  _istream,
sofab::id  _id,
size_t  _size,
size_t  _count 
)
pure virtualnoexcept

Dispatch one decoded field to the appropriate read.

Called for each field of this message; implementations typically switch on _id and call _istream.read(member).

Parameters
_istreamStream to bind the field's destination on.
_idField identifier.
_sizeField value size in bytes (e.g. string/blob length).
_countNumber of array elements (for array fields).

Implemented in sofab::FixedStringSeq< Container >, sofab::FixedBlobSeq< Container >, sofab::FixedMessageSeq< Container >, sofab::MessageSeq< Container >, sofab::FixedRowSeq< Container, Reader >, and sofab::RowSeq< Container, Reader, Count >.

Friends And Related Symbol Documentation

◆ IStreamImpl

Definition at line 3569 of file sofab.hpp.

◆ IStreamInto

template<InputMessage MessageType>
friend class IStreamInto
friend

Definition at line 3573 of file sofab.hpp.

◆ IStreamObject

template<InputMessage MessageType>
friend class IStreamObject
friend

Definition at line 3571 of file sofab.hpp.


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