libkazv
Loading...
Searching...
No Matches
local-echo.hpp
Go to the documentation of this file.
1/*
2 * This file is part of libkazv.
3 * SPDX-FileCopyrightText: 2023 tusooa <tusooa@kazv.moe>
4 * SPDX-License-Identifier: AGPL-3.0-or-later
5 */
6
7#pragma once
8#include <libkazv-config.hpp>
9
10#include <boost/serialization/split_free.hpp>
11#include "event.hpp"
12
13namespace Kazv
14{
19 {
20 enum Status
21 {
24 };
25
26 std::string txnId;
29 friend bool operator==(const LocalEchoDesc &a, const LocalEchoDesc &b) = default;
30 friend bool operator!=(const LocalEchoDesc &a, const LocalEchoDesc &b) = default;
31 };
32}
33
35{
36 template<class Archive>
37 void save(Archive &ar, const Kazv::LocalEchoDesc &d, std::uint32_t const version)
38 {
39 using namespace Kazv;
40 LocalEchoDesc::Status dummyStatus{LocalEchoDesc::Failed};
41 ar
42 & d.txnId
43 & d.event
44 & dummyStatus
45 ;
46 }
47
48 template<class Archive>
49 void load(Archive &ar, Kazv::LocalEchoDesc &d, std::uint32_t const version)
50 {
51 using namespace Kazv;
52 LocalEchoDesc::Status dummyStatus{LocalEchoDesc::Failed};
53 ar
54 & d.txnId
55 & d.event
56 & dummyStatus
57 ;
58 d.status = LocalEchoDesc::Failed;
59 }
60
61 template<class Archive>
62 void serialize(Archive &ar, Kazv::LocalEchoDesc &d, std::uint32_t const version)
63 {
64 using boost::serialization::split_free;
65 split_free(ar, d, version);
66 }
67}
68
69BOOST_CLASS_VERSION(Kazv::LocalEchoDesc, 0)
Definition event.hpp:21
Definition location.hpp:10
Definition immer-array.hpp:18
void load(Archive &ar, immer::array< T, MP > &v, const unsigned int)
Definition immer-array.hpp:35
void serialize(Archive &ar, immer::array< T, MP > &v, const unsigned int version)
Definition immer-array.hpp:58
void save(Archive &ar, const immer::array< T, MP > &v, const unsigned int)
Definition immer-array.hpp:22
Describes a local echo.
Definition local-echo.hpp:19
Status status
Definition local-echo.hpp:28
Status
Definition local-echo.hpp:21
@ Failed
Definition local-echo.hpp:23
@ Sending
Definition local-echo.hpp:22
std::string txnId
Definition local-echo.hpp:26
friend bool operator==(const LocalEchoDesc &a, const LocalEchoDesc &b)=default
friend bool operator!=(const LocalEchoDesc &a, const LocalEchoDesc &b)=default
Event event
Definition local-echo.hpp:27