The CRTP base for a combined alphabet that contains multiple values of different alphabets at the same time..
More...
|
|
These overloads enable comparison for all types that a component type is comparable with.
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator== (derived_type_t const lhs, indirect_component_type const rhs) noexcept -> std::enable_if_t< detail::tuple_eq_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator== (indirect_component_type const lhs, derived_type_t const rhs) noexcept -> std::enable_if_t< detail::tuple_eq_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator!= (derived_type_t const lhs, indirect_component_type const rhs) noexcept -> std::enable_if_t< detail::tuple_eq_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator!= (indirect_component_type const lhs, derived_type_t const rhs) noexcept -> std::enable_if_t< detail::tuple_eq_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator< (derived_type_t const lhs, indirect_component_type const rhs) noexcept -> std::enable_if_t< detail::tuple_order_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator< (indirect_component_type const lhs, derived_type_t const rhs) noexcept -> std::enable_if_t< detail::tuple_order_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator<= (derived_type_t const lhs, indirect_component_type const rhs) noexcept -> std::enable_if_t< detail::tuple_order_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator<= (indirect_component_type const lhs, derived_type_t const rhs) noexcept -> std::enable_if_t< detail::tuple_order_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator> (derived_type_t const lhs, indirect_component_type const rhs) noexcept -> std::enable_if_t< detail::tuple_order_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator> (indirect_component_type const lhs, derived_type_t const rhs) noexcept -> std::enable_if_t< detail::tuple_order_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator>= (derived_type_t const lhs, indirect_component_type const rhs) noexcept -> std::enable_if_t< detail::tuple_order_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
template<typename derived_type_t , typename indirect_component_type > |
constexpr auto | operator>= (indirect_component_type const lhs, derived_type_t const rhs) noexcept -> std::enable_if_t< detail::tuple_order_guard< derived_type_t, derived_type, indirect_component_type, component_types... >, bool > |
| Comparison against types comparable with components. More...
|
|
|
|
- Attention
- Please do not directly use the CRTP base class. The functions are only public for the usage in their derived classes (e.g. seqan3::qualified, seqan3::masked, seqan3::structure_rna and seqan3::structure_aa).
|
constexpr | alphabet_tuple_base () noexcept |
| Defaulted.
|
|
constexpr | alphabet_tuple_base (alphabet_tuple_base const &)=default |
| Defaulted.
|
|
constexpr | alphabet_tuple_base (alphabet_tuple_base &&)=default |
| Defaulted.
|
|
constexpr alphabet_tuple_base & | operator= (alphabet_tuple_base const &)=default |
| Defaulted.
|
|
constexpr alphabet_tuple_base & | operator= (alphabet_tuple_base &&)=default |
| Defaulted.
|
|
| ~alphabet_tuple_base ()=default |
| Defaulted.
|
|
constexpr | alphabet_tuple_base (component_types... components) noexcept |
| Construction from initialiser-list.
|
|
template<typename component_type >
requires (!std::is_base_of_v<alphabet_tuple_base, component_type>) && is_unique_component<component_type> |
constexpr | alphabet_tuple_base (component_type const alph) noexcept |
| Construction via a value of one of the components. More...
|
|
template<typename indirect_component_type >
requires ((detail::instantiate_if_v< detail::lazy<std::is_convertible, indirect_component_type, component_types>, detail::tuple_general_guard<derived_type, indirect_component_type, component_types...>> || ...)) |
constexpr | alphabet_tuple_base (indirect_component_type const alph) noexcept |
| Construction via a value of a subtype that is assignable to one of the components. More...
|
|
template<typename component_type >
requires (!std::derived_from<component_type, alphabet_tuple_base>) && is_unique_component<component_type> |
constexpr derived_type & | operator= (component_type const alph) noexcept |
| Assignment via a value of one of the components. More...
|
|
template<typename indirect_component_type >
requires ((!std::derived_from<indirect_component_type, alphabet_tuple_base>) && (!is_unique_component<indirect_component_type>) && (std::assignable_from<component_types, indirect_component_type> || ...)) |
constexpr derived_type & | operator= (indirect_component_type const alph) noexcept |
| Assignment via a value of a subtype that is assignable to one of the components. More...
|
|
|
constexpr | alphabet_base () noexcept=default |
| Defaulted.
|
|
constexpr | alphabet_base (alphabet_base const &) noexcept=default |
| Defaulted.
|
|
constexpr | alphabet_base (alphabet_base &&) noexcept=default |
| Defaulted.
|
|
constexpr alphabet_base & | operator= (alphabet_base const &) noexcept=default |
| Defaulted.
|
|
constexpr alphabet_base & | operator= (alphabet_base &&) noexcept=default |
| Defaulted.
|
|
| ~alphabet_base () noexcept=default |
| Defaulted.
|
|
constexpr char_type | to_char () const noexcept |
| Return the letter as a character of char_type. More...
|
|
constexpr rank_type | to_rank () const noexcept |
| Return the letter's numeric value (rank in the alphabet). More...
|
|
constexpr derived_type & | assign_char (char_type const chr) noexcept |
| Assign from a character, implicitly converts invalid characters. More...
|
|
constexpr derived_type & | assign_rank (rank_type const c) noexcept |
| Assign from a numeric value. More...
|
|
static constexpr detail::min_viable_uint_t< size > | alphabet_size |
| The size of the alphabet, i.e. the number of different values it can take. More...
|
|
using | char_type = std::conditional_t< std::same_as< void, void >, char, void > |
| The char representation; conditional needed to make semi alphabet definitions legal. More...
|
|
using | rank_type = detail::min_viable_uint_t< size - 1 > |
| The type of the alphabet when represented as a number (e.g. via to_rank()). More...
|
|
template<cereal_output_archive archive_t, semialphabet alphabet_t> |
alphabet_rank_t< alphabet_t > | save_minimal (archive_t const &, alphabet_t const &l) |
| Save an alphabet letter to stream. More...
|
|
template<cereal_input_archive archive_t, typename wrapped_alphabet_t > |
void | load_minimal (archive_t const &, wrapped_alphabet_t &&l, alphabet_rank_t< detail::strip_cereal_wrapper_t< wrapped_alphabet_t > > const &r) |
| Restore an alphabet letter from a saved rank. More...
|
|
template<typename
derived_type, typename... component_types>
requires (detail::writable_constexpr_semialphabet<component_types> && ...) && (std::regular<component_types> && ...)
class seqan3::alphabet_tuple_base< derived_type, component_types >
The CRTP base for a combined alphabet that contains multiple values of different alphabets at the same time.
.
- Template Parameters
-
This data structure is a CRTP base class for combined alphabets, where the different alphabet letters exist independently as a components, similar to a tuple.
Short description:
- combines multiple alphabets as independent components, similar to a tuple;
- models seqan3::tuple_like, i.e. provides a get interface to its component_list;
- is itself a seqan3::writable_semialphabet, but most derived types implement the full seqan3::writable_alphabet;
- its alphabet size is the product of the individual sizes;
- constructible, assignable and comparable with each component type and also all types that these are constructible/assignable/comparable with;
- explicitly convertible to each of its component types
- Attention
- This is a "pure base class", you cannot instantiate it, you can only inherit from it. Most likely you are interested in using one of it's descendants like seqan3::qualified or seqan3::masked.
To make a derived class "complete", you should add at least the following:
- See also
- qualified
-
masked
This entity is stable. Since version 3.1.