File: validators_input_file_ext_from_file.cpp

package info (click to toggle)
seqan3 3.0.2%2Bds-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,052 kB
  • sloc: cpp: 144,641; makefile: 1,288; ansic: 294; sh: 228; xml: 217; javascript: 50; python: 27; php: 25
file content (20 lines) | stat: -rw-r--r-- 856 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <seqan3/argument_parser/validators.hpp>
#include <seqan3/io/sequence_file/input.hpp>
#include <seqan3/core/debug_stream.hpp>

int main(int argc, const char ** argv)
{
    // Default constructed validator has an empty extension list.
    seqan3::input_file_validator validator1{};
    seqan3::debug_stream << validator1.get_help_page_message() << "\n";

    // Specify your own extensions for the input file.
    seqan3::input_file_validator validator2{std::vector{std::string{"exe"}, std::string{"fasta"}}};
    seqan3::debug_stream << validator2.get_help_page_message() << "\n";

    // Give the seqan3 file type as a template argument to get all valid extensions for this file.
    seqan3::input_file_validator<seqan3::sequence_file_input<>> validator3{};
    seqan3::debug_stream << validator3.get_help_page_message() << "\n";

    return 0;
}