SeqAn3
3.0.2
The Modern C++ library for sequence analysis.
▼
SeqAn3
Welcome
►
Setup
►
Tutorial
►
How-To
Cookbook
►
About
►
API Reference (Modules)
▼
API Reference (details)
►
Namespace List
►
Class List
▼
File List
►
File List
►
File Members
•
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 <
seqan3/std/concepts
>
16
#include <
iosfwd
>
17
#include <type_traits>
18
19
#include <
seqan3/core/platform.hpp
>
20
21
namespace
seqan3
22
{
31
template
<
typename
stream_type,
typename
value_type>
33
SEQAN3_CONCEPT
output_stream_over
= std::is_base_of_v<std::ios_base, std::remove_reference_t<stream_type>> &&
34
requires (stream_type & os, value_type & val)
35
{
36
typename
std::remove_reference_t<stream_type>::char_type
;
37
typename
std::remove_reference_t<stream_type>::traits_type
;
38
typename
std::remove_reference_t<stream_type>::int_type
;
39
typename
std::remove_reference_t<stream_type>::pos_type
;
40
typename
std::remove_reference_t<stream_type>::off_type
;
41
42
SEQAN3_RETURN_TYPE_CONSTRAINT
(os << val,
43
std::same_as,
44
std::basic_ostream
<
typename
std::remove_reference_t<stream_type>::char_type
,
45
typename
std::remove_reference_t<stream_type>::traits_type
> &);
46
};
47
48
template
<
typename
stream_type>
49
SEQAN3_CONCEPT output_stream = requires {
typename
std::remove_reference_t<stream_type>::char_type
; } &&
50
output_stream_over<stream_type, typename std::remove_reference_t<stream_type>::char_type
>;
52
90
100
template
<
typename
stream_type,
typename
value_type>
102
SEQAN3_CONCEPT
input_stream_over
= std::is_base_of_v<std::ios_base, std::remove_reference_t<stream_type>> &&
103
requires (stream_type & is, value_type & val)
104
{
105
typename
std::remove_reference_t<stream_type>::char_type
;
106
typename
std::remove_reference_t<stream_type>::traits_type
;
107
typename
std::remove_reference_t<stream_type>::int_type
;
108
typename
std::remove_reference_t<stream_type>::pos_type
;
109
typename
std::remove_reference_t<stream_type>::off_type
;
110
111
112
SEQAN3_RETURN_TYPE_CONSTRAINT
(is >> val,
113
std::same_as,
114
std::basic_istream
<
typename
std::remove_reference_t<stream_type>::char_type
,
115
typename
std::remove_reference_t<stream_type>::traits_type
> &);
116
};
117
118
template
<
typename
stream_type>
119
SEQAN3_CONCEPT input_stream = requires {
typename
std::remove_reference_t<stream_type>::char_type
; } &&
120
input_stream_over<stream_type, typename std::remove_reference_t<stream_type>::char_type
>;
122
160
171
template
<
typename
stream_type,
typename
value_type>
173
SEQAN3_CONCEPT
stream_REMOVEME
=
output_stream_over<stream_type, value_type>
&&
174
input_stream_over<stream_type, value_type>
;
175
177
178
}
// namespace seqan3
output_stream_over
Concept for output streams.
iosfwd
concepts
The Concepts library.
std::basic_ostream
seqan3
The main SeqAn3 namespace.
Definition:
aligned_sequence_concept.hpp:29
SEQAN3_RETURN_TYPE_CONSTRAINT
#define SEQAN3_RETURN_TYPE_CONSTRAINT(expression, concept_name,...)
Same as writing {expression} -> concept_name<type1[, ...]> in a concept definition.
Definition:
platform.hpp:57
std::remove_reference_t
platform.hpp
Provides platform and dependency checks.
stream_REMOVEME
Concept for i/o streams permitting both directions.
input_stream_over
Concept for input streams.
std::basic_istream
Version:
main_user
main_dev
3.4.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
seqan3
io
stream
concept.hpp
Generated on Thu Dec 3 2020 18:58:18 for SeqAn3 by
1.8.20