YAMI4 C++ 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 YAMICPP_SERIALIZABLE_H_INCLUDED
6#define YAMICPP_SERIALIZABLE_H_INCLUDED
7
8#include <yami4-core/dll.h>
9#include <yami4-core/serializable.h>
10
11namespace yami
12{
13
20class DLL serializable
21{
22public:
23
28 virtual std::size_t serialize_buffer_size() const = 0;
29
44 virtual void serialize(char * * buffers, std::size_t * buffer_sizes,
45 std::size_t num_of_buffers) const = 0;
46
48 virtual const core::serializable & get_core_object() const = 0;
49
50 virtual ~serializable() {}
51};
52
53} // namespace yami
54
55#endif // YAMICPP_SERIALIZABLE_H_INCLUDED
Common interface for serializable data source.
Definition: serializable.h:21
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).
virtual std::size_t serialize_buffer_size() const =0
Returns the total size of serialization buffer.
virtual const core::serializable & get_core_object() const =0
Provides access to the underlying core object.
Namespace devoted to everything related to YAMI4.
Definition: agent.h:21