SeqAn3
3.0.2
The Modern C++ library for sequence analysis.
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
debug_stream_tuple.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 <
seqan3/std/ranges
>
17
18
#include <
seqan3/alphabet/concept.hpp
>
19
#include <
seqan3/core/concept/tuple.hpp
>
20
#include <
seqan3/core/detail/debug_stream_type.hpp
>
21
22
namespace
seqan3
23
{
27
}
// namespace seqan3
28
29
namespace
seqan3::detail
30
{
31
33
template
<
typename
char_t,
typename
tuple_t,
std::size_t
...I>
34
void
print_tuple(
debug_stream_type<char_t>
& s, tuple_t && t,
std::index_sequence<I...>
const
&)
35
{
36
using
std::get
;
37
s <<
'('
;
38
((s << (I == 0 ?
""
:
","
) << get<I>(t)), ...);
39
s <<
')'
;
40
}
41
52
template
<
typename
tuple_t>
54
SEQAN3_CONCEPT debug_streamable_tuple = !std::ranges::input_range<tuple_t> &&
55
!
alphabet<tuple_t>
&&
// exclude alphabet_tuple_base
56
tuple_like<std::remove_cvref_t<tuple_t>
>;
58
}
// namespace seqan3::detail
59
60
namespace
seqan3
61
{
62
69
template
<
typename
char
_t,
typename
tuple_t>
71
requires (detail::debug_streamable_tuple<tuple_t>)
73
inline
debug_stream_type<char_t> &
operator<<
(debug_stream_type<char_t> & s, tuple_t && t)
74
{
75
detail::print_tuple(s, std::forward<tuple_t>(t),
76
std::make_index_sequence
<
std::tuple_size_v
<
std::remove_cvref_t<tuple_t>
>>{});
77
return
s;
78
}
79
81
82
}
// namespace seqan3
tuple.hpp
Provides seqan3::tuple_like.
std::index_sequence
seqan3::views::get
auto const get
A view calling std::get on each element in a range.
Definition:
get.hpp:65
debug_stream_type.hpp
Provides seqan3::debug_stream and related types.
concepts
The Concepts library.
seqan3::debug_stream_type
A "pretty printer" for most SeqAn data structures and related types.
Definition:
debug_stream_type.hpp:71
seqan3
The main SeqAn3 namespace.
Definition:
aligned_sequence_concept.hpp:29
tuple_like
Whether a type behaves like a tuple.
ranges
Adaptations of concepts from the Ranges TS.
alphabet
The generic alphabet concept that covers most data types used in ranges.
seqan3::operator<<
debug_stream_type< char_t > & operator<<(debug_stream_type< char_t > &stream, alignment_t &&alignment)
Stream operator for alignments, which are represented as tuples of aligned sequences.
Definition:
debug_stream_alignment.hpp:103
std::remove_cvref_t
std::size_t
concept.hpp
Core alphabet concept and free function/type trait wrappers.
std::tuple_size_v
T tuple_size_v
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
core
detail
debug_stream_tuple.hpp
Generated on Thu Dec 3 2020 18:58:18 for SeqAn3 by
1.8.20