VR-Vantage 2.8 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
GenericMemberIterator< Const, Encoding, Allocator > Class Template Reference

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

Inheritance diagram for GenericMemberIterator< Const, Encoding, Allocator >:
Inheritance graph
[legend]

Public Types

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.
typedef BaseType::pointer Pointer
 Pointer to (const) GenericMember.
typedef BaseType::reference Reference
 Reference to (const) GenericMember.
typedef BaseType::difference_type DifferenceType
 Signed integer type (e.g. ptrdiff_t)

Public Member Functions

 GenericMemberIterator ()
 Default constructor (singular value)
 GenericMemberIterator (const NonConstIterator &it)
 Iterator conversions to more const.
Iteratoroperator= (const NonConstIterator &it)
DifferenceType operator- (ConstIterator that) const
 Distance.
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
bool operator== (ConstIterator that) const
bool operator!= (ConstIterator that) const
bool operator<= (ConstIterator that) const
bool operator>= (ConstIterator that) const
bool operator< (ConstIterator that) const
bool operator> (ConstIterator that) const
dereference
Reference operator* () const
Pointer operator-> () const
Reference operator[] (DifferenceType n) const

Private Types

typedef GenericMember
< Encoding, Allocator > 
PlainType
typedef
internal::MaybeAddConst< Const,
PlainType >::Type 
ValueType
typedef std::iterator
< std::random_access_iterator_tag,
ValueType
BaseType

Private Member Functions

 GenericMemberIterator (Pointer p)
 Internal constructor from plain pointer.

Private Attributes

Pointer ptr_
 raw pointer

Friends

class GenericValue< Encoding, Allocator >
class GenericMemberIterator

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

Member Typedef Documentation

template<bool Const, typename Encoding , typename Allocator >
typedef GenericMember<Encoding,Allocator> GenericMemberIterator< Const, Encoding, Allocator >::PlainType
private
template<bool Const, typename Encoding , typename Allocator >
typedef internal::MaybeAddConst<Const,PlainType>::Type GenericMemberIterator< Const, Encoding, Allocator >::ValueType
private
template<bool Const, typename Encoding , typename Allocator >
typedef std::iterator<std::random_access_iterator_tag,ValueType> GenericMemberIterator< Const, Encoding, Allocator >::BaseType
private
template<bool Const, typename Encoding , typename Allocator >
typedef GenericMemberIterator GenericMemberIterator< Const, Encoding, Allocator >::Iterator

Iterator type itself.

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

Constant iterator type.

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

Non-constant iterator type.

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

Pointer to (const) GenericMember.

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

Reference to (const) GenericMember.

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

Signed integer type (e.g. ptrdiff_t)

Constructor & Destructor Documentation

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.
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.
template<bool Const, typename Encoding , typename Allocator >
GenericMemberIterator< Const, Encoding, Allocator >::GenericMemberIterator ( Pointer  p)
inlineexplicitprivate

Internal constructor from plain pointer.

Member Function Documentation

template<bool Const, typename Encoding , typename Allocator >
Iterator& GenericMemberIterator< Const, Encoding, Allocator >::operator= ( const NonConstIterator it)
inline
template<bool Const, typename Encoding , typename Allocator >
Iterator& GenericMemberIterator< Const, Encoding, Allocator >::operator++ ( )
inline
template<bool Const, typename Encoding , typename Allocator >
Iterator& GenericMemberIterator< Const, Encoding, Allocator >::operator-- ( )
inline
template<bool Const, typename Encoding , typename Allocator >
Iterator GenericMemberIterator< Const, Encoding, Allocator >::operator++ ( int  )
inline
template<bool Const, typename Encoding , typename Allocator >
Iterator GenericMemberIterator< Const, Encoding, Allocator >::operator-- ( int  )
inline
template<bool Const, typename Encoding , typename Allocator >
Iterator GenericMemberIterator< Const, Encoding, Allocator >::operator+ ( DifferenceType  n) const
inline
template<bool Const, typename Encoding , typename Allocator >
Iterator GenericMemberIterator< Const, Encoding, Allocator >::operator- ( DifferenceType  n) const
inline
template<bool Const, typename Encoding , typename Allocator >
Iterator& GenericMemberIterator< Const, Encoding, Allocator >::operator+= ( DifferenceType  n)
inline
template<bool Const, typename Encoding , typename Allocator >
Iterator& GenericMemberIterator< Const, Encoding, Allocator >::operator-= ( DifferenceType  n)
inline
template<bool Const, typename Encoding , typename Allocator >
bool GenericMemberIterator< Const, Encoding, Allocator >::operator== ( ConstIterator  that) const
inline
template<bool Const, typename Encoding , typename Allocator >
bool GenericMemberIterator< Const, Encoding, Allocator >::operator!= ( ConstIterator  that) const
inline
template<bool Const, typename Encoding , typename Allocator >
bool GenericMemberIterator< Const, Encoding, Allocator >::operator<= ( ConstIterator  that) const
inline
template<bool Const, typename Encoding , typename Allocator >
bool GenericMemberIterator< Const, Encoding, Allocator >::operator>= ( ConstIterator  that) const
inline
template<bool Const, typename Encoding , typename Allocator >
bool GenericMemberIterator< Const, Encoding, Allocator >::operator< ( ConstIterator  that) const
inline
template<bool Const, typename Encoding , typename Allocator >
bool GenericMemberIterator< Const, Encoding, Allocator >::operator> ( ConstIterator  that) const
inline
template<bool Const, typename Encoding , typename Allocator >
Reference GenericMemberIterator< Const, Encoding, Allocator >::operator* ( ) const
inline
template<bool Const, typename Encoding , typename Allocator >
Pointer GenericMemberIterator< Const, Encoding, Allocator >::operator-> ( ) const
inline
template<bool Const, typename Encoding , typename Allocator >
Reference GenericMemberIterator< Const, Encoding, Allocator >::operator[] ( DifferenceType  n) const
inline
template<bool Const, typename Encoding , typename Allocator >
DifferenceType GenericMemberIterator< Const, Encoding, Allocator >::operator- ( ConstIterator  that) const
inline

Friends And Related Function Documentation

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

Member Data Documentation

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

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


Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)