SRS-control
0.1.4
Loading...
Searching...
No Matches
CommonConcepts.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <fstream>
4
5
namespace
srs
6
{
7
template
<
typename
T>
8
concept
Deserializer
=
requires
(T) {
9
typename
T::OutputType;
10
typename
T::InputType;
11
};
12
13
template
<
typename
T>
14
concept
StreamableOutput
=
requires
(T obj) { std::declval<std::ofstream>() << obj; };
15
16
template
<
typename
T>
17
concept
StreamableDeserializer
=
Deserializer<T>
and
StreamableOutput<typename T::OutputType>
;
18
19
template
<
typename
T>
20
concept
RangedData
=
requires
(T obj) {
21
requires
std::contiguous_iterator<
decltype
(obj.begin())>;
22
requires
std::contiguous_iterator<
decltype
(obj.end())>;
23
};
24
25
template
<
typename
DataType,
typename
TaskType>
26
concept
OutputCompatible
=
requires
(DataType, TaskType task) {
27
std::is_same_v<DataType, std::remove_cvref_t<
decltype
(task.get_output_data())>>;
28
};
29
30
};
// namespace srs
srs::Deserializer
Definition
CommonConcepts.hpp:8
srs::OutputCompatible
Definition
CommonConcepts.hpp:26
srs::RangedData
Definition
CommonConcepts.hpp:20
srs::StreamableDeserializer
Definition
CommonConcepts.hpp:17
srs::StreamableOutput
Definition
CommonConcepts.hpp:14
srs
Definition
Application.cpp:11
backend
srs
utils
CommonConcepts.hpp
Impressum
Datenschutzerklärung
Generated by
1.13.2