cpp-msgpack-light 0.3.0
A light library to serialize MessagePack.
Loading...
Searching...
No Matches
msgpack_light::mutable_array_iterator< Allocator > Class Template Reference

Class of iterators of arrays to access non-constant objects. More...

#include <msgpack_light/details/array_iterator.h>

Inheritance diagram for msgpack_light::mutable_array_iterator< Allocator >:
Collaboration diagram for msgpack_light::mutable_array_iterator< Allocator >:

Public Types

using difference_type = std::ptrdiff_t
 Type of differences.
using reference = mutable_object_ref<Allocator>
 Type of references.
using value_type = mutable_object_ref<Allocator>
 Type of values.

Public Member Functions

 mutable_array_iterator () noexcept
 Constructor.
 mutable_array_iterator (details::object_data *pointer, details::allocator_wrapper< Allocator > *allocator) noexcept
 Constructor.
mutable_object_ref< Allocator > operator* () const noexcept
 Dereference this iterator.
mutable_array_iteratoroperator++ () noexcept
 Increment this iterator.
const mutable_array_iterator operator++ (int) noexcept
 Increment this iterator.

Private Attributes

details::allocator_wrapper< Allocator > * allocator_
 Allocator.
details::object_datapointer_
 Pointer to the current data.

Detailed Description

template<typename Allocator = standard_allocator>
class msgpack_light::mutable_array_iterator< Allocator >

Class of iterators of arrays to access non-constant objects.

Template Parameters
AllocatorType of the allocator.
Note
Instances of this class can be created from msgpack_light::mutable_array_ref class.
Warning
This class only holds pointers to data in msgpack_light::object class, do not call functions in this class without msgpack_light::object instances holding the data.

Definition at line 44 of file array_iterator.h.

Member Typedef Documentation

◆ difference_type

template<typename Allocator = standard_allocator>
using msgpack_light::mutable_array_iterator< Allocator >::difference_type = std::ptrdiff_t

Type of differences.

Definition at line 47 of file array_iterator.h.

◆ reference

template<typename Allocator = standard_allocator>
using msgpack_light::mutable_array_iterator< Allocator >::reference = mutable_object_ref<Allocator>

Type of references.

Definition at line 53 of file array_iterator.h.

◆ value_type

template<typename Allocator = standard_allocator>
using msgpack_light::mutable_array_iterator< Allocator >::value_type = mutable_object_ref<Allocator>

Type of values.

Definition at line 50 of file array_iterator.h.

Constructor & Destructor Documentation

◆ mutable_array_iterator() [1/2]

template<typename Allocator = standard_allocator>
msgpack_light::mutable_array_iterator< Allocator >::mutable_array_iterator ( )
inlinenoexcept

Constructor.

Definition at line 58 of file array_iterator.h.

◆ mutable_array_iterator() [2/2]

template<typename Allocator = standard_allocator>
msgpack_light::mutable_array_iterator< Allocator >::mutable_array_iterator ( details::object_data * pointer,
details::allocator_wrapper< Allocator > * allocator )
inlinenoexcept

Constructor.

Parameters
[in]pointerPointer to the current data.
[in]allocatorAllocator.

Definition at line 67 of file array_iterator.h.

Member Function Documentation

◆ operator*()

template<typename Allocator>
mutable_object_ref< Allocator > msgpack_light::mutable_array_iterator< Allocator >::operator* ( ) const
inlinenoexcept

Dereference this iterator.

Returns
Reference to the current object.

Definition at line 33 of file array_iterator_impl.h.

◆ operator++() [1/2]

template<typename Allocator = standard_allocator>
mutable_array_iterator & msgpack_light::mutable_array_iterator< Allocator >::operator++ ( )
inlinenoexcept

Increment this iterator.

Returns
This iterator.

Definition at line 83 of file array_iterator.h.

◆ operator++() [2/2]

template<typename Allocator = standard_allocator>
const mutable_array_iterator msgpack_light::mutable_array_iterator< Allocator >::operator++ ( int )
inlinenoexcept

Increment this iterator.

Returns
This iterator.

Definition at line 94 of file array_iterator.h.

Member Data Documentation

◆ allocator_

template<typename Allocator = standard_allocator>
details::allocator_wrapper<Allocator>* msgpack_light::mutable_array_iterator< Allocator >::allocator_
private

Allocator.

Definition at line 105 of file array_iterator.h.

◆ pointer_

template<typename Allocator = standard_allocator>
details::object_data* msgpack_light::mutable_array_iterator< Allocator >::pointer_
private

Pointer to the current data.

Definition at line 102 of file array_iterator.h.


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