RapidJSON: rapidjson::GenericMemberIterator< Const, Encoding, Allocator > 模板类 参考

Public 类型 | 友元 | 所有成员列表
rapidjson::GenericMemberIterator< Const, Encoding, Allocator > 模板类 参考

(Constant) member iterator for a JSON object value 更多...

`#include <document.h>`

## Public 类型
typedef GenericMemberIterator | Iterator
| Iterator type itself
typedef GenericMemberIterator< true, Encoding, Allocator > | ConstIterator
| Constant iterator type
typedef GenericMemberIterator< false, Encoding, Allocator > | NonConstIterator
| Non-constant iterator type

## Public 成员函数
stepping
Iterator & | operator++ ()
Iterator & | operator-- ()
Iterator | operator++ (int)
Iterator | operator-- (int)
increment/decrement
Iterator | operator+ (DifferenceType n) const
Iterator | operator- (DifferenceType n) const
Iterator & | operator+= (DifferenceType n)
Iterator & | operator-= (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

## 友元
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 更多...
Iterator & | operator= (const NonConstIterator &it)

## dereference
Reference | operator* () const
Pointer | operator-> () const
Reference | operator[] (DifferenceType n) const
DifferenceType | operator- (ConstIterator that) const
| Distance

## 详细描述

### template<bool Const, typename Encoding, typename Allocator>
class rapidjson::GenericMemberIterator< Const, Encoding, Allocator >

(Constant) member iterator for a JSON object value

模板参数

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

注解
  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.

参见
  GenericMember, GenericValue::MemberIterator, GenericValue::ConstMemberIterator

## 构造及析构函数说明

## ◆ GenericMemberIterator() [1/2]

template<bool Const, typename Encoding , typename Allocator >

rapidjson::GenericMemberIterator< Const, Encoding, Allocator >::GenericMemberIterator | ( |  | ) |
| inline

Default constructor (singular value)

Creates an iterator pointing to no element.

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

## ◆ GenericMemberIterator() [2/2]

template<bool Const, typename Encoding , typename Allocator >

rapidjson::GenericMemberIterator< Const, Encoding, Allocator >::GenericMemberIterator | ( | const NonConstIterator & | it | ) |
| inline

Iterator conversions to more const

参数

  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)

注解
  If the `Const` template parameter is already `false`, this constructor effectively defines a regular copy-constructor. Otherwise, the copy constructor is implicitly defined.

该类的文档由以下文件生成:

- include/rapidjson/document.h