RESTinio

Public Member Functions | Private Attributes | List of all members
restinio::easy_parser::impl::repeat_clause_t< Subitems_Tuple > Class Template Reference

A template for handling repetition of clauses. More...

`#include <easy_parser.hpp>`

Inheritance diagram for restinio::easy_parser::impl::repeat_clause_t< Subitems_Tuple >:

## Public Member Functions
| repeat_clause_t (std::size_t min_occurences, std::size_t max_occurences, Subitems_Tuple &&subitems)
template<typename Target_Type >
RESTINIO_NODISCARD optional_t< parse_error_t > | try_process (source_t &from, Target_Type &dest)

## Private Attributes
std::size_t | m_min_occurences
std::size_t | m_max_occurences
Subitems_Tuple | m_subitems

## Additional Inherited Members
Static Public Attributes inherited from restinio::easy_parser::impl::clause_tag
static constexpr entity_type_t | entity_type = entity_type_t::clause

## Detailed Description

template<typename Subitems_Tuple>
class restinio::easy_parser::impl::repeat_clause_t< Subitems_Tuple >

A template for handling repetition of clauses.

Calls `try_process` for all subitems until some of them returns error or max_occurences will be passed.

Returns failure if min_occurences wasn't passed.

Template Parameters

  Subitems_Tuple | the type of std::tuple with items for every clause to be checked.

Since
  v.0.6.1

Definition at line 2060 of file easy_parser.hpp.

## Constructor & Destructor Documentation

## ◆ repeat_clause_t()

template<typename Subitems_Tuple >

restinio::easy_parser::impl::repeat_clause_t< Subitems_Tuple >::repeat_clause_t | ( | std::size_t | min_occurences,
|  | std::size_t | max_occurences,
|  | Subitems_Tuple && | subitems
| ) |  |
| inline

Definition at line 2068 of file easy_parser.hpp.

## Member Function Documentation

## ◆ try_process()

template<typename Subitems_Tuple >
template<typename Target_Type >

RESTINIO_NODISCARD optional_t< parse_error_t > restinio::easy_parser::impl::repeat_clause_t< Subitems_Tuple >::try_process | ( | source_t & | from,
|  | Target_Type & | dest
| ) |  |
| inline

Definition at line 2080 of file easy_parser.hpp.

## Member Data Documentation

## ◆ m_max_occurences

template<typename Subitems_Tuple >

std::size_t restinio::easy_parser::impl::repeat_clause_t< Subitems_Tuple >::m_max_occurences
| private

Definition at line 2063 of file easy_parser.hpp.

## ◆ m_min_occurences

template<typename Subitems_Tuple >

std::size_t restinio::easy_parser::impl::repeat_clause_t< Subitems_Tuple >::m_min_occurences
| private

Definition at line 2062 of file easy_parser.hpp.

## ◆ m_subitems

template<typename Subitems_Tuple >

Subitems_Tuple restinio::easy_parser::impl::repeat_clause_t< Subitems_Tuple >::m_subitems
| private

Definition at line 2065 of file easy_parser.hpp.

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

- restinio/helpers/easy_parser.hpp