Flow123d  release_3.0.0-958-ga07bd24
Public Types | Public Member Functions | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator:
Collaboration graph
[legend]

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 More...
 
using difference_type = typename basic_json::difference_type
 a type to represent differences between iterators More...
 
using pointer = typename basic_json::const_pointer
 defines a pointer to the type iterated over (value_type) More...
 
using reference = typename basic_json::const_reference
 defines a reference to the type iterated over (value_type) More...
 
using iterator_category = std::bidirectional_iterator_tag
 the category of the iterator More...
 

Public Member Functions

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

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:

Since
version 1.0.0

Definition at line 6831 of file json.hpp.

Member Typedef Documentation

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>
using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::base_iterator = const_iterator

Definition at line 6834 of file json.hpp.

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>
using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::pointer = typename basic_json::pointer

Definition at line 6835 of file json.hpp.

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>
using nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::reference = typename basic_json::reference

Definition at line 6836 of file json.hpp.

Constructor & Destructor Documentation

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>
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::iterator ( )
default

default constructor

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>
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::iterator ( pointer  object)
inlineexplicitnoexcept

constructor for a given JSON instance

Definition at line 6842 of file json.hpp.

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>
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::iterator ( const iterator other)
inlinenoexcept

copy constructor

Definition at line 6847 of file json.hpp.

Member Function Documentation

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>
reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator* ( )
inline

return a reference to the value pointed to by the iterator

Definition at line 6864 of file json.hpp.

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>
iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator+ ( difference_type  i)
inline

add to iterator

Definition at line 6920 of file json.hpp.

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>
iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator++ ( int  )
inline

post-increment (it++)

Definition at line 6876 of file json.hpp.

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>
iterator& nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator++ ( )
inline

pre-increment (++it)

Definition at line 6884 of file json.hpp.

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>
iterator& nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator+= ( difference_type  i)
inline

add to iterator

Definition at line 6906 of file json.hpp.

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>
iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator- ( difference_type  i)
inline

subtract from iterator

Definition at line 6928 of file json.hpp.

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>
difference_type nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator- ( const iterator other) const
inline

return difference

Definition at line 6936 of file json.hpp.

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>
iterator nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator-- ( int  )
inline

post-decrement (it–)

Definition at line 6891 of file json.hpp.

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>
iterator& nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator-- ( )
inline

pre-decrement (–it)

Definition at line 6899 of file json.hpp.

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>
iterator& nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator-= ( difference_type  i)
inline

subtract from iterator

Definition at line 6913 of file json.hpp.

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>
pointer nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator-> ( )
inline

dereference the iterator

Definition at line 6870 of file json.hpp.

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>
iterator& nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator= ( iterator  other)
inlinenoexcept

copy assignment

Definition at line 6852 of file json.hpp.

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>
reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::operator[] ( difference_type  n) const
inline

access to successor

Definition at line 6942 of file json.hpp.

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>
reference nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::iterator::value ( ) const
inline

return the value of an iterator

Definition at line 6948 of file json.hpp.


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