Torque3D Documentation / _generateds / GenericMemberIterator

GenericMemberIterator

Engine/source/persistence/rapidjson/document.h

(Constant) member iterator for a JSON object value

More...

std::iterator_traits support

Default constructor (singular value)

Iterator conversions to more const.

ValueType
value_type 
ValueType *
pointer 
ValueType &
reference 
std::ptrdiff_t
difference_type 
std::random_access_iterator_tag
iterator_category 
Pointer 

Pointer to (const) GenericMember.

Reference 

Reference to (const) GenericMember.

DifferenceType 

Signed integer type (e.g.

ptrdiff_t
)

dereference

raw pointer

Private Types

internal::MaybeAddConst< Const, PlainType >::Type
ValueType 

Public Types

ConstIterator 

Constant iterator type.

Iterator 

Iterator type itself.

NonConstIterator 

Non-constant iterator type.

Detailed Description

(Constant) member iterator for a JSON object value

Parameters:

Const

Is this a constant iterator?

Encoding

Encoding of the value. (Even non-string values need to have the same encoding in a document)

Allocator

Allocator 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.

note:

Define

RAPIDJSON_NOMEMBERITERATORCLASS
to fall back to a pointer-based implementation, if your platform doesn't provide the C++ header.

std::iterator_traits support

GenericMemberIterator()

Default constructor (singular value)

Creates an iterator pointing to no element.

note:

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

GenericMemberIterator(const NonConstIterator & it)

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.

operator=(const NonConstIterator & it)

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
)

dereference

operator*()

operator->()

operator[](DifferenceType n)

operator-(ConstIterator that)

Distance.

GenericMemberIterator(Pointer p)

Internal constructor from plain pointer.

Pointer ptr_ 

raw pointer

stepping

operator++()

operator--()

operator++(int )

operator--(int )

increment/decrement

operator+(DifferenceType n)

operator-(DifferenceType n)

operator+=(DifferenceType n)

operator-=(DifferenceType n)

relations

operator==(ConstIterator that)

operator!=(ConstIterator that)

operator<=(ConstIterator that)

operator>=(ConstIterator that)

operator<(ConstIterator that)

operator>(ConstIterator that)

Private Types

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

Public Types

typedef GenericMemberIterator< true, Encoding, Allocator > ConstIterator 

Constant iterator type.

typedef GenericMemberIterator Iterator 

Iterator type itself.

typedef GenericMemberIterator< false, Encoding, Allocator > NonConstIterator 

Non-constant iterator type.

Public Friends