RESTinio

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
restinio::easy_parser::digits_to_consume_t Class Reference

Limits for number of digits to be extracted during parsing of decimal numbers. More...

`#include <easy_parser.hpp>`

## Public Types
using | underlying_int_t = std::int_fast8_t

## Public Member Functions
constexpr | digits_to_consume_t (underlying_int_t total) noexcept
constexpr | digits_to_consume_t (underlying_int_t min, underlying_int_t max) noexcept
RESTINIO_NODISCARD constexpr auto | min () const noexcept
| Get the minimal value. More...
RESTINIO_NODISCARD constexpr auto | max () const noexcept
| Get the maximum value. More...

## Static Public Member Functions
RESTINIO_NODISCARD static constexpr auto | unlimited_max () noexcept
| Get the value that means that maximum is not limited. More...
RESTINIO_NODISCARD static constexpr auto | from_one_to_max () noexcept

## Public Attributes
underlying_int_t | m_min
| Minimal number of digits to consume. More...
underlying_int_t | m_max
| Maximal number of digits to consume. More...

## Detailed Description

Limits for number of digits to be extracted during parsing of decimal numbers.

Since
  v.0.6.6

Definition at line 466 of file easy_parser.hpp.

## Member Typedef Documentation

## ◆ underlying_int_t

using restinio::easy_parser::digits_to_consume_t::underlying_int_t = std::int_fast8_t

Definition at line 469 of file easy_parser.hpp.

## Constructor & Destructor Documentation

## ◆ digits_to_consume_t() [1/2]

constexpr restinio::easy_parser::digits_to_consume_t::digits_to_consume_t | ( | underlying_int_t | total | ) |
| inline constexpr noexcept

A constructor for the case when min = max and both are equal to total.

Definition at line 487 of file easy_parser.hpp.

## ◆ digits_to_consume_t() [2/2]

constexpr restinio::easy_parser::digits_to_consume_t::digits_to_consume_t | ( | underlying_int_t | min,
|  | underlying_int_t | max
| ) |  |
| inline constexpr noexcept

A constructor for the case when min and max are specified separately.

Definition at line 497 of file easy_parser.hpp.

## Member Function Documentation

## ◆ from_one_to_max()

RESTINIO_NODISCARD static constexpr auto restinio::easy_parser::digits_to_consume_t::from_one_to_max | ( |  | ) |
| inline static constexpr noexcept

Returns `digits_to_consume_t{1, unlimited_max()}`.

Definition at line 527 of file easy_parser.hpp.

## ◆ max()

RESTINIO_NODISCARD constexpr auto restinio::easy_parser::digits_to_consume_t::max | ( |  | ) | const
| inline constexpr noexcept

Get the maximum value.

Definition at line 512 of file easy_parser.hpp.

## ◆ min()

RESTINIO_NODISCARD constexpr auto restinio::easy_parser::digits_to_consume_t::min | ( |  | ) | const
| inline constexpr noexcept

Get the minimal value.

Definition at line 507 of file easy_parser.hpp.

## ◆ unlimited_max()

RESTINIO_NODISCARD static constexpr auto restinio::easy_parser::digits_to_consume_t::unlimited_max | ( |  | ) |
| inline static constexpr noexcept

Get the value that means that maximum is not limited.

Definition at line 517 of file easy_parser.hpp.

## Member Data Documentation

## ◆ m_max

underlying_int_t restinio::easy_parser::digits_to_consume_t::m_max

Maximal number of digits to consume.

Definition at line 479 of file easy_parser.hpp.

## ◆ m_min

underlying_int_t restinio::easy_parser::digits_to_consume_t::m_min

Minimal number of digits to consume.

Note
  Can't be 0, but this value is not checked for performance reasons.

Definition at line 477 of file easy_parser.hpp.

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

- restinio/helpers/easy_parser.hpp