Commit 58357502 authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

GenericMemberIterator: fixup some formatting and documentation

No functional changes.
parent 78c75de2
...@@ -40,9 +40,9 @@ struct GenericMember { ...@@ -40,9 +40,9 @@ struct GenericMember {
#ifndef RAPIDJSON_NOMEMBERITERATORCLASS #ifndef RAPIDJSON_NOMEMBERITERATORCLASS
//! (Const) member iterator for a JSON object value //! (Constant) member iterator for a JSON object value
/*! /*!
\tparam Const Is this a const iterator? \tparam Const Is this a constant iterator?
\tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding in a document) \tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding in a document)
\tparam Allocator Allocator type for allocating memory of object, array and string. \tparam Allocator Allocator type for allocating memory of object, array and string.
...@@ -74,9 +74,9 @@ class GenericMemberIterator ...@@ -74,9 +74,9 @@ class GenericMemberIterator
public: public:
//! Iterator type itself //! Iterator type itself
typedef GenericMemberIterator Type; typedef GenericMemberIterator Type;
//! Const iterator type //! Constant iterator type
typedef GenericMemberIterator<true,Encoding,Allocator> ConstType; typedef GenericMemberIterator<true,Encoding,Allocator> ConstType;
//! Non-const iterator type //! Non-constant iterator type
typedef GenericMemberIterator<false,Encoding,Allocator> NonConstType; typedef GenericMemberIterator<false,Encoding,Allocator> NonConstType;
//! Pointer to (const) GenericMember //! Pointer to (const) GenericMember
...@@ -97,8 +97,8 @@ public: ...@@ -97,8 +97,8 @@ public:
\param it (Non-const) iterator to copy from \param it (Non-const) iterator to copy from
Allows the creation of an iterator from another GenericMemberIterator Allows the creation of an iterator from another GenericMemberIterator
that is "less const". Especially, creating a non-const iterator from that is "less const". Especially, creating a non-constant iterator
a const iterator are disabled: from a constant iterator are disabled:
\li const -> non-const (not ok) \li const -> non-const (not ok)
\li const -> const (ok) \li const -> const (ok)
\li non-const -> const (ok) \li non-const -> const (ok)
...@@ -108,8 +108,7 @@ public: ...@@ -108,8 +108,7 @@ public:
constructor effectively defines a regular copy-constructor. constructor effectively defines a regular copy-constructor.
Otherwise, the copy constructor is implicitly defined. Otherwise, the copy constructor is implicitly defined.
*/ */
GenericMemberIterator(const NonConstType & it) GenericMemberIterator(const NonConstType & it) : ptr_( it.ptr_ ) {}
: ptr_( it.ptr_ ) {}
//! @name stepping //! @name stepping
//@{ //@{
...@@ -149,7 +148,7 @@ public: ...@@ -149,7 +148,7 @@ public:
DifferenceType operator-(Type that) const { return ptr_-that.ptr_; } DifferenceType operator-(Type that) const { return ptr_-that.ptr_; }
private: private:
//!< Internal constructor from plain pointer //! Internal constructor from plain pointer
explicit GenericMemberIterator(Pointer p) : ptr_(p) {} explicit GenericMemberIterator(Pointer p) : ptr_(p) {}
Pointer ptr_; //!< raw pointer Pointer ptr_; //!< raw pointer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment