SeqAn3
auxiliary.hpp
Go to the documentation of this file.
1 // ============================================================================
2 // SeqAn - The Library for Sequence Analysis
3 // ============================================================================
4 //
5 // Copyright (c) 2006-2018, Knut Reinert & Freie Universitaet Berlin
6 // Copyright (c) 2016-2018, Knut Reinert & MPI Molekulare Genetik
7 // All rights reserved.
8 //
9 // Redistribution and use in source and binary forms, with or without
10 // modification, are permitted provided that the following conditions are met:
11 //
12 // * Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 // * Redistributions in binary form must reproduce the above copyright
15 // notice, this list of conditions and the following disclaimer in the
16 // documentation and/or other materials provided with the distribution.
17 // * Neither the name of Knut Reinert or the FU Berlin nor the names of
18 // its contributors may be used to endorse or promote products derived
19 // from this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 // ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
25 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
31 // DAMAGE.
32 //
33 // ============================================================================
34 
40 #pragma once
41 
42 #include <sstream>
43 #include <vector>
44 
46 
47 namespace seqan3
48 {
49 
61 {
62  DEFAULT = 0,
63  REQUIRED = 1,
68  ADVANCED = 2,
72  HIDDEN = 4,
77 };
78 
90 struct argument_parser_meta_data // holds all meta information
91 {
93  std::string app_name;
95  std::string version;
97  std::string short_description;
99  std::string author;
101  std::string email;
105  std::string date;
107  std::string url;
109  std::string short_copyright;
113  std::string long_copyright;
115  std::string citation;
119  std::string man_page_title;
121  unsigned man_page_section{1};
127  std::vector<std::string> description;
129  std::vector<std::string> synopsis;
134  std::vector<std::string> examples;
135 };
136 
137 namespace detail
138 {
139 
146 template <typename ...value_type>
148 requires (ostream_concept<std::iostream, std::remove_reference_t<value_type>> && ...)
150 std::string to_string(value_type && ...values)
151 {
152  std::stringstream stream;
153  (stream << ... << std::forward<value_type>(values));
154  return stream.str();
155 }
156 
157 } // namespace detail
158 
159 } // namespace seqan3
std::vector< std::string > description
A more detailed description that is displayed on the help page in the section "DESCRIPTION". Each std::string appended to the description vector will be treated as a paragraph and is separated by a new line.
Definition: auxiliary.hpp:127
std::string url
A link to github, your website or a wiki page.
Definition: auxiliary.hpp:107
std::string citation
How users shall cite your application.
Definition: auxiliary.hpp:115
std::string version
The version information MAJOR.MINOR.PATH (e.g. 3.1.3)
Definition: auxiliary.hpp:95
Definition: auxiliary.hpp:72
unsigned man_page_section
The man page section info (type man man on the command line for more information).
Definition: auxiliary.hpp:121
std::string email
The author&#39;s e-mail address for correspondence.
Definition: auxiliary.hpp:101
std::vector< std::string > synopsis
Add lines of usage to the synopsis section of the help page (e.g. "[OPTIONS] FILE1 FILE1")...
Definition: auxiliary.hpp:129
std::string long_copyright
Detailed copyright information that will be displayed when the user specifies "--copyright" on the co...
Definition: auxiliary.hpp:113
std::string man_page_title
The title of your man page when exported by specifying "--export-help man" on the common line...
Definition: auxiliary.hpp:119
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:58
Stores all parser related meta information of the seqan3::argument_parser.
Definition: auxiliary.hpp:90
std::string app_name
The application name that will be displayed on the help page.
Definition: auxiliary.hpp:93
std::vector< std::string > examples
Provide some examples on how to use your tool and what standard parameters might be appropriate in di...
Definition: auxiliary.hpp:134
std::string date
The date that the application was last updated. Keep this updated, ! since it will tell your users th...
Definition: auxiliary.hpp:105
Definition: auxiliary.hpp:68
Stream concepts.
option_spec
Used to further specify argument_parser options/flags.
Definition: auxiliary.hpp:60
std::string short_copyright
Brief copyright (and/or license) information.
Definition: auxiliary.hpp:109
Definition: auxiliary.hpp:63
std::string author
Your name ;-)
Definition: auxiliary.hpp:99
Concept for output streams.
Type metafunction that returns the value_type of another type [metafunction declaration].
Definition: pre.hpp:66
The default were no checking or special displaying is happening.
Definition: auxiliary.hpp:62
std::string short_description
A short description of the application (e.g. "A tool for mapping reads to the genome").
Definition: auxiliary.hpp:97