Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
GenericMemberIterator< Const, Encoding, Allocator > Class Template Reference

(Constant) member iterator for a JSON object value More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/internal/json/rapidjson/document.h>

Collaboration diagram for GenericMemberIterator< Const, Encoding, Allocator >:

Public Types

typedef GenericMemberIterator Iterator
 Iterator type itself.
typedef GenericMemberIterator< true, Encoding, AllocatorConstIterator
 Constant iterator type.
typedef GenericMemberIterator< false, Encoding, AllocatorNonConstIterator
 Non-constant iterator type.

Public Member Functions

stepping
Iteratoroperator++ ()
Iteratoroperator-- ()
Iterator operator++ (int)
Iterator operator-- (int)
increment/decrement
Iterator operator+ (DifferenceType n) const
Iterator operator- (DifferenceType n) const
Iteratoroperator+= (DifferenceType n)
Iteratoroperator-= (DifferenceType n)
relations
template<bool Const_>
bool operator== (const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
template<bool Const_>
bool operator!= (const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
template<bool Const_>
bool operator<= (const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
template<bool Const_>
bool operator>= (const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
template<bool Const_>
bool operator< (const GenericMemberIterator< Const_, Encoding, Allocator > &that) const
template<bool Const_>
bool operator> (const GenericMemberIterator< Const_, Encoding, Allocator > &that) const

Private Types

typedef GenericMember< Encoding, AllocatorPlainType
typedef internal::MaybeAddConst< Const, PlainType >::Type ValueType

Friends

class GenericValue< Encoding, Allocator >

std::iterator_traits support

typedef ValueType value_type
typedef ValueType * pointer
typedef ValueType & reference
typedef std::ptrdiff_t difference_type
typedef std::random_access_iterator_tag iterator_category
typedef pointer Pointer
 Pointer to (const) GenericMember.
typedef reference Reference
 Reference to (const) GenericMember.
typedef difference_type DifferenceType
 Signed integer type (e.g. ptrdiff_t).
 GenericMemberIterator ()
 Default constructor (singular value).
 GenericMemberIterator (const NonConstIterator &it)
 Iterator conversions to more const.
Iteratoroperator= (const NonConstIterator &it)

dereference

Pointer ptr_
 raw pointer
Reference operator* () const
Pointer operator-> () const
Reference operator[] (DifferenceType n) const
DifferenceType operator- (ConstIterator that) const
 Distance.
 GenericMemberIterator (Pointer p)
 Internal constructor from plain pointer.

Detailed Description

template<bool Const, typename Encoding, typename Allocator>
class GenericMemberIterator< Const, Encoding, Allocator >

(Constant) member iterator for a JSON object value

Template Parameters
ConstIs this a constant iterator?
EncodingEncoding of the value. (Even non-string values need to have the same encoding in a document)
AllocatorAllocator type for allocating memory of object, array and string.

This class implements a Random Access Iterator for GenericMember elements of a GenericValue, see ISO/IEC 14882:2003(E) C++ standard, 24.1 [lib.iterator.requirements].

Note
This iterator implementation is mainly intended to avoid implicit conversions from iterator values to NULL, e.g. from GenericValue::FindMember.
Define RAPIDJSON_NOMEMBERITERATORCLASS to fall back to a pointer-based implementation, if your platform doesn't provide the C++ <iterator> header.
See also
GenericMember, GenericValue::MemberIterator, GenericValue::ConstMemberIterator

Definition at line 187 of file document.h.

Member Typedef Documentation

◆ ConstIterator

template<bool Const, typename Encoding, typename Allocator>
typedef GenericMemberIterator<true,Encoding,Allocator> GenericMemberIterator< Const, Encoding, Allocator >::ConstIterator

Constant iterator type.

Definition at line 199 of file document.h.

◆ difference_type

template<bool Const, typename Encoding, typename Allocator>
typedef std::ptrdiff_t GenericMemberIterator< Const, Encoding, Allocator >::difference_type

Definition at line 208 of file document.h.

◆ DifferenceType

template<bool Const, typename Encoding, typename Allocator>
typedef difference_type GenericMemberIterator< Const, Encoding, Allocator >::DifferenceType

Signed integer type (e.g. ptrdiff_t).

Definition at line 217 of file document.h.

◆ Iterator

template<bool Const, typename Encoding, typename Allocator>
typedef GenericMemberIterator GenericMemberIterator< Const, Encoding, Allocator >::Iterator

Iterator type itself.

Definition at line 197 of file document.h.

◆ iterator_category

template<bool Const, typename Encoding, typename Allocator>
typedef std::random_access_iterator_tag GenericMemberIterator< Const, Encoding, Allocator >::iterator_category

Definition at line 209 of file document.h.

◆ NonConstIterator

template<bool Const, typename Encoding, typename Allocator>
typedef GenericMemberIterator<false,Encoding,Allocator> GenericMemberIterator< Const, Encoding, Allocator >::NonConstIterator

Non-constant iterator type.

Definition at line 201 of file document.h.

◆ PlainType

template<bool Const, typename Encoding, typename Allocator>
typedef GenericMember<Encoding,Allocator> GenericMemberIterator< Const, Encoding, Allocator >::PlainType
private

Definition at line 192 of file document.h.

◆ Pointer

template<bool Const, typename Encoding, typename Allocator>
typedef pointer GenericMemberIterator< Const, Encoding, Allocator >::Pointer

Pointer to (const) GenericMember.

Definition at line 213 of file document.h.

◆ pointer

template<bool Const, typename Encoding, typename Allocator>
typedef ValueType* GenericMemberIterator< Const, Encoding, Allocator >::pointer

Definition at line 206 of file document.h.

◆ Reference

template<bool Const, typename Encoding, typename Allocator>
typedef reference GenericMemberIterator< Const, Encoding, Allocator >::Reference

Reference to (const) GenericMember.

Definition at line 215 of file document.h.

◆ reference

template<bool Const, typename Encoding, typename Allocator>
typedef ValueType& GenericMemberIterator< Const, Encoding, Allocator >::reference

Definition at line 207 of file document.h.

◆ value_type

template<bool Const, typename Encoding, typename Allocator>
typedef ValueType GenericMemberIterator< Const, Encoding, Allocator >::value_type

Definition at line 205 of file document.h.

◆ ValueType

template<bool Const, typename Encoding, typename Allocator>
typedef internal::MaybeAddConst<Const,PlainType>::Type GenericMemberIterator< Const, Encoding, Allocator >::ValueType
private

Definition at line 193 of file document.h.

Constructor & Destructor Documentation

◆ GenericMemberIterator() [1/3]

template<bool Const, typename Encoding, typename Allocator>
GenericMemberIterator< Const, Encoding, Allocator >::GenericMemberIterator ( )
inline

Default constructor (singular value).

Creates an iterator pointing to no element.

Note
All operations, except for comparisons, are undefined on such values.

Definition at line 223 of file document.h.

◆ GenericMemberIterator() [2/3]

template<bool Const, typename Encoding, typename Allocator>
GenericMemberIterator< Const, Encoding, Allocator >::GenericMemberIterator ( const NonConstIterator & it)
inline

Iterator conversions to more const.

Parameters
it(Non-const) iterator to copy from

Allows the creation of an iterator from another GenericMemberIterator that is "less const". Especially, creating a non-constant iterator from a constant iterator are disabled:

  • const -> non-const (not ok)
  • const -> const (ok)
  • non-const -> const (ok)
  • non-const -> non-const (ok)
Note
If the Const template parameter is already false, this constructor effectively defines a regular copy-constructor. Otherwise, the copy constructor is implicitly defined.

Definition at line 241 of file document.h.

◆ GenericMemberIterator() [3/3]

template<bool Const, typename Encoding, typename Allocator>
GenericMemberIterator< Const, Encoding, Allocator >::GenericMemberIterator ( Pointer p)
inlineexplicitprivate

Internal constructor from plain pointer.

Definition at line 287 of file document.h.

Member Function Documentation

◆ operator!=()

template<bool Const, typename Encoding, typename Allocator>
template<bool Const_>
bool GenericMemberIterator< Const, Encoding, Allocator >::operator!= ( const GenericMemberIterator< Const_, Encoding, Allocator > & that) const
inline

Definition at line 264 of file document.h.

◆ operator*()

template<bool Const, typename Encoding, typename Allocator>
Reference GenericMemberIterator< Const, Encoding, Allocator >::operator* ( ) const
inline

Definition at line 277 of file document.h.

◆ operator+()

template<bool Const, typename Encoding, typename Allocator>
Iterator GenericMemberIterator< Const, Encoding, Allocator >::operator+ ( DifferenceType n) const
inline

Definition at line 254 of file document.h.

◆ operator++() [1/2]

template<bool Const, typename Encoding, typename Allocator>
Iterator & GenericMemberIterator< Const, Encoding, Allocator >::operator++ ( )
inline

Definition at line 246 of file document.h.

◆ operator++() [2/2]

template<bool Const, typename Encoding, typename Allocator>
Iterator GenericMemberIterator< Const, Encoding, Allocator >::operator++ ( int )
inline

Definition at line 248 of file document.h.

◆ operator+=()

template<bool Const, typename Encoding, typename Allocator>
Iterator & GenericMemberIterator< Const, Encoding, Allocator >::operator+= ( DifferenceType n)
inline

Definition at line 257 of file document.h.

◆ operator-() [1/2]

template<bool Const, typename Encoding, typename Allocator>
DifferenceType GenericMemberIterator< Const, Encoding, Allocator >::operator- ( ConstIterator that) const
inline

Distance.

Definition at line 283 of file document.h.

◆ operator-() [2/2]

template<bool Const, typename Encoding, typename Allocator>
Iterator GenericMemberIterator< Const, Encoding, Allocator >::operator- ( DifferenceType n) const
inline

Definition at line 255 of file document.h.

◆ operator--() [1/2]

template<bool Const, typename Encoding, typename Allocator>
Iterator & GenericMemberIterator< Const, Encoding, Allocator >::operator-- ( )
inline

Definition at line 247 of file document.h.

◆ operator--() [2/2]

template<bool Const, typename Encoding, typename Allocator>
Iterator GenericMemberIterator< Const, Encoding, Allocator >::operator-- ( int )
inline

Definition at line 249 of file document.h.

◆ operator-=()

template<bool Const, typename Encoding, typename Allocator>
Iterator & GenericMemberIterator< Const, Encoding, Allocator >::operator-= ( DifferenceType n)
inline

Definition at line 258 of file document.h.

◆ operator->()

template<bool Const, typename Encoding, typename Allocator>
Pointer GenericMemberIterator< Const, Encoding, Allocator >::operator-> ( ) const
inline

Definition at line 278 of file document.h.

◆ operator<()

template<bool Const, typename Encoding, typename Allocator>
template<bool Const_>
bool GenericMemberIterator< Const, Encoding, Allocator >::operator< ( const GenericMemberIterator< Const_, Encoding, Allocator > & that) const
inline

Definition at line 267 of file document.h.

◆ operator<=()

template<bool Const, typename Encoding, typename Allocator>
template<bool Const_>
bool GenericMemberIterator< Const, Encoding, Allocator >::operator<= ( const GenericMemberIterator< Const_, Encoding, Allocator > & that) const
inline

Definition at line 265 of file document.h.

◆ operator=()

template<bool Const, typename Encoding, typename Allocator>
Iterator & GenericMemberIterator< Const, Encoding, Allocator >::operator= ( const NonConstIterator & it)
inline

Definition at line 242 of file document.h.

◆ operator==()

template<bool Const, typename Encoding, typename Allocator>
template<bool Const_>
bool GenericMemberIterator< Const, Encoding, Allocator >::operator== ( const GenericMemberIterator< Const_, Encoding, Allocator > & that) const
inline

Definition at line 263 of file document.h.

◆ operator>()

template<bool Const, typename Encoding, typename Allocator>
template<bool Const_>
bool GenericMemberIterator< Const, Encoding, Allocator >::operator> ( const GenericMemberIterator< Const_, Encoding, Allocator > & that) const
inline

Definition at line 268 of file document.h.

◆ operator>=()

template<bool Const, typename Encoding, typename Allocator>
template<bool Const_>
bool GenericMemberIterator< Const, Encoding, Allocator >::operator>= ( const GenericMemberIterator< Const_, Encoding, Allocator > & that) const
inline

Definition at line 266 of file document.h.

◆ operator[]()

template<bool Const, typename Encoding, typename Allocator>
Reference GenericMemberIterator< Const, Encoding, Allocator >::operator[] ( DifferenceType n) const
inline

Definition at line 279 of file document.h.

◆ GenericMemberIterator

template<bool Const, typename Encoding, typename Allocator>
template<bool, typename, typename>
friend class GenericMemberIterator
friend

Definition at line 190 of file document.h.

◆ GenericValue< Encoding, Allocator >

template<bool Const, typename Encoding, typename Allocator>
friend class GenericValue< Encoding, Allocator >
friend

Definition at line 159 of file document.h.

Member Data Documentation

◆ ptr_

template<bool Const, typename Encoding, typename Allocator>
Pointer GenericMemberIterator< Const, Encoding, Allocator >::ptr_
private

raw pointer

Definition at line 289 of file document.h.

Referenced by GenericMemberIterator< true, Encoding, Allocator >::operator-().


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