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

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

#include <msgpack_light/details/map_iterator.h>

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

Public Types

using difference_type = std::ptrdiff_t
 Type of differences.
using reference = value_type
 Type of references.
using value_type
 Type of values.

Public Member Functions

 mutable_map_iterator () noexcept
 Constructor.
 mutable_map_iterator (details::key_value_pair_data *pointer, details::allocator_wrapper< Allocator > *allocator) noexcept
 Constructor.
std::pair< mutable_object_ref< Allocator >, mutable_object_ref< Allocator > > operator* () const noexcept
 Dereference this iterator.
mutable_map_iteratoroperator++ () noexcept
 Increment this iterator.
const mutable_map_iterator operator++ (int) noexcept
 Increment this iterator.

Private Attributes

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

Detailed Description

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

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

Template Parameters
AllocatorType of the allocator.
Note
Instances of this class can be created from msgpack_light::mutable_map_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 45 of file map_iterator.h.

Member Typedef Documentation

◆ difference_type

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

Type of differences.

Definition at line 48 of file map_iterator.h.

◆ reference

template<typename Allocator = standard_allocator>
using msgpack_light::mutable_map_iterator< Allocator >::reference = value_type

Type of references.

Definition at line 55 of file map_iterator.h.

◆ value_type

template<typename Allocator = standard_allocator>
using msgpack_light::mutable_map_iterator< Allocator >::value_type
Initial value:
std::pair<mutable_object_ref<Allocator>, mutable_object_ref<Allocator>>
Class to access non-constant objects.
Definition object_ref.h:48

Type of values.

Definition at line 51 of file map_iterator.h.

Constructor & Destructor Documentation

◆ mutable_map_iterator() [1/2]

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

Constructor.

Definition at line 60 of file map_iterator.h.

◆ mutable_map_iterator() [2/2]

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

Constructor.

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

Definition at line 68 of file map_iterator.h.

Member Function Documentation

◆ operator*()

template<typename Allocator>
std::pair< mutable_object_ref< Allocator >, mutable_object_ref< Allocator > > msgpack_light::mutable_map_iterator< Allocator >::operator* ( ) const
inlinenoexcept

Dereference this iterator.

Returns
References to the current key and value.

Definition at line 36 of file map_iterator_impl.h.

◆ operator++() [1/2]

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

Increment this iterator.

Returns
This iterator.

Definition at line 85 of file map_iterator.h.

◆ operator++() [2/2]

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

Increment this iterator.

Returns
This iterator.

Definition at line 96 of file map_iterator.h.

Member Data Documentation

◆ allocator_

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

Allocator.

Definition at line 107 of file map_iterator.h.

◆ pointer_

template<typename Allocator = standard_allocator>
details::key_value_pair_data* msgpack_light::mutable_map_iterator< Allocator >::pointer_
private

Pointer to the current data.

Definition at line 104 of file map_iterator.h.


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