SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
seqan3::detail::is_in_alphabet_type< alphabet_t > Struct Template Reference

Parse condition that checks if a given value is within the given alphabet alphabet_t. More...

#include <seqan3/utility/char_operations/predicate_detail.hpp>

+ Inheritance diagram for seqan3::detail::is_in_alphabet_type< alphabet_t >:

Public Types

using base_t = char_predicate_base< is_in_alphabet_type< alphabet_t > >
 The base type.
 
using data_t = constexpr_pseudo_bitset< 257 >
 Type of the data field; as soon as std::bitset is fully constexpr, use that instead!
 

Public Member Functions

Requirements for seqan3::detail::char_predicate

You can expect the variable and the predicate function on all types that satisfy seqan3::output_stream_over.

bool operator() (char_type c)
 predicate function to test if c satisfies the given condition. More...
 
Logical operators

Adds logical operators to allow logical disjunction, conjunction and negation on parse conditions.

constexpr auto operator|| (rhs_t const &) const
 Combines the result of two seqan3::detail::char_predicate via logical disjunction.
 
constexpr auto operator! () const
 Return a new condition with all bits flipped.
 
Function call operator
constexpr bool operator() (value_t const val) const noexcept
 Invokes the condition on val.
 
Output functions
std::string message () const
 Returns the message representing this condition as std::string.
 

Static Public Attributes

static constexpr data_t data
 The look-up table that is used to evaluate the input. More...
 
static const std::string msg
 The message representing this condition. More...
 

Related Functions

(Note that these are not member functions.)

template<char op, typename condition_head_t , typename ... condition_ts>
const std::string condition_message_v
 Defines a compound std::string consisting of all given conditions separated by the operator-name op. More...
 

Detailed Description

template<detail::constexpr_alphabet alphabet_t>
struct seqan3::detail::is_in_alphabet_type< alphabet_t >

Parse condition that checks if a given value is within the given alphabet alphabet_t.

Template Parameters
alphabet_tThe alphabet type. Must model seqan3::alphabet.

Member Function Documentation

◆ operator()()

bool operator() ( char_type  c)
inherited

predicate function to test if c satisfies the given condition.

Parameters
cThe character to be tested.
Returns
true on success, false otherwise.
Attention
This is a concept requirement, not an actual function (however types satisfying this concept will provide an implementation).

Member Data Documentation

◆ data

template<detail::constexpr_alphabet alphabet_t>
constexpr data_t seqan3::detail::is_in_alphabet_type< alphabet_t >::data
staticconstexpr
Initial value:
= [] () constexpr
{
data_t ret{};
for (size_t i = 0; i < 256; ++i)
ret[i] = char_is_valid_for<alphabet_t>(static_cast<uint8_t>(i));
return ret;
}()
constexpr_pseudo_bitset< 257 > data_t
Type of the data field; as soon as std::bitset is fully constexpr, use that instead!
Definition: predicate_detail.hpp:167

The look-up table that is used to evaluate the input.

◆ msg

template<detail::constexpr_alphabet alphabet_t>
const std::string seqan3::detail::is_in_alphabet_type< alphabet_t >::msg
inlinestatic
Initial value:
= std::string{"is_in_alphabet<"} +
detail::type_name_as_string<alphabet_t> +

The message representing this condition.


The documentation for this struct was generated from the following file: