PLCnext API Documentation 25.0.2.69
Enumerator.IteratorAdapters.hxx
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Core/Detail/Enumerator.hxx"
9namespace Arp { namespace Base { namespace Core
10{
11
15template<class T>
16template<class Iterator>
18{
19public:
21 struct Value
22 {
23 typename Iterator::reference operator()(Iterator i)const
24 {
25 return *i;
26 }
27 };
29 struct ConstKey
30 {
31 const typename Iterator::value_type::first_type& operator()(Iterator i)const
32 {
33 return i->first;
34 }
35 };
37 struct Mapped
38 {
39 typename Iterator::value_type::second_type& operator()(Iterator i)const
40 {
41 return i->second;
42 }
43 };
46 {
47 const typename Iterator::value_type::second_type& operator()(Iterator i)const
48 {
49 return i->second;
50 }
51 };
52};
53
55// inline methods of class Enumerator<T>::IteratorAdapters
56
57}}} // end of namespace Arp::Base::Core
This class implements several adapter of STL iterators to extract specific properties.
Definition: Enumerator.IteratorAdapters.hxx:18
This class defines a base class for all enumerator implementations and some predefined enumerators as...
Definition: Enumerator.hxx:24
Root namespace for the PLCnext API
The key functor for maps.
Definition: Enumerator.IteratorAdapters.hxx:30
The mapped value functor for maps for const values.
Definition: Enumerator.IteratorAdapters.hxx:46
The mapped value functor for maps.
Definition: Enumerator.IteratorAdapters.hxx:38
The Value functor.
Definition: Enumerator.IteratorAdapters.hxx:22