LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Provides iterators for std::begin() and std::end() More...
#include "MapKeyIterator.h"
Public Types | |
using | map_t = Map |
using | const_iterator = MapKeyIterator< typename map_t::const_iterator > |
Public Member Functions | |
MapKeyConstIteratorBox (map_t const &map) | |
const_iterator | begin () |
const_iterator | end () |
const_iterator | cbegin () |
const_iterator | cend () |
Protected Attributes | |
const_iterator | beginKey |
iterator pointing to the begin key More... | |
const_iterator | endKey |
iterator pointing to the endkey More... | |
Provides iterators for std::begin() and std::end()
Map | type of the map to be wrapped |
This object can wrap a map-like type to iterate through its key in a range-based for loop.
Example of usage:
std::map<int, double> my_map; // ... fill the map ... // print all the kets for (int const& key: MapKeyConstIteratorBox<std::map<int, double>>(my_map)) std::cout << "Key: " << key << std::endl;
Only constant iteration on keys is provided.
Definition at line 104 of file MapKeyIterator.h.
using rndm::NuRandomServiceHelper::MapKeyConstIteratorBox< Map >::const_iterator = MapKeyIterator<typename map_t::const_iterator> |
Definition at line 108 of file MapKeyIterator.h.
using rndm::NuRandomServiceHelper::MapKeyConstIteratorBox< Map >::map_t = Map |
Definition at line 106 of file MapKeyIterator.h.
|
inline |
Definition at line 110 of file MapKeyIterator.h.
|
inline |
Definition at line 114 of file MapKeyIterator.h.
|
inline |
Definition at line 116 of file MapKeyIterator.h.
|
inline |
Definition at line 117 of file MapKeyIterator.h.
|
inline |
Definition at line 115 of file MapKeyIterator.h.
|
protected |
iterator pointing to the begin key
Definition at line 120 of file MapKeyIterator.h.
|
protected |
iterator pointing to the endkey
Definition at line 121 of file MapKeyIterator.h.