SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
seqan3::custom::alphabet< char_type > Struct Template Reference

Alphabet specific customisations for builtin char types. More...

#include <seqan3/alphabet/adaptation/char.hpp>

Static Public Member Functions

static constexpr char_type & assign_char_to (char_type const chr2, char_type &chr) noexcept
 Assign a char to the char type (same as calling =). More...
 
static constexpr char_type & assign_rank_to (decltype(alphabet::to_rank(char_type{})) const rank, char_type &chr) noexcept
 Assigning a rank to a char is the same as assigning it a numeric value. More...
 
static constexpr char_type to_char (char_type const chr) noexcept
 Converting char to char is no-op (it will just return the value you pass in). More...
 
static constexpr auto to_rank (char_type const chr) noexcept
 Convert char to rank by casting to an unsigned integral type of same size. More...
 

Static Public Attributes

static constexpr auto alphabet_size
 The number of values the char type can take (e.g. 256 for char). More...
 

Detailed Description

template<typename char_type>
struct seqan3::custom::alphabet< char_type >

Alphabet specific customisations for builtin char types.

Template Parameters
char_typeOne of char, char16_t, char32_t or wchar_t.

Member Function Documentation

◆ assign_char_to()

template<typename char_type >
static constexpr char_type& seqan3::custom::alphabet< char_type >::assign_char_to ( char_type const  chr2,
char_type &  chr 
)
inlinestaticconstexprnoexcept

Assign a char to the char type (same as calling =).

Parameters
[in]chr2The char value you wish to assign.
[in,out]chrThe alphabet letter that you wish to assign to.
Returns
A reference to the alphabet letter you passed in.

◆ assign_rank_to()

template<typename char_type >
static constexpr char_type& seqan3::custom::alphabet< char_type >::assign_rank_to ( decltype(alphabet< char_type >::to_rank(char_type{})) const  rank,
char_type &  chr 
)
inlinestaticconstexprnoexcept

Assigning a rank to a char is the same as assigning it a numeric value.

Parameters
[in]rankThe rank value you wish to assign.
[in,out]chrThe alphabet letter that you wish to assign to.
Returns
A reference to the alphabet letter you passed in.

◆ to_char()

template<typename char_type >
static constexpr char_type seqan3::custom::alphabet< char_type >::to_char ( char_type const  chr)
inlinestaticconstexprnoexcept

Converting char to char is no-op (it will just return the value you pass in).

Parameters
[in]chrThe alphabet letter that you wish to convert to char (no-op).
Returns
chr.

◆ to_rank()

template<typename char_type >
static constexpr auto seqan3::custom::alphabet< char_type >::to_rank ( char_type const  chr)
inlinestaticconstexprnoexcept

Convert char to rank by casting to an unsigned integral type of same size.

Parameters
[in]chrThe alphabet letter that you wish to convert to rank.
Returns
The letter's value in the alphabet's rank type (usually a uint*_t).

Member Data Documentation

◆ alphabet_size

template<typename char_type >
constexpr auto seqan3::custom::alphabet< char_type >::alphabet_size
staticconstexpr
Initial value:
=
detail::min_viable_uint_t<detail::size_in_values_v<char_type>>{detail::size_in_values_v<char_type>}

The number of values the char type can take (e.g. 256 for char).


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