The cigar semialphabet pairs a counter with a seqan3::cigar_op letter. More...
#include <seqan3/alphabet/cigar/cigar.hpp>
Public Member Functions | |
Constructors, destructor and assignment | |
constexpr | cigar () noexcept=default |
Defaulted. | |
constexpr | cigar (cigar const &) noexcept=default |
Defaulted. | |
constexpr | cigar (cigar &&) noexcept=default |
Defaulted. | |
constexpr cigar & | operator= (cigar const &) noexcept=default |
Defaulted. | |
constexpr cigar & | operator= (cigar &&) noexcept=default |
Defaulted. | |
~cigar () noexcept=default | |
Defaulted. | |
constexpr | cigar (component_type const alph) noexcept |
Construction via a value of one of the components. More... | |
constexpr cigar & | operator= (component_type const alph) noexcept |
Assignment via a value of one of the components. More... | |
Read functions | |
small_string< 11 > | to_string () const noexcept |
Return the string representation. | |
Write functions | |
cigar & | assign_string (small_string< 11 > const s) noexcept |
Assign from the string representation. | |
Get functions | |
template<size_t index> | |
constexpr auto | get (cigar &l) noexcept |
Tuple-like access to the contained components. More... | |
template<typename type > | |
constexpr auto | get (cigar &l) noexcept |
Tuple-like access to the contained components. More... | |
Read functions | |
All read operations are constant complexity. | |
constexpr | operator type () const noexcept |
Implicit cast to a single letter. Works only if the type is unique in the type list. | |
Read functions | |
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... | |
Write functions | |
constexpr cigar & | assign_char (char_type const c) noexcept |
Assign from a character, implicitly converts invalid characters. More... | |
constexpr cigar & | assign_rank (rank_type const c) noexcept |
Assign from a numeric value. More... | |
Static Public Attributes | |
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. | |
Protected Types | |
Member types | |
using | char_type = std::conditional_t< std::same_as< void, void >, char, void > |
The char representation; conditional needed to make semi alphabet definitions legal. | |
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()). | |
The cigar semialphabet pairs a counter with a seqan3::cigar_op letter.
This semialphabet represents a unit in a CIGAR string, typically found in the SAM and BAM formats. It consists of a number and a seqan3::cigar_op symbol.
It has a "visual representation", but since this is a string and not a char, the type only models seqan3::writable_semialphabet and not seqan3::writable_alphabet. Members for reading/writing the string are provided.
To avoid confusion between string and char literal, this alphabet has no user defined literal operators. Always assign from a pair of uint32_t and seqan3::cigar_op.
|
inlineconstexprnoexcept |
Construction via a value of one of the components.
component_type | One of the component types; must be uniquely contained in the type list of the composite. |
[in] | alph | The value of a component that should be assigned. |
|
inlineconstexprnoexceptinherited |
Assign from a character, implicitly converts invalid characters.
c | The character to be assigned. |
Provides an implementation for seqan3::assign_char_to, required to model seqan3::alphabet.
Constant.
Guaranteed not to throw.
|
inlineconstexprnoexceptinherited |
Assign from a numeric value.
c | The rank to be assigned. |
Provides an implementation for seqan3::assign_rank_to, required to model seqan3::semialphabet.
Constant.
Guaranteed not to throw.
|
inlineconstexprnoexcept |
Tuple-like access to the contained components.
index | Return the i-th element. |
|
inlineconstexprnoexcept |
Tuple-like access to the contained components.
type | Return the element of specified type; only available if the type is unique in the set of components. |
|
inlineconstexprnoexcept |
Assignment via a value of one of the components.
component_type | One of the component types; must be uniquely contained in the type list of the composite. |
[in] | alph | The value of a component that should be assigned. |
|
inlineconstexprnoexceptinherited |
Return the letter as a character of char_type.
Provides an implementation for seqan3::to_char, required to model seqan3::alphabet.
Constant.
Guaranteed not to throw.
|
inlineconstexprnoexceptinherited |
Return the letter's numeric value (rank in the alphabet).
Provides an implementation for seqan3::to_rank, required to model seqan3::semialphabet.
Constant.
Guaranteed not to throw.