JSON Voorhees
Killer JSON for C++
Loading...
Searching...
No Matches
jsonv::value::basic_object_iterator< T, TIterator > Struct Template Reference

The base iterator type for iterating over object types. More...

#include <jsonv/value.hpp>

Public Types

using iterator_category = std::bidirectional_iterator_tag
 
using value_type = T
 
using difference_type = std::ptrdiff_t
 
using pointer = T *
 
using reference = T &
 

Public Member Functions

 basic_object_iterator (const basic_object_iterator &source)
 
template<typename U , typename UIterator >
 basic_object_iterator (const basic_object_iterator< U, UIterator > &source, typename std::enable_if< std::is_convertible< U *, T * >::value >::type *=0)
 This allows assignment from an object_iterator to a const_object_iterator.
 
basic_object_iterator & operator= (const basic_object_iterator &source)
 
template<typename U , typename UIterator >
std::enable_if< std::is_convertible< U *, T * >::value, basic_object_iterator & >::type operator= (const basic_object_iterator< U, UIterator > &source)
 
basic_object_iterator & operator++ ()
 
basic_object_iterator operator++ (int)
 
basic_object_iterator & operator-- ()
 
basic_object_iterator operator-- (int)
 
template<typename U , typename UIterator >
bool operator== (const basic_object_iterator< U, UIterator > &other) const
 
template<typename U , typename UIterator >
bool operator!= (const basic_object_iterator< U, UIterator > &other) const
 
T & operator* () const
 
T * operator-> () const
 

Friends

class value
 

Detailed Description

template<typename T, typename TIterator>
struct jsonv::value::basic_object_iterator< T, TIterator >

The base iterator type for iterating over object types.

It is a bidirectional iterator similar to a std::map<std::string, jsonv::value>.

Definition at line 289 of file value.hpp.

Member Typedef Documentation

◆ difference_type

template<typename T , typename TIterator >
using jsonv::value::basic_object_iterator< T, TIterator >::difference_type = std::ptrdiff_t

Definition at line 294 of file value.hpp.

◆ iterator_category

template<typename T , typename TIterator >
using jsonv::value::basic_object_iterator< T, TIterator >::iterator_category = std::bidirectional_iterator_tag

Definition at line 292 of file value.hpp.

◆ pointer

template<typename T , typename TIterator >
using jsonv::value::basic_object_iterator< T, TIterator >::pointer = T*

Definition at line 295 of file value.hpp.

◆ reference

template<typename T , typename TIterator >
using jsonv::value::basic_object_iterator< T, TIterator >::reference = T&

Definition at line 296 of file value.hpp.

◆ value_type

template<typename T , typename TIterator >
using jsonv::value::basic_object_iterator< T, TIterator >::value_type = T

Definition at line 293 of file value.hpp.

Constructor & Destructor Documentation

◆ basic_object_iterator() [1/3]

template<typename T , typename TIterator >
jsonv::value::basic_object_iterator< T, TIterator >::basic_object_iterator ( )
inline

Definition at line 298 of file value.hpp.

◆ basic_object_iterator() [2/3]

template<typename T , typename TIterator >
jsonv::value::basic_object_iterator< T, TIterator >::basic_object_iterator ( const basic_object_iterator< T, TIterator > &  source)
inline

Definition at line 302 of file value.hpp.

◆ basic_object_iterator() [3/3]

template<typename T , typename TIterator >
template<typename U , typename UIterator >
jsonv::value::basic_object_iterator< T, TIterator >::basic_object_iterator ( const basic_object_iterator< U, UIterator > &  source,
typename std::enable_if< std::is_convertible< U *, T * >::value >::type *  = 0 
)
inline

This allows assignment from an object_iterator to a const_object_iterator.

Definition at line 308 of file value.hpp.

Member Function Documentation

◆ operator!=()

template<typename T , typename TIterator >
template<typename U , typename UIterator >
bool jsonv::value::basic_object_iterator< T, TIterator >::operator!= ( const basic_object_iterator< U, UIterator > &  other) const
inline

Definition at line 362 of file value.hpp.

◆ operator*()

template<typename T , typename TIterator >
T & jsonv::value::basic_object_iterator< T, TIterator >::operator* ( ) const
inline

Definition at line 368 of file value.hpp.

◆ operator++() [1/2]

template<typename T , typename TIterator >
basic_object_iterator & jsonv::value::basic_object_iterator< T, TIterator >::operator++ ( )
inline

Definition at line 327 of file value.hpp.

◆ operator++() [2/2]

template<typename T , typename TIterator >
basic_object_iterator jsonv::value::basic_object_iterator< T, TIterator >::operator++ ( int  )
inline

Definition at line 333 of file value.hpp.

◆ operator--() [1/2]

template<typename T , typename TIterator >
basic_object_iterator & jsonv::value::basic_object_iterator< T, TIterator >::operator-- ( )
inline

Definition at line 340 of file value.hpp.

◆ operator--() [2/2]

template<typename T , typename TIterator >
basic_object_iterator jsonv::value::basic_object_iterator< T, TIterator >::operator-- ( int  )
inline

Definition at line 346 of file value.hpp.

◆ operator->()

template<typename T , typename TIterator >
T * jsonv::value::basic_object_iterator< T, TIterator >::operator-> ( ) const
inline

Definition at line 374 of file value.hpp.

◆ operator=() [1/2]

template<typename T , typename TIterator >
basic_object_iterator & jsonv::value::basic_object_iterator< T, TIterator >::operator= ( const basic_object_iterator< T, TIterator > &  source)
inline

Definition at line 314 of file value.hpp.

◆ operator=() [2/2]

template<typename T , typename TIterator >
template<typename U , typename UIterator >
std::enable_if< std::is_convertible< U *, T * >::value, basic_object_iterator & >::type jsonv::value::basic_object_iterator< T, TIterator >::operator= ( const basic_object_iterator< U, UIterator > &  source)
inline

Definition at line 322 of file value.hpp.

◆ operator==()

template<typename T , typename TIterator >
template<typename U , typename UIterator >
bool jsonv::value::basic_object_iterator< T, TIterator >::operator== ( const basic_object_iterator< U, UIterator > &  other) const
inline

Definition at line 355 of file value.hpp.

Friends And Related Symbol Documentation

◆ value

template<typename T , typename TIterator >
friend class value
friend

Definition at line 380 of file value.hpp.


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