Loading...
Searching...
No Matches
ada::url_search_params_iter< T, Type > Struct Template Reference

JavaScript-style iterator for url_search_params. More...

`#include <url_search_params.h>`

## Public Member Functions

| url_search_params_iter ()
| url_search_params_iter (const url_search_params_iter &u)=default
| url_search_params_iter (url_search_params_iter &&u) noexcept=default
url_search_params_iter & | operator= (url_search_params_iter &&u) noexcept=default
url_search_params_iter & | operator= (const url_search_params_iter &u)=default
| ~url_search_params_iter ()=default
std::optional< T > | next ()
bool | has_next () const

## Friends

struct | url_search_params

## Detailed Description

template<typename T, url_search_params_iter_type Type>
struct ada::url_search_params_iter< T, Type >

JavaScript-style iterator for url_search_params.

Provides a next() method that returns successive values until exhausted. This matches the iterator pattern used in the Web Platform.

Template Parameters

  T | The type of value returned by the iterator.
  Type | The type of iteration (KEYS, VALUES, or ENTRIES).

See also
  https://webidl.spec.whatwg.org/#idl-iterable

Definition at line 224 of file url_search_params.h.

## Constructor & Destructor Documentation

## url_search_params_iter() [1/3]

template<typename T, url_search_params_iter_type Type>

ada::url_search_params_iter< T, Type >::url_search_params_iter | ( |  | ) |

inline

Definition at line 225 of file url_search_params.h.

## url_search_params_iter() [2/3]

template<typename T, url_search_params_iter_type Type>

ada::url_search_params_iter< T, Type >::url_search_params_iter | ( | const url_search_params_iter< T, Type > & | u | ) |

default

## url_search_params_iter() [3/3]

template<typename T, url_search_params_iter_type Type>

ada::url_search_params_iter< T, Type >::url_search_params_iter | ( | url_search_params_iter< T, Type > && | u | ) |

default noexcept

## ~url_search_params_iter()

template<typename T, url_search_params_iter_type Type>

ada::url_search_params_iter< T, Type >::~url_search_params_iter | ( |  | ) |

default

## Member Function Documentation

## has_next()

template<typename T, url_search_params_iter_type Type>

bool ada::url_search_params_iter< T, Type >::has_next | ( |  | ) | const

inline

Checks if more values are available.

Returns
  true if next() will return a value, false if exhausted.

Definition at line 263 of file url_search_params-inl.h.

Referenced by ada::url_search_params_iter< key_value_view_pair, url_search_params_iter_type::ENTRIES >::next(), ada::url_search_params_iter< std::string_view, url_search_params_iter_type::KEYS >::next(), and ada::url_search_params_iter< std::string_view, url_search_params_iter_type::VALUES >::next().

## next()

template<typename T, url_search_params_iter_type Type>

std::optional< T > ada::url_search_params_iter< T, Type >::next | ( |  | ) |

inline

Returns the next value in the iteration sequence.

Returns
  The next value, or std::nullopt if iteration is complete.

## operator=() [1/2]

template<typename T, url_search_params_iter_type Type>

url_search_params_iter & ada::url_search_params_iter< T, Type >::operator= | ( | const url_search_params_iter< T, Type > & | u | ) |

default

## operator=() [2/2]

template<typename T, url_search_params_iter_type Type>

url_search_params_iter & ada::url_search_params_iter< T, Type >::operator= | ( | url_search_params_iter< T, Type > && | u | ) |

default noexcept

## Friends And Related Symbol Documentation

## url_search_params

template<typename T, url_search_params_iter_type Type>

friend struct url_search_params

friend

Definition at line 252 of file url_search_params.h.

The documentation for this struct was generated from the following files:

- include/ada/url_search_params.h
- include/ada/url_search_params-inl.h