Changeset 1130:0759d974de81 in lemon-main for lemon/maps.h
- Timestamp:
- 01/05/14 22:24:56 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/maps.h
r1092 r1130 26 26 27 27 #include <lemon/core.h> 28 #include <lemon/bits/stl_iterators.h> 28 29 29 30 ///\file … … 2582 2583 }; 2583 2584 2585 /// \brief STL style iterator for the keys mapped to \c true. 2586 /// 2587 /// This is an STL style wrapper for \ref TrueIt. 2588 /// It can be used in range-based for loops, STL algorithms, etc. 2589 LemonRangeWrapper1<TrueIt, IterableBoolMap> 2590 trueKeys() { 2591 return LemonRangeWrapper1<TrueIt, IterableBoolMap>(*this); 2592 } 2593 2594 2584 2595 /// \brief Iterator for the keys mapped to \c false. 2585 2596 /// … … 2620 2631 const IterableBoolMap* _map; 2621 2632 }; 2633 2634 /// \brief STL style iterator for the keys mapped to \c false. 2635 /// 2636 /// This is an STL style wrapper for \ref FalseIt. 2637 /// It can be used in range-based for loops, STL algorithms, etc. 2638 LemonRangeWrapper1<FalseIt, IterableBoolMap> 2639 falseKeys() { 2640 return LemonRangeWrapper1<FalseIt, IterableBoolMap>(*this); 2641 } 2642 2622 2643 2623 2644 /// \brief Iterator for the keys mapped to a given value. … … 2664 2685 const IterableBoolMap* _map; 2665 2686 }; 2687 2688 /// \brief STL style iterator for the keys mapped to a given value. 2689 /// 2690 /// This is an STL style wrapper for \ref ItemIt. 2691 /// It can be used in range-based for loops, STL algorithms, etc. 2692 LemonRangeWrapper2<ItemIt, IterableBoolMap, bool> 2693 items(bool value) { 2694 return LemonRangeWrapper2<ItemIt, IterableBoolMap, bool>(*this, value); 2695 } 2666 2696 2667 2697 protected: … … 3006 3036 }; 3007 3037 3038 /// \brief STL style iterator for the keys with the same value. 3039 /// 3040 /// This is an STL style wrapper for \ref ItemIt. 3041 /// It can be used in range-based for loops, STL algorithms, etc. 3042 LemonRangeWrapper2<ItemIt, IterableIntMap, int> 3043 items(int value) { 3044 return LemonRangeWrapper2<ItemIt, IterableIntMap, int>(*this, value); 3045 } 3046 3047 3008 3048 protected: 3009 3049 … … 3249 3289 }; 3250 3290 3291 /// \brief STL style iterator for the keys with the same value. 3292 /// 3293 /// This is an STL style wrapper for \ref ItemIt. 3294 /// It can be used in range-based for loops, STL algorithms, etc. 3295 LemonRangeWrapper2<ItemIt, IterableValueMap, V> 3296 items(const V& value) { 3297 return LemonRangeWrapper2<ItemIt, IterableValueMap, V>(*this, value); 3298 } 3299 3300 3251 3301 protected: 3252 3302
Note: See TracChangeset
for help on using the changeset viewer.