SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
output_format_concept.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2019, 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 <fstream>
16 #include <set>
17 #include <string>
18 #include <vector>
19 
24 
25 namespace seqan3::detail
26 {
27 
29 template <typename t>
30 class structure_file_output_format
31 {};
32 
33 } // namespace seqan3::detail
34 
35 namespace seqan3
36 {
37 
48 template <typename t>
50 SEQAN3_CONCEPT StructureFileOutputFormat = requires(detail::structure_file_output_format<t> & v,
51  std::ofstream & f,
52  structure_file_output_options & options,
53  rna5_vector & seq,
54  std::string & id,
56  std::vector<wuss51> & structure,
57  std::vector<structured_rna<rna5, wuss51>> & structured_seq,
58  double energy,
59  double react,
60  double react_err,
61  std::string & comment,
62  size_t offset)
63 {
64  t::file_extensions;
65 
66  { v.write(f, options, seq, id, bpp, structure,
67  energy, react, react_err, comment, offset) } -> void;
68  { v.write(f, options, seq, id, bpp, std::ignore,
69  std::ignore, std::ignore, std::ignore, std::ignore, std::ignore) } -> void;
70  { v.write(f, options, structured_seq, id, std::ignore, structured_seq,
71  energy, std::ignore, std::ignore, std::ignore, std::ignore) } -> void;
72  { v.write(f, options, std::ignore, std::ignore, std::ignore, std::ignore,
73  std::ignore, std::ignore, std::ignore, std::ignore, std::ignore) } -> void;
74  // the last is required to be compile time valid, but should always throw at run-time.
75 };
77 
136 
138 } // namespace seqan3
139 
140 namespace seqan3::detail
141 {
142 
148 template <typename t>
149 constexpr bool is_type_list_of_structure_file_output_formats_v = false;
150 
156 template <typename ... ts>
157 constexpr bool is_type_list_of_structure_file_output_formats_v<type_list<ts...>>
158  = (StructureFileOutputFormat<ts> && ...);
159 
165 template <typename t>
166 SEQAN3_CONCEPT TypeListOfStructureFileOutputFormats = is_type_list_of_structure_file_output_formats_v<t>;
167 } // namespace seqan3::detail
constexpr sequenced_policy seq
Global execution policy object for sequenced execution policy.
Definition: execution.hpp:54
Meta-header for the structure module. It includes all headers from alphabet/structure/.
The main SeqAn3 namespace.
Provides seqan3::rna5, container aliases and string literals.
Provides seqan3::structure_file_output_options.
Provides seqan3::type_list and auxiliary type traits.
Definition: aligned_sequence_concept.hpp:35
meta::list< types... > type_list
Type that contains multiple types, an alias for meta::list.
Definition: type_list.hpp:27