YAMI4 C++ Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
Public Member Functions | List of all members
yami::serializable Class Referenceabstract

Common interface for serializable data source. More...

#include <serializable.h>

Inheritance diagram for yami::serializable:
yami::parameters yami::raw_buffer_data_source

Public Member Functions

virtual std::size_t serialize_buffer_size () const =0
 Returns the total size of serialization buffer. More...
 
virtual void serialize (char **buffers, std::size_t *buffer_sizes, std::size_t num_of_buffers) const =0
 Serializes current content into given buffer(s). More...
 
virtual const core::serializable & get_core_object () const =0
 Provides access to the underlying core object. More...
 

Detailed Description

Common interface for serializable data source.

Serializable data source allows to fill the given set up buffers with binary data that corresponds to the actual data source content. The purpose of this interface is to allow uniform treatment of parameters objects with wrapped raw binary buffers.

Member Function Documentation

◆ get_core_object()

virtual const core::serializable & yami::serializable::get_core_object ( ) const
pure virtual

Provides access to the underlying core object.

Implemented in yami::parameters, and yami::raw_buffer_data_source.

◆ serialize()

virtual void yami::serializable::serialize ( char **  buffers,
std::size_t *  buffer_sizes,
std::size_t  num_of_buffers 
) const
pure virtual

Serializes current content into given buffer(s).

Serializes the current content of this object into the given buffer(s). The serialization buffer does not have to be contiguous and any number of buffer segments is allowed, provided that the size of each buffer segment is a multiple of 4 (32 bits).
The function scatters the serialized data into subsequent buffers as they become filled.
The buffers are provided as array of buffer pointers and their sizes.

Parameters
buffersPointer to the array of buffer pointers (each of type char *).
buffer_sizesPointer to the array of buffer sizes.
num_of_buffersNumber of buffers described by the array.

Implemented in yami::parameters, and yami::raw_buffer_data_source.

◆ serialize_buffer_size()

virtual std::size_t yami::serializable::serialize_buffer_size ( ) const
pure virtual

Returns the total size of serialization buffer.

Computes the total size of serialization buffer(s) for the current content of this object.

Implemented in yami::parameters, and yami::raw_buffer_data_source.


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