Loading...
Searching...
No Matches
seqan3::custom::alphabet< char_type > Struct Template Reference
Alphabet » Adaptation

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

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

Inheritance diagram for seqan3::custom::alphabet< char_type >:
[legend]

## 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 =).
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.
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).
static constexpr auto | to_rank (char_type const chr) noexcept
| Convert char to rank by casting to an unsigned integral type of same size.

## Static Public Attributes

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

## Detailed Description

template<typename char_type>
requires detail::is_char_adaptation_v<char_type>
struct seqan3::custom::alphabet< char_type >

Alphabet specific customisations for builtin char types.

Template Parameters

  char_type | One of char, char16_t, char32_t or wchar_t.

This entity is stable. Since version 3.1.

## Member Function Documentation

## assign_char_to()

template<typename char_type>

constexpr char_type & seqan3::custom::alphabet< char_type >::assign_char_to | ( | char_type const | chr2,
|  | char_type & | chr )

inline static constexpr noexcept

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

Parameters

  [in] | chr2 | The char value you wish to assign.
  [in,out] | chr | The alphabet letter that you wish to assign to.

Returns
  A reference to the alphabet letter you passed in.

This entity is stable. Since version 3.1.

## assign_rank_to()

template<typename char_type>

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

inline static constexpr noexcept

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

Parameters

  [in] | rank | The rank value you wish to assign.
  [in,out] | chr | The alphabet letter that you wish to assign to.

Returns
  A reference to the alphabet letter you passed in.

This entity is stable. Since version 3.1.

## to_char()

template<typename char_type>

constexpr char_type seqan3::custom::alphabet< char_type >::to_char | ( | char_type const | chr | ) |

inline static constexpr noexcept

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

Parameters

  [in] | chr | The alphabet letter that you wish to convert to char (no-op).

Returns
  chr.

This entity is stable. Since version 3.1.

## to_rank()

template<typename char_type>

constexpr auto seqan3::custom::alphabet< char_type >::to_rank | ( | char_type const | chr | ) |

inline static constexpr noexcept

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

Parameters

  [in] | chr | The alphabet letter that you wish to convert to rank.

Returns
  The letter's value in the alphabet's rank type (usually a uint*_t).

This entity is stable. Since version 3.1.

## Member Data Documentation

## alphabet_size

template<typename char_type>

auto seqan3::custom::alphabet< char_type >::alphabet_size

static constexpr

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).

This entity is stable. Since version 3.1.

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

- char.hpp

Hide me