nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::const_iterator Class Reference
a const 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 >::const_iterator:
Collaboration diagram for nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType >::const_iterator:
Public Types | |
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 | |
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_iterator & | operator= (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_iterator & | operator++ () |
pre-increment (++it) | |
const_iterator | operator-- (int) |
post-decrement (it–) | |
const_iterator & | operator-- () |
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_iterator & | operator+= (difference_type i) |
add to iterator | |
const_iterator & | operator-= (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 | |
Friends | |
class | basic_json |
allow basic_json to access private members | |
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 >::const_iterator
a const random access iterator for the basic_json class
This class implements a const iterator for the basic_json class. From this class, the iterator class is derived.
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.
- Since
- version 1.0.0
The documentation for this class was generated from the following file:
- /home/lemniscate/workspace/PFPSim/pfpsim/core/json.hpp