ActiveLib
Loading...
Searching...
No Matches
Transportable.h
1
6#ifndef ACTIVE_SERIALISE_DOC_TRANSPORTABLE
7#define ACTIVE_SERIALISE_DOC_TRANSPORTABLE
8
9#include "Active/Utility/String.h"
10
11#include <concepts>
12
13namespace active::setting {
14
15 class SettingList;
16
17}
18
19namespace active::serialise::doc {
20
21 class Object;
22
24 template<typename T>
25 concept Serialisable = requires(const T& t, const setting::SettingList* spec) {
26 { t.send(spec) } -> std::same_as<Object>;
27 };
28
30 template<typename T>
31 concept Reconstructable = std::constructible_from<T, const Object&, const setting::SettingList*>;
32
34 template<typename T>
36
38 template <typename T>
39 concept Typed = requires(T t) {
40 { t.docType } -> std::same_as<active::utility::String&>;
41 };
42
43}
44
45#endif //ACTIVE_SERIALISE_DOC_TRANSPORTABLE
A list of settings.
Definition SettingList.h:15
Concept for classes that can reconstruct an instance from a serialised document object.
Definition Transportable.h:31
Concept for classes that can be serialised into a document.
Definition Transportable.h:25
Concept for classes that can be transported in a serialised document.
Definition Transportable.h:35
Concept for classes that specify a document type name to reconstruct objects from serialised data.
Definition Transportable.h:39
Definition Handler.h:15
Definition Transportable.h:13