The stream sub-module contains data structures and functions for streaming and tokenization. More...
Classes | |
class | seqan3::debug_stream_type |
A "pretty printer" for most SeqAn data structures and related types. More... | |
interface | seqan3::istream_concept |
Concept for input streams. More... | |
interface | seqan3::ostream_concept |
Concept for output streams. More... | |
struct | seqan3::parse_asserter< condition_type > |
A condition checker, that wraps a parse condition and throws a specified exception if the condition was not met. More... | |
interface | seqan3::stream_concept |
Concept for i/o streams permitting both directions.An object satisfying the requirements of a stream concept can be used to stream in both (input and output) directions. More... | |
Enumerations | |
enum | seqan3::fmtflags2 { seqan3::none = 0, seqan3::none = 0b0000, seqan3::utf8 = 1, seqan3::small_int_as_number = 1 << 1, default_ = small_int_as_number } |
Flags that change the behaviour of the seqan3::debug_stream. More... | |
Variables | |
template<char op, typename condition_head_t , typename ... condition_ts> | |
constexpr_string constexpr | condition_message_v |
Defines a compound seqan3::constexpr_string consisting of all given conditions separated by the operator-name op . More... | |
debug_stream_type | seqan3::debug_stream {} |
A global instance of seqan3::debug_stream_type. | |
Parse conditions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parse conditions are function like objects that can be used to check if a character Disjunction and NegationIn contrast to the standard library (where the checks are implemented as functions), the functors in SeqAn3 can be joined efficiently, maintaining constant-time evaluation independent of the number of checks. Functors can be combined with the auto constexpr my_cond = is_char<'%'> || is_digit; bool is_percent = my_cond(*example_it); Defining complex combinations and using them in e.g. input/output can increase speed significantly over checking multiple functions: we measured speed-ups of 10x for a single check and speed-ups of over 20x for complex combinations. Custom conditions
Standard library conditionsSeqAn offers the 12 conditions exactly as defined in the standard library except that we have introduced an underscore in the name to be consistent with our other naming. The following table lists the predefined parse conditions and which constraints are associated with them.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
template<uint8_t interval_first, uint8_t interval_last> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
detail::is_in_interval_type< interval_first, interval_last > constexpr | seqan3::is_in_interval {} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether a given letter is in the specified interval. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
template<alphabet_concept alphabet_t> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
detail::is_in_alphabet_type< alphabet_t > constexpr | seqan3::is_in_alphabet {} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether a given letter is valid for the specified seqan3::alphabet_concept. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
template<int char_v> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
detail::is_char_type< char_v > constexpr | seqan3::is_char | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether a given letter is the same as the template non-type argument. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_cntrl | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a control character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_print = is_in_interval<' ', '~'> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a printable character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_space = is_in_interval<'\t', '\r'> || is_char<' '> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a space character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_blank = is_char<'\t'> || is_char<' '> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a blank character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_graph = is_in_interval<'!', '~'> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a graphic character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_punct | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a punctuation character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_alnum | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a alphanumeric character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_alpha = is_in_interval<'A', 'Z'> || is_in_interval<'a', 'z'> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a alphabetical character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_upper = is_in_interval<'A', 'Z'> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a upper case character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_lower = is_in_interval<'a', 'z'> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a lower case character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_digit = is_in_interval<'0', '9'> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a digital character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_xdigit | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether c is a hexadecimal character. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auto constexpr | seqan3::is_eof = is_char<EOF> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Checks whether a given letter is equal to the EOF constant defined in <cstdio> . More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The stream sub-module contains data structures and functions for streaming and tokenization.
enum seqan3::fmtflags2 |
Flags that change the behaviour of the seqan3::debug_stream.
Enumerator | |
---|---|
none | No flag is set. |
none | No free gaps at the sequence ends. Each gap is scored according to seqan3::align_cfg::gap. |
utf8 | Enables use of non-ASCII UTF8 characters in formatted output. |
small_int_as_number |
|
|
inline |
Defines a compound seqan3::constexpr_string consisting of all given conditions separated by the operator-name op
.
op | non-type template parameter specifying the separator character, e.g. '|'. |
condition_head_t | The first condition type in the message. Ensures that there is at least one type. |
condition_ts | Remaining list of conditions separated by op . |
|
inline |
Checks whether c
is a alphanumeric character.
This function like object can be used to check if a character c
is a alphanumeric character. For the standard ASCII character set, the following characters are alphanumeric characters:
|
inline |
Checks whether c
is a alphabetical character.
This function like object can be used to check if a character c
is a alphabetical character. For the standard ASCII character set, the following characters are alphabetical characters:
Checks whether c
is a blank character.
This function like object can be used to check if a character c
is a blank character. For the standard ASCII character set, the following characters are blank characters:
|
inline |
Checks whether a given letter is the same as the template non-type argument.
char_v | The letter to compare against. |
This function like object returns true if the argument is the same as the template argument, false otherwise.
|
inline |
Checks whether c
is a control character.
This function like object can be used to check if a character c
is a control character. For the standard ASCII character set, control characters are those between ASCII codes 0x00 (NUL) and 0x1f (US) and 0x7f (DEL).
|
inline |
Checks whether c
is a digital character.
This function like object can be used to check if a character c
is a digital character. For the standard ASCII character set, the following characters are digital characters:
|
inline |
|
inline |
Checks whether c
is a graphic character.
This function like object can be used to check if a character c
is a graphic (has a graphical representation) character. For the standard ASCII character set, the following characters are graphic characters:
|
inline |
Checks whether a given letter is valid for the specified seqan3::alphabet_concept.
alphabet_t | The alphabet to check; must model seqan3::alphabet_concept. |
This function like object returns true for all characters of the alphabet, false otherwise. The actual check being performed is whether assigning and then reading a letter results in the original input (but case is ignored).
|
inline |
Checks whether a given letter is in the specified interval.
interval_first | The first character for which to return true. |
interval_last | The last character (inclusive) for which to return true. |
This function like object returns true for all characters in the given range, false otherwise.
|
inline |
Checks whether c
is a lower case character.
This function like object can be used to check if a character c
is a lower case character. For the standard ASCII character set, the following characters are lower case characters:
|
inline |
Checks whether c
is a printable character.
This function like object can be used to check if a character c
is a printable character. For the standard ASCII character set, printable characters are those between ASCII codes 0x20 (space) and 0x7E (~
).
|
inline |
Checks whether c
is a punctuation character.
This function like object can be used to check if a character c
is a punctuation character. For the standard ASCII character set, the following characters are punctuation characters:
|
inline |
Checks whether c
is a space character.
This function like object can be used to check if a character c
is a space character. For the standard ASCII character set, the following characters are space characters:
|
inline |
Checks whether c
is a upper case character.
This function like object can be used to check if a character c
is a upper case character. For the standard ASCII character set, the following characters are upper case characters:
|
inline |
Checks whether c
is a hexadecimal character.
This function like object can be used to check if a character c
is a hexadecimal character. For the standard ASCII character set, the following characters are hexadecimal characters: