SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::adaptor_for_view_without_args< view_type > Class Template Reference

Template for range adaptor closure objects that store no arguments and always delegate to the view constructor. More...

#include <seqan3/core/range/detail/adaptor_for_view_without_args.hpp>

+ Inheritance diagram for seqan3::detail::adaptor_for_view_without_args< view_type >:

Public Member Functions

Constructors, destructor and assignment
constexpr adaptor_for_view_without_args ()=default
 Defaulted.
 
constexpr adaptor_for_view_without_args (adaptor_for_view_without_args const &) noexcept=default
 Defaulted.
 
constexpr adaptor_for_view_without_args (adaptor_for_view_without_args &&) noexcept=default
 Defaulted.
 
constexpr adaptor_for_view_without_argsoperator= (adaptor_for_view_without_args const &) noexcept=default
 Defaulted.
 
constexpr adaptor_for_view_without_argsoperator= (adaptor_for_view_without_args &&) noexcept=default
 Defaulted.
 
 ~adaptor_for_view_without_args () noexcept=default
 Defaulted.
 
- Public Member Functions inherited from seqan3::detail::adaptor_base< adaptor_for_view_without_args< view_type > >
constexpr auto operator() (urng_t &&urange) &&
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr auto operator() (urng_t &&urange) const &
 Function-style overload for ranges.
 
constexpr adaptor_base (adaptor_base const &) noexcept=default
 Defaulted.
 
constexpr adaptor_base (adaptor_base &&) noexcept=default
 Defaulted.
 
constexpr adaptor_base (stored_args_ts... args) noexcept(noexcept(std::tuple< stored_args_ts... >{ std::forward< stored_args_ts >(args)...}))
 Constructor with possible arguments; becomes a default constructor for adaptors without args.
 
constexpr adaptor_baseoperator= (adaptor_base const &) noexcept=default
 Defaulted.
 
constexpr adaptor_baseoperator= (adaptor_base &&) noexcept=default
 Defaulted.
 
 ~adaptor_base () noexcept=default
 Defaulted.
 

Private Types

using base_type = adaptor_base< adaptor_for_view_without_args< view_type > >
 Type of the CRTP-base.
 

Static Private Member Functions

template<typename... arg_types>
static auto impl (arg_types &&... args)
 Call the view's constructor with the given arguments (all of the base class'es operators ultimately resolve to this function call).
 

Private Attributes

friend base_type
 Befriend the base class so it can call impl().
 

Detailed Description

template<template< typename, typename... > typename view_type>
class seqan3::detail::adaptor_for_view_without_args< view_type >

Template for range adaptor closure objects that store no arguments and always delegate to the view constructor.

Template Parameters
view_typeThe view type template.

Use this adaptor template when you always want to delegate to the view's constructor and you have no arguments. Since it's a one-line it's easier than specialising seqan3::detail::adaptor_base.

Example

(from include/seqan3/utility/views/single_pass_input.hpp)

This is the signature of the view type template in namespace seqan3::detail:

template <std::ranges::view urng_t>
class single_pass_input_view : public std::ranges::view_interface<single_pass_input_view<urng_t>>
{
Adds single_pass_input behavior to the underlying range.
Definition single_pass_input.hpp:41

This is the definition of the range adaptor closure object, it will always delegate to the constructor: seqan3::detail::single_pass_input_view::single_pass_input_view():

namespace seqan3::views
{
} // namespace seqan3::views
Template for range adaptor closure objects that store no arguments and always delegate to the view co...
Definition adaptor_for_view_without_args.hpp:46
The SeqAn namespace for views.
Definition char_strictly_to.hpp:19

Member Function Documentation

◆ impl()

template<template< typename, typename... > typename view_type>
template<typename... arg_types>
static auto seqan3::detail::adaptor_for_view_without_args< view_type >::impl ( arg_types &&...  args)
inlinestaticprivate

Call the view's constructor with the given arguments (all of the base class'es operators ultimately resolve to this function call).

Template Parameters
arg_typesThe arguments to the view (this first one will be a range, the rest is optional).
Parameters
[in]argsThe arguments to the constructor.
Returns
An instance of view_type.

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