Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
nlohmann::detail::json_reverse_iterator< Base > Class Template Reference

a template for a reverse iterator class More...

#include <json.hpp>

+ Inheritance diagram for nlohmann::detail::json_reverse_iterator< Base >:
+ Collaboration diagram for nlohmann::detail::json_reverse_iterator< Base >:

Public Types

using difference_type = std::ptrdiff_t
 
using base_iterator = std::reverse_iterator<Base>
 shortcut to the reverse iterator adapter
 
using reference = typename Base::reference
 the reference type for the pointed-to element
 

Public Member Functions

 json_reverse_iterator (const typename base_iterator::iterator_type &it) noexcept
 create reverse iterator from iterator
 
 json_reverse_iterator (const base_iterator &it) noexcept
 create reverse iterator from base class
 
json_reverse_iterator const operator++ (int)
 post-increment (it++)
 
json_reverse_iteratoroperator++ ()
 pre-increment (++it)
 
json_reverse_iterator const operator-- (int)
 post-decrement (it–)
 
json_reverse_iteratoroperator-- ()
 pre-decrement (–it)
 
json_reverse_iteratoroperator+= (difference_type i)
 add to iterator
 
json_reverse_iterator operator+ (difference_type i) const
 add to iterator
 
json_reverse_iterator operator- (difference_type i) const
 subtract from iterator
 
difference_type operator- (const json_reverse_iterator &other) const
 return difference
 
reference operator[] (difference_type n) const
 access to successor
 
auto key () const -> decltype(std::declval< Base >().key())
 return the key of an object iterator
 
reference value () const
 return the value of an iterator
 

Detailed Description

template<typename Base>
class nlohmann::detail::json_reverse_iterator< Base >

a template for a reverse iterator class

Template Parameters
Basethe base iterator type to reverse. Valid types are iterator (to create reverse_iterator) and const_iterator (to create const_reverse_iterator).

@requirement The class satisfies the following concept requirements:

  • BidirectionalIterator: The iterator that can be moved can be moved in both directions (i.e. incremented and decremented).
  • OutputIterator: It is possible to write to the pointed-to element (only if Base is iterator).
Since
version 1.0.0

Definition at line 12267 of file json.hpp.

Member Typedef Documentation

◆ base_iterator

template<typename Base >
using nlohmann::detail::json_reverse_iterator< Base >::base_iterator = std::reverse_iterator<Base>

shortcut to the reverse iterator adapter

Definition at line 12272 of file json.hpp.

◆ difference_type

template<typename Base >
using nlohmann::detail::json_reverse_iterator< Base >::difference_type = std::ptrdiff_t

Definition at line 12270 of file json.hpp.

◆ reference

template<typename Base >
using nlohmann::detail::json_reverse_iterator< Base >::reference = typename Base::reference

the reference type for the pointed-to element

Definition at line 12274 of file json.hpp.

Constructor & Destructor Documentation

◆ json_reverse_iterator() [1/2]

template<typename Base >
nlohmann::detail::json_reverse_iterator< Base >::json_reverse_iterator ( const typename base_iterator::iterator_type & it)
inlineexplicitnoexcept

create reverse iterator from iterator

Definition at line 12277 of file json.hpp.

◆ json_reverse_iterator() [2/2]

template<typename Base >
nlohmann::detail::json_reverse_iterator< Base >::json_reverse_iterator ( const base_iterator & it)
inlineexplicitnoexcept

create reverse iterator from base class

Definition at line 12281 of file json.hpp.

Member Function Documentation

◆ key()

template<typename Base >
auto nlohmann::detail::json_reverse_iterator< Base >::key ( ) const -> decltype(std::declval<Base>().key())
inline

return the key of an object iterator

Definition at line 12338 of file json.hpp.

◆ operator+()

add to iterator

Definition at line 12314 of file json.hpp.

◆ operator++() [1/2]

pre-increment (++it)

Definition at line 12290 of file json.hpp.

◆ operator++() [2/2]

post-increment (it++)

Definition at line 12284 of file json.hpp.

◆ operator+=()

add to iterator

Definition at line 12308 of file json.hpp.

◆ operator-() [1/2]

return difference

Definition at line 12326 of file json.hpp.

◆ operator-() [2/2]

subtract from iterator

Definition at line 12320 of file json.hpp.

◆ operator--() [1/2]

pre-decrement (–it)

Definition at line 12302 of file json.hpp.

◆ operator--() [2/2]

post-decrement (it–)

Definition at line 12296 of file json.hpp.

◆ operator[]()

access to successor

Definition at line 12332 of file json.hpp.

◆ value()

template<typename Base >
reference nlohmann::detail::json_reverse_iterator< Base >::value ( ) const
inline

return the value of an iterator

Definition at line 12345 of file json.hpp.


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