nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator Class Reference

a mutable random access iterator for the basic_json class More...

#include <json.hpp>

+ Inheritance diagram for nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator:
+ Collaboration diagram for nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator:

Public Types

using base_iterator = const_iterator
 
using pointer = typename basic_json::pointer
 
using reference = typename basic_json::reference
 
- Public Types inherited from nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::const_iterator
using value_type = typename basic_json::value_type
 the type of the values when the iterator is dereferenced
 
using difference_type = typename basic_json::difference_type
 a type to represent differences between iterators
 
using pointer = typename basic_json::const_pointer
 defines a pointer to the type iterated over (value_type)
 
using reference = typename basic_json::const_reference
 defines a reference to the type iterated over (value_type)
 
using iterator_category = std::bidirectional_iterator_tag
 the category of the iterator
 

Public Member Functions

 iterator ()=default
 default constructor
 
 iterator (pointer object) noexcept
 constructor for a given JSON instance
 
 iterator (const iterator &other) noexcept
 copy constructor
 
iteratoroperator= (iterator other) noexcept(std::is_nothrow_move_constructible< pointer >::value andstd::is_nothrow_move_assignable< pointer >::value andstd::is_nothrow_move_constructible< internal_iterator >::value andstd::is_nothrow_move_assignable< internal_iterator >::value)
 copy assignment
 
reference operator* ()
 return a reference to the value pointed to by the iterator
 
pointer operator-> ()
 dereference the iterator
 
iterator operator++ (int)
 post-increment (it++)
 
iteratoroperator++ ()
 pre-increment (++it)
 
iterator operator-- (int)
 post-decrement (it–)
 
iteratoroperator-- ()
 pre-decrement (–it)
 
iteratoroperator+= (difference_type i)
 add to iterator
 
iteratoroperator-= (difference_type i)
 subtract from iterator
 
iterator operator+ (difference_type i)
 add to iterator
 
iterator operator- (difference_type i)
 subtract from iterator
 
difference_type operator- (const iterator &other) const
 return difference
 
reference operator[] (difference_type n) const
 access to successor
 
reference value () const
 return the value of an iterator
 
- Public Member Functions inherited from nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::const_iterator
 const_iterator ()=default
 default constructor
 
 const_iterator (pointer object) noexcept
 constructor for a given JSON instance
 
 const_iterator (const iterator &other) noexcept
 copy constructor given a nonconst iterator
 
 const_iterator (const const_iterator &other) noexcept
 copy constructor
 
const_iteratoroperator= (const_iterator other) noexcept(std::is_nothrow_move_constructible< pointer >::value andstd::is_nothrow_move_assignable< pointer >::value andstd::is_nothrow_move_constructible< internal_iterator >::value andstd::is_nothrow_move_assignable< internal_iterator >::value)
 copy assignment
 
reference operator* () const
 return a reference to the value pointed to by the iterator
 
pointer operator-> () const
 dereference the iterator
 
const_iterator operator++ (int)
 post-increment (it++)
 
const_iteratoroperator++ ()
 pre-increment (++it)
 
const_iterator operator-- (int)
 post-decrement (it–)
 
const_iteratoroperator-- ()
 pre-decrement (–it)
 
bool operator== (const const_iterator &other) const
 comparison: equal
 
bool operator!= (const const_iterator &other) const
 comparison: not equal
 
bool operator< (const const_iterator &other) const
 comparison: smaller
 
bool operator<= (const const_iterator &other) const
 comparison: less than or equal
 
bool operator> (const const_iterator &other) const
 comparison: greater than
 
bool operator>= (const const_iterator &other) const
 comparison: greater than or equal
 
const_iteratoroperator+= (difference_type i)
 add to iterator
 
const_iteratoroperator-= (difference_type i)
 subtract from iterator
 
const_iterator operator+ (difference_type i)
 add to iterator
 
const_iterator operator- (difference_type i)
 subtract from iterator
 
difference_type operator- (const const_iterator &other) const
 return difference
 
reference operator[] (difference_type n) const
 access to successor
 
object_t::key_type key () const
 return the key of an object iterator
 
reference value () const
 return the value of an iterator
 

Detailed Description

template<template< typename U, typename V, typename...Args > class ObjectType = std::map, template< typename U, typename...Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator>
class nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator

a mutable random access iterator for the basic_json class

The class satisfies the following concept requirements:

  • RandomAccessIterator: The iterator that can be moved to point (forward and backward) to any element in constant time.
  • OutputIterator: It is possible to write to the pointed-to element.
Since
version 1.0.0

The documentation for this class was generated from the following file:
  • /home/lemniscate/workspace/PFPSim/pfpsim/core/json.hpp