SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
char.hpp File Reference

Provides alphabet adaptations for standard char types. More...

+ Include dependency graph for char.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 seqan3::custom
 A namespace for third party and standard library specialisations of SeqAn customisation points.
 

Functions

Free function wrappers for the char alphabet adaptation

For char, char16_t and char32_t do conversion to/from uint types.

template<typename char_type >
constexpr auto seqan3::custom::alphabet_size (char_type const &chr) noexcept
 Return the number of values the char type can take. More...
 
template<typename char_type >
constexpr char_type seqan3::custom::to_char (char_type const chr) noexcept
 Converting char to char is no-op (it will just return the value you pass in). More...
 
template<typename char_type >
constexpr auto seqan3::custom::to_rank (char_type const chr) noexcept
 Convert char to rank by casting to an unsigned integral type of same size. More...
 
template<typename char_type >
constexpr char_typeseqan3::custom::assign_char_to (char_type const chr2, char_type &chr) noexcept
 Assign a char to the char type (same as calling =). More...
 
template<typename char_type >
constexpr char_typeseqan3::custom::assign_rank_to (decltype(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...
 

Detailed Description

Provides alphabet adaptations for standard char types.

Author
Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>

This file provides function and type trait overloads so that the following types fulfil the seqan3::Alphabet:

  • char
  • char16_t
  • char32_t

You will likely not use these interfaces directly, they are, however, very helpful for conversions between other alphabets and between other alphabets and characters.

Attention
  • Note that signed char and unsigned char are absent from the list, because of their type ambiguity with int8_t and uint8_t.