SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
seqan3::sequence_record< field_types, field_ids > Class Template Reference

The record type of seqan3::sequence_file_input. More...

#include <seqan3/io/sequence_file/record.hpp>

+ Inheritance diagram for seqan3::sequence_record< field_types, field_ids >:

Public Types

using base_type = detail::transfer_template_args_onto_t< field_types, std::tuple >
 A specialisation of std::tuple.
 

Public Member Functions

decltype(auto) base_qualities () &
 The qualities, usually in Phred score notation. More...
 
decltype(auto) base_qualities () &&
 The qualities, usually in Phred score notation.
 
decltype(auto) base_qualities () const &
 The qualities, usually in Phred score notation. More...
 
decltype(auto) base_qualities () const &&
 The qualities, usually in Phred score notation. More...
 
void clear () noexcept(noexcept(std::apply(expander, std::declval< record & >())))
 Clears containers that provide .clear() and (re-)initialises all other elements with = {}.
 
decltype(auto) id () &
 The identifier, usually a string. More...
 
decltype(auto) id () &&
 The identifier, usually a string.
 
decltype(auto) id () const &
 The identifier, usually a string. More...
 
decltype(auto) id () const &&
 The identifier, usually a string. More...
 
decltype(auto) sequence () &
 The "sequence", usually a range of nucleotides or amino acids. More...
 
decltype(auto) sequence () &&
 The "sequence", usually a range of nucleotides or amino acids.
 
decltype(auto) sequence () const &
 The "sequence", usually a range of nucleotides or amino acids. More...
 
decltype(auto) sequence () const &&
 The "sequence", usually a range of nucleotides or amino acids. More...
 
Constructors, destructor and assignment
 sequence_record ()=default
 Defaulted.
 
 sequence_record (sequence_record const &)=default
 Defaulted.
 
sequence_recordoperator= (sequence_record const &)=default
 Defaulted.
 
 sequence_record (sequence_record &&)=default
 Defaulted.
 
sequence_recordoperator= (sequence_record &&)=default
 Defaulted.
 
 ~sequence_record ()=default
 Defaulted.
 

Private Types

using base_t = record< field_types, field_ids >
 The base class.
 
template<field f>
using field_constant = typename base_t::template field_constant< f >
 A type alias for std::integral_constant. More...
 
using tuple_base_t = typename base_t::base_type
 The underlying std::tuple class.
 

Static Private Member Functions

template<typename t >
static constexpr void clear_element (t &v) noexcept(noexcept(std::declval< t & >()=t{}))
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename t >
static constexpr void clear_element (t &v) noexcept(noexcept(v.clear()))
 Auxiliary functions for clear().
 
template<field f, typename tuple_t >
static decltype(auto) get_impl (field_constant< f >, tuple_t &&record_as_tuple)
 This is basically the seqan3::get<f>(static_cast<tuple>(record)) implementation.
 

Static Private Attributes

static constexpr auto expander = [] (auto & ...args) { (clear_element(args), ...); }
 A lambda function that expands a pack and calls clear_element on every argument in the pack.
 

Related Functions

(Note that these are not member functions.)

Free function get() interface for seqan3::record based on seqan3::field.

This is the tuple interface via seqan3::field, e.g. seqan3::get<seqan3::field::seq>(record).

template<field f, typename field_types , typename field_ids >
auto & get (record< field_types, field_ids > &r)
 Free function get() for seqan3::record based on seqan3::field.
 
template<field f, typename field_types , typename field_ids >
auto const & get (record< field_types, field_ids > const &r)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<field f, typename field_types , typename field_ids >
auto && get (record< field_types, field_ids > &&r)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<field f, typename field_types , typename field_ids >
auto const && get (record< field_types, field_ids > const &&r)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
Requirements for seqan3::tuple_like

You can expect these (meta-)functions on all types that implement seqan3::tuple_like.

auto && get (type &&val)
 Return the i-th element of the tuple. More...
 
size_t tuple_size_v
 A unary type trait that holds the number of elements in the tuple. More...
 
 tuple_elment_t
 A transformation trait that holds the type of elements in the tuple. More...
 

Detailed Description

template<typename field_types, typename field_ids>
class seqan3::sequence_record< field_types, field_ids >

The record type of seqan3::sequence_file_input.

Template Parameters
field_typesThe types of the fields in this record as a seqan3::type_list.
field_idsA seqan3::fields type with seqan3::field IDs corresponding to field_types.

Member Typedef Documentation

◆ field_constant

template<typename field_types , typename field_ids >
template<field f>
using seqan3::sequence_record< field_types, field_ids >::field_constant = typename base_t::template field_constant<f>
private

A type alias for std::integral_constant.

Member Function Documentation

◆ base_qualities() [1/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::base_qualities ( ) &
inline

The qualities, usually in Phred score notation.

◆ base_qualities() [2/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::base_qualities ( ) const &
inline

The qualities, usually in Phred score notation.

◆ base_qualities() [3/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::base_qualities ( ) const &&
inline

The qualities, usually in Phred score notation.

◆ id() [1/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::id ( ) &
inline

The identifier, usually a string.

◆ id() [2/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::id ( ) const &
inline

The identifier, usually a string.

◆ id() [3/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::id ( ) const &&
inline

The identifier, usually a string.

◆ sequence() [1/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::sequence ( ) &
inline

The "sequence", usually a range of nucleotides or amino acids.

◆ sequence() [2/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::sequence ( ) const &
inline

The "sequence", usually a range of nucleotides or amino acids.

◆ sequence() [3/3]

template<typename field_types , typename field_ids >
decltype(auto) seqan3::sequence_record< field_types, field_ids >::sequence ( ) const &&
inline

The "sequence", usually a range of nucleotides or amino acids.

Friends And Related Function Documentation

◆ get()

auto && get< i > ( type &&  val)
related

Return the i-th element of the tuple.

Template Parameters
iThe index of the element to return (of type size_t).
Parameters
[in,out]valThe tuple-like object to operate on.
Returns
The i-th value in the tuple.
Attention
This is a concept requirement, not an actual function (however types satisfying this concept will provide an implementation).
This constraint is not enforced since empty tuples are valid.

◆ tuple_elment_t()

tuple_elment_t
related

A transformation trait that holds the type of elements in the tuple.

Template Parameters
iIndex of the queried element type.
typeThe tuple-like type.
Attention
This is a concept requirement, not an actual function (however types satisfying this concept will provide an implementation).
This constraint is not enforced since empty tuples are valid.

◆ tuple_size_v()

size_t tuple_size_v
related

A unary type trait that holds the number of elements in the tuple.

Template Parameters
typeThe tuple-like type.
Attention
This is a concept requirement, not an actual function (however types satisfying this concept will provide an implementation).

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