YAMI4 Core Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
serializable.h
1// Copyright Maciej Sobczak 2008-2022.
2// This file is part of YAMI4.
3// See the package-level LICENSE.txt file.
4
5#ifndef YAMICORE_SERIALIZABLE_H_INCLUDED
6#define YAMICORE_SERIALIZABLE_H_INCLUDED
7
8#include "core.h"
9#include "dll.h"
10
11namespace yami
12{
13
14namespace core
15{
16
23class DLL serializable
24{
25public:
26
36 virtual result get_serialize_buffer_size(std::size_t & size) const = 0;
37
57 virtual result serialize(char * * buffers,
58 const std::size_t * buffer_sizes,
59 std::size_t num_of_buffers) const = 0;
60
61 virtual ~serializable() {}
62};
63
64} // namespace core
65
66} // namespace yami
67
68#endif // YAMICORE_SERIALIZABLE_H_INCLUDED
Common interface for serializable data source.
Definition: serializable.h:24
virtual result serialize(char **buffers, const std::size_t *buffer_sizes, std::size_t num_of_buffers) const =0
Serializes current content into given buffer(s).
virtual result get_serialize_buffer_size(std::size_t &size) const =0
Finds the total size of serialization buffer.
result
General type for reporting success and error states.
Definition: core.h:21
Namespace devoted for everything related to YAMI4.
Definition: agent.h:14