SeqAn3
3.0.1
The Modern C++ library for sequence analysis.
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
concept.hpp
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------------------------------
2
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3
// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4
// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5
// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6
// -----------------------------------------------------------------------------------------------------
7
13
#pragma once
14
15
#include <
iosfwd
>
16
#include <type_traits>
17
18
#include <
seqan3/core/platform.hpp
>
19
20
namespace
seqan3
21
{
30
template
<
typename
stream_type,
typename
value_type>
32
SEQAN3_CONCEPT
output_stream_over
= std::is_base_of_v<std::ios_base, std::remove_reference_t<stream_type>> &&
33
requires (stream_type & os, value_type & val)
34
{
35
typename
std::remove_reference_t<stream_type>::char_type
;
36
typename
std::remove_reference_t<stream_type>::traits_type
;
37
typename
std::remove_reference_t<stream_type>::int_type
;
38
typename
std::remove_reference_t<stream_type>::pos_type
;
39
typename
std::remove_reference_t<stream_type>::off_type
;
40
41
{ os << val } ->
std::basic_ostream<typename std::remove_reference_t<stream_type>::char_type
,
42
typename
std::remove_reference_t<stream_type>::traits_type
> &;
43
};
44
45
template
<
typename
stream_type>
46
SEQAN3_CONCEPT output_stream = requires {
typename
std::remove_reference_t<stream_type>::char_type
; } &&
47
output_stream_over<stream_type, typename std::remove_reference_t<stream_type>::char_type
>;
49
87
97
template
<
typename
stream_type,
typename
value_type>
99
SEQAN3_CONCEPT
input_stream_over
= std::is_base_of_v<std::ios_base, std::remove_reference_t<stream_type>> &&
100
requires (stream_type & is, value_type & val)
101
{
102
typename
std::remove_reference_t<stream_type>::char_type
;
103
typename
std::remove_reference_t<stream_type>::traits_type
;
104
typename
std::remove_reference_t<stream_type>::int_type
;
105
typename
std::remove_reference_t<stream_type>::pos_type
;
106
typename
std::remove_reference_t<stream_type>::off_type
;
107
108
{ is >> val } ->
std::basic_istream<typename std::remove_reference_t<stream_type>::char_type
,
109
typename
std::remove_reference_t<stream_type>::traits_type
> &;
110
};
111
112
template
<
typename
stream_type>
113
SEQAN3_CONCEPT input_stream = requires {
typename
std::remove_reference_t<stream_type>::char_type
; } &&
114
input_stream_over<stream_type, typename std::remove_reference_t<stream_type>::char_type
>;
116
154
165
template
<
typename
stream_type,
typename
value_type>
167
SEQAN3_CONCEPT
stream_REMOVEME
=
output_stream_over<stream_type, value_type>
&&
168
input_stream_over<stream_type, value_type>
;
169
171
172
}
// namespace seqan3
stream_REMOVEME
Concept for i/o streams permitting both directions.
output_stream_over
Concept for output streams.
iosfwd
std::basic_ostream
seqan3
The main SeqAn3 namespace.
Definition:
aligned_sequence_concept.hpp:36
std::remove_reference_t
platform.hpp
Provides platform and dependency checks.
input_stream_over
Concept for input streams.
std::basic_istream
seqan3
io
stream
concept.hpp
Generated on Tue Feb 18 2020 09:33:17 for SeqAn3 by
1.8.16