A Discrete-Event Network Simulator
API
nlohmann::detail::json_reverse_iterator< Base > Class Template Reference

a template for a reverse iterator class More...

#include "json.h"

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

Public Types

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

Public Member Functions

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

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 11514 of file json.h.

Member Typedef Documentation

◆ base_iterator [1/2]

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 11519 of file json.h.

◆ base_iterator [2/2]

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 11519 of file json.h.

◆ difference_type [1/2]

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

Definition at line 11517 of file json.h.

◆ difference_type [2/2]

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

Definition at line 11517 of file json.h.

◆ reference [1/2]

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 11521 of file json.h.

◆ reference [2/2]

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 11521 of file json.h.

Constructor & Destructor Documentation

◆ json_reverse_iterator() [1/4]

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 11524 of file json.h.

◆ json_reverse_iterator() [2/4]

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 11528 of file json.h.

◆ json_reverse_iterator() [3/4]

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 11524 of file json.h.

◆ json_reverse_iterator() [4/4]

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 11528 of file json.h.

Member Function Documentation

◆ key() [1/2]

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 11585 of file json.h.

◆ key() [2/2]

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 11585 of file json.h.

◆ operator+() [1/2]

template<typename Base >
json_reverse_iterator nlohmann::detail::json_reverse_iterator< Base >::operator+ ( difference_type  i) const
inline

add to iterator

Definition at line 11561 of file json.h.

References ns3::operator+().

Referenced by nlohmann::detail::json_reverse_iterator< Base >::operator[]().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator+() [2/2]

template<typename Base >
json_reverse_iterator nlohmann::detail::json_reverse_iterator< Base >::operator+ ( difference_type  i) const
inline

add to iterator

Definition at line 11561 of file json.h.

References ns3::operator+().

+ Here is the call graph for this function:

◆ operator++() [1/4]

template<typename Base >
json_reverse_iterator& nlohmann::detail::json_reverse_iterator< Base >::operator++ ( )
inline

pre-increment (++it)

Definition at line 11537 of file json.h.

◆ operator++() [2/4]

template<typename Base >
json_reverse_iterator& nlohmann::detail::json_reverse_iterator< Base >::operator++ ( )
inline

pre-increment (++it)

Definition at line 11537 of file json.h.

◆ operator++() [3/4]

template<typename Base >
json_reverse_iterator const nlohmann::detail::json_reverse_iterator< Base >::operator++ ( int  )
inline

post-increment (it++)

Definition at line 11531 of file json.h.

◆ operator++() [4/4]

template<typename Base >
json_reverse_iterator const nlohmann::detail::json_reverse_iterator< Base >::operator++ ( int  )
inline

post-increment (it++)

Definition at line 11531 of file json.h.

◆ operator+=() [1/2]

template<typename Base >
json_reverse_iterator& nlohmann::detail::json_reverse_iterator< Base >::operator+= ( difference_type  i)
inline

add to iterator

Definition at line 11555 of file json.h.

References ns3::operator+=().

+ Here is the call graph for this function:

◆ operator+=() [2/2]

template<typename Base >
json_reverse_iterator& nlohmann::detail::json_reverse_iterator< Base >::operator+= ( difference_type  i)
inline

add to iterator

Definition at line 11555 of file json.h.

References ns3::operator+=().

+ Here is the call graph for this function:

◆ operator-() [1/4]

template<typename Base >
difference_type nlohmann::detail::json_reverse_iterator< Base >::operator- ( const json_reverse_iterator< Base > &  other) const
inline

return difference

Definition at line 11573 of file json.h.

◆ operator-() [2/4]

template<typename Base >
difference_type nlohmann::detail::json_reverse_iterator< Base >::operator- ( const json_reverse_iterator< Base > &  other) const
inline

return difference

Definition at line 11573 of file json.h.

◆ operator-() [3/4]

template<typename Base >
json_reverse_iterator nlohmann::detail::json_reverse_iterator< Base >::operator- ( difference_type  i) const
inline

subtract from iterator

Definition at line 11567 of file json.h.

References ns3::operator-().

+ Here is the call graph for this function:

◆ operator-() [4/4]

template<typename Base >
json_reverse_iterator nlohmann::detail::json_reverse_iterator< Base >::operator- ( difference_type  i) const
inline

subtract from iterator

Definition at line 11567 of file json.h.

References ns3::operator-().

+ Here is the call graph for this function:

◆ operator--() [1/4]

template<typename Base >
json_reverse_iterator& nlohmann::detail::json_reverse_iterator< Base >::operator-- ( )
inline

pre-decrement (–it)

Definition at line 11549 of file json.h.

◆ operator--() [2/4]

template<typename Base >
json_reverse_iterator& nlohmann::detail::json_reverse_iterator< Base >::operator-- ( )
inline

pre-decrement (–it)

Definition at line 11549 of file json.h.

◆ operator--() [3/4]

template<typename Base >
json_reverse_iterator const nlohmann::detail::json_reverse_iterator< Base >::operator-- ( int  )
inline

post-decrement (it–)

Definition at line 11543 of file json.h.

◆ operator--() [4/4]

template<typename Base >
json_reverse_iterator const nlohmann::detail::json_reverse_iterator< Base >::operator-- ( int  )
inline

post-decrement (it–)

Definition at line 11543 of file json.h.

◆ operator[]() [1/2]

template<typename Base >
reference nlohmann::detail::json_reverse_iterator< Base >::operator[] ( difference_type  n) const
inline

access to successor

Definition at line 11579 of file json.h.

References nlohmann::detail::json_reverse_iterator< Base >::operator+().

+ Here is the call graph for this function:

◆ operator[]() [2/2]

template<typename Base >
reference nlohmann::detail::json_reverse_iterator< Base >::operator[] ( difference_type  n) const
inline

access to successor

Definition at line 11579 of file json.h.

References nlohmann::detail::json_reverse_iterator< Base >::operator+().

+ Here is the call graph for this function:

◆ value() [1/2]

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

return the value of an iterator

Definition at line 11592 of file json.h.

◆ value() [2/2]

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

return the value of an iterator

Definition at line 11592 of file json.h.


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