PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
Concepts.h
Go to the documentation of this file.
1
8
9#ifndef PBAT_IO_CONCEPTS_H
10#define PBAT_IO_CONCEPTS_H
11
12#include "Archive.h"
13
14#include <concepts>
15#include <utility>
16
17namespace pbat::io {
18
23template <class T>
24concept CSerializable = requires(T t)
25{
26 {t.Serialize(std::declval<Archive&>())};
27};
28
33template <class T>
34concept CDeserializable = requires(T t)
35{
36 {t.Deserialize(std::declval<Archive const&>())};
37};
38
39} // namespace pbat::io
40
41#endif // PBAT_IO_CONCEPTS_H
(De)serializer
Concept for a deserializable object.
Definition Concepts.h:34
Concept for a serializable object.
Definition Concepts.h:24
Namespace for I/O.
Definition Archive.cpp:7