Embedded Template Library 1.0
reference_flat_multimap.h
Go to the documentation of this file.
1
2
3/******************************************************************************
4The MIT License(MIT)
5
6Embedded Template Library.
7https://github.com/ETLCPP/etl
8https://www.etlcpp.com
9
10Copyright(c) 2017 John Wellbelove
11
12Permission is hereby granted, free of charge, to any person obtaining a copy
13of this software and associated documentation files(the "Software"), to deal
14in the Software without restriction, including without limitation the rights
15to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
16copies of the Software, and to permit persons to whom the Software is
17furnished to do so, subject to the following conditions :
18
19The above copyright notice and this permission notice shall be included in all
20copies or substantial portions of the Software.
21
22THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
25AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28SOFTWARE.
29******************************************************************************/
30
31#ifndef ETL_REFERENCE_FLAT_MULTIMAP_INCLUDED
32#define ETL_REFERENCE_FLAT_MULTIMAP_INCLUDED
33
34#include "platform.h"
35#include "exception.h"
36#include "error_handler.h"
37#include "debug_count.h"
38#include "vector.h"
39#include "iterator.h"
40#include "nth_type.h"
41#include "type_traits.h"
42#include "type_traits.h"
43
45
46#include <stddef.h>
47
48namespace etl
49{
50 //***************************************************************************
53 //***************************************************************************
55 {
56 public:
57
58 flat_multimap_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
59 : exception(reason_, file_name_, line_number_)
60 {
61 }
62 };
63
64 //***************************************************************************
67 //***************************************************************************
69 {
70 public:
71
72 flat_multimap_full(string_type file_name_, numeric_type line_number_)
73 : flat_multimap_exception(ETL_ERROR_TEXT("flat_multimap:full", ETL_REFERENCE_FLAT_MULTIMAP_FILE_ID"A"), file_name_, line_number_)
74 {
75 }
76 };
77
78 //***************************************************************************
82 //***************************************************************************
83 template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey> >
85 {
86 public:
87
88 typedef ETL_OR_STD::pair<const TKey, TMapped> value_type;
89
90 protected:
91
93
94 public:
95
96 typedef TKey key_type;
97 typedef TMapped mapped_type;
98 typedef TKeyCompare key_compare;
99 typedef value_type& reference;
100 typedef const value_type& const_reference;
101 typedef value_type* pointer;
102 typedef const value_type* const_pointer;
103 typedef size_t size_type;
104
105 //*************************************************************************
106 class iterator : public etl::iterator<ETL_OR_STD::bidirectional_iterator_tag, value_type>
107 {
108 public:
109
110 friend class ireference_flat_multimap;
111 friend class const_iterator;
112
113 iterator()
114 {
115 }
116
117 iterator(typename lookup_t::iterator ilookup_)
118 : ilookup(ilookup_)
119 {
120 }
121
122 iterator(const iterator& other)
123 : ilookup(other.ilookup)
124 {
125 }
126
127 iterator& operator =(const iterator& other)
128 {
129 ilookup = other.ilookup;
130 return *this;
131 }
132
133 iterator& operator ++()
134 {
135 ++ilookup;
136 return *this;
137 }
138
139 iterator operator ++(int)
140 {
141 iterator temp(*this);
142 ++ilookup;
143 return temp;
144 }
145
146 iterator& operator --()
147 {
148 --ilookup;
149 return *this;
150 }
151
152 iterator operator --(int)
153 {
154 iterator temp(*this);
155 --ilookup;
156 return temp;
157 }
158
159 reference operator *() const
160 {
161 return *(*ilookup);
162 }
163
164 pointer operator &() const
165 {
166 return etl::addressof(*(*ilookup));
167 }
168
169 pointer operator ->() const
170 {
171 return etl::addressof(*(*ilookup));
172 }
173
174 friend bool operator == (const iterator& lhs, const iterator& rhs)
175 {
176 return lhs.ilookup == rhs.ilookup;
177 }
178
179 friend bool operator != (const iterator& lhs, const iterator& rhs)
180 {
181 return !(lhs == rhs);
182 }
183
184 private:
185
186 typename lookup_t::iterator ilookup;
187 };
188
189 //*************************************************************************
190 class const_iterator : public etl::iterator<ETL_OR_STD::bidirectional_iterator_tag, const value_type>
191 {
192 public:
193
194 friend class ireference_flat_multimap;
195
197 {
198 }
199
200 const_iterator(typename lookup_t::const_iterator ilookup_)
201 : ilookup(ilookup_)
202 {
203 }
204
206 : ilookup(other.ilookup)
207 {
208 }
209
210 const_iterator(const const_iterator& other)
211 : ilookup(other.ilookup)
212 {
213 }
214
215 const_iterator& operator =(const iterator& other)
216 {
217 ilookup = other.ilookup;
218 return *this;
219 }
220
221 const_iterator& operator =(const const_iterator& other)
222 {
223 ilookup = other.ilookup;
224 return *this;
225 }
226
227 const_iterator& operator ++()
228 {
229 ++ilookup;
230 return *this;
231 }
232
233 const_iterator operator ++(int)
234 {
235 const_iterator temp(*this);
236 ++ilookup;
237 return temp;
238 }
239
240 const_iterator& operator --()
241 {
242 --ilookup;
243 return *this;
244 }
245
246 const_iterator operator --(int)
247 {
248 const_iterator temp(*this);
249 --ilookup;
250 return temp;
251 }
252
253 const_reference operator *() const
254 {
255 return *(*ilookup);
256 }
257
258 const_pointer operator &() const
259 {
260 return etl::addressof(*(*ilookup));
261 }
262
263 const_pointer operator ->() const
264 {
265 return etl::addressof(*(*ilookup));
266 }
267
268 friend bool operator == (const const_iterator& lhs, const const_iterator& rhs)
269 {
270 return lhs.ilookup == rhs.ilookup;
271 }
272
273 friend bool operator != (const const_iterator& lhs, const const_iterator& rhs)
274 {
275 return !(lhs == rhs);
276 }
277
278 private:
279
280 typename lookup_t::const_iterator ilookup;
281 };
282
283 typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
284 typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
285 typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
286
287 protected:
288
289 typedef const TKey& key_parameter_t;
290
291 private:
292
293 //*********************************************************************
295 //*********************************************************************
296 class Compare
297 {
298 public:
299
300 bool operator ()(const value_type& element, key_type key) const
301 {
302 return comp(element.first, key);
303 }
304
305 bool operator ()(key_type key, const value_type& element) const
306 {
307 return comp(key, element.first);
308 }
309
310#if ETL_USING_CPP11
311 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
312 bool operator ()(const value_type& element, const K& key) const
313 {
314 return comp(element.first, key);
315 }
316
317 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
318 bool operator ()(const K& key, const value_type& element) const
319 {
320 return comp(key, element.first);
321 }
322#endif
323
324 key_compare comp;
325 };
326
327 public:
328
329 //*********************************************************************
332 //*********************************************************************
334 {
335 return iterator(lookup.begin());
336 }
337
338 //*********************************************************************
341 //*********************************************************************
343 {
344 return const_iterator(lookup.begin());
345 }
346
347 //*********************************************************************
350 //*********************************************************************
352 {
353 return iterator(lookup.end());
354 }
355
356 //*********************************************************************
359 //*********************************************************************
361 {
362 return const_iterator(lookup.end());
363 }
364
365 //*********************************************************************
368 //*********************************************************************
370 {
371 return const_iterator(lookup.cbegin());
372 }
373
374 //*********************************************************************
377 //*********************************************************************
379 {
380 return const_iterator(lookup.cend());
381 }
382
383 //*********************************************************************
386 //*********************************************************************
387 reverse_iterator rbegin()
388 {
389 return reverse_iterator(lookup.rbegin());
390 }
391
392 //*********************************************************************
395 //*********************************************************************
396 const_reverse_iterator rbegin() const
397 {
398 return const_reverse_iterator(lookup.rbegin());
399 }
400
401 //*********************************************************************
404 //*********************************************************************
405 reverse_iterator rend()
406 {
407 return reverse_iterator(lookup.rend());
408 }
409
410 //*********************************************************************
413 //*********************************************************************
414 const_reverse_iterator rend() const
415 {
416 return const_reverse_iterator(lookup.rend());
417 }
418
419 //*********************************************************************
422 //*********************************************************************
423 const_reverse_iterator crbegin() const
424 {
425 return const_reverse_iterator(lookup.crbegin());
426 }
427
428 //*********************************************************************
431 //*********************************************************************
432 const_reverse_iterator crend() const
433 {
434 return const_reverse_iterator(lookup.crend());
435 }
436
437 //*********************************************************************
443 //*********************************************************************
444 template <typename TIterator>
445 void assign(TIterator first, TIterator last)
446 {
447#if ETL_IS_DEBUG_BUILD
448 difference_type d = etl::distance(first, last);
449 ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multimap_full));
450#endif
451
452 clear();
453
454 while (first != last)
455 {
456 insert(*first);
457 ++first;
458 }
459 }
460
461 //*********************************************************************
465 //*********************************************************************
466 ETL_OR_STD::pair<iterator, bool> insert(value_type& value)
467 {
468 ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multimap_full));
469
470 ETL_OR_STD::pair<iterator, bool> result(end(), false);
471
472 iterator i_element = upper_bound(value.first);
473
474 return insert_at(i_element, value);
475 }
476
477 //*********************************************************************
482 //*********************************************************************
483 iterator insert(const_iterator /*position*/, const value_type& value)
484 {
485 return insert(value).first;
486 }
487
488 //*********************************************************************
494 //*********************************************************************
495 template <class TIterator>
496 void insert(TIterator first, TIterator last)
497 {
498 while (first != last)
499 {
500 insert(*first);
501 ++first;
502 }
503 }
504
505 //*********************************************************************
509 //*********************************************************************
510 size_t erase(key_parameter_t key)
511 {
512 ETL_OR_STD::pair<iterator, iterator> range = equal_range(key);
513
514 if (range.first == end())
515 {
516 return 0;
517 }
518 else
519 {
520 size_t d = etl::distance(range.first, range.second);
521 erase(range.first, range.second);
522 return d;
523 }
524 }
525
526#if ETL_USING_CPP11
527 //*********************************************************************
528 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
529 size_t erase(K&& key)
530 {
531 ETL_OR_STD::pair<iterator, iterator> range = equal_range(key);
532
533 if (range.first == end())
534 {
535 return 0U;
536 }
537 else
538 {
539 size_t d = etl::distance(range.first, range.second);
540 erase(range.first, range.second);
541 return d;
542 }
543 }
544#endif
545
546 //*********************************************************************
549 //*********************************************************************
551 {
552 return lookup.erase(i_element.ilookup);
553 }
554
555 //*********************************************************************
558 //*********************************************************************
560 {
561 return lookup.erase(i_element.ilookup);
562 }
563
564 //*********************************************************************
570 //*********************************************************************
572 {
573 return lookup.erase(first.ilookup, last.ilookup);
574 }
575
576 //*************************************************************************
578 //*************************************************************************
579 void clear()
580 {
581 lookup.clear();
582 }
583
584 //*********************************************************************
588 //*********************************************************************
589 iterator find(key_parameter_t key)
590 {
591 iterator itr = lower_bound(key);
592
593 if (itr != end())
594 {
595 if (!key_compare()(itr->first, key) && !key_compare()(key, itr->first))
596 {
597 return itr;
598 }
599 else
600 {
601 return end();
602 }
603 }
604
605 return end();
606 }
607
608#if ETL_USING_CPP11
609 //*********************************************************************
610 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
611 iterator find(const K& key)
612 {
613 iterator itr = lower_bound(key);
614
615 if (itr != end())
616 {
617 if (!key_compare()(itr->first, key) && !key_compare()(key, itr->first))
618 {
619 return itr;
620 }
621 else
622 {
623 return end();
624 }
625 }
626
627 return end();
628 }
629#endif
630
631 //*********************************************************************
635 //*********************************************************************
636 const_iterator find(key_parameter_t key) const
637 {
638 const_iterator itr = lower_bound(key);
639
640 if (itr != end())
641 {
642 if (!key_compare()(itr->first, key) && !key_compare()(key, itr->first))
643 {
644 return itr;
645 }
646 else
647 {
648 return end();
649 }
650 }
651
652 return end();
653 }
654
655#if ETL_USING_CPP11
656 //*********************************************************************
657 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
658 const_iterator find(const K& key) const
659 {
660 const_iterator itr = lower_bound(key);
661
662 if (itr != end())
663 {
664 if (!key_compare()(itr->first, key) && !key_compare()(key, itr->first))
665 {
666 return itr;
667 }
668 else
669 {
670 return end();
671 }
672 }
673
674 return end();
675 }
676#endif
677
678 //*********************************************************************
682 //*********************************************************************
683 size_t count(key_parameter_t key) const
684 {
685 ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
686
687 return etl::distance(range.first, range.second);
688 }
689
690#if ETL_USING_CPP11
691 //*********************************************************************
692 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
693 size_t count(const K& key) const
694 {
695 ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
696
697 return etl::distance(range.first, range.second);
698 }
699#endif
700
701 //*********************************************************************
705 //*********************************************************************
706 iterator lower_bound(key_parameter_t key)
707 {
708 return etl::lower_bound(begin(), end(), key, compare);
709 }
710
711#if ETL_USING_CPP11
712 //*********************************************************************
713 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
714 iterator lower_bound(const K& key)
715 {
716 return etl::lower_bound(begin(), end(), key, compare);
717 }
718#endif
719
720 //*********************************************************************
724 //*********************************************************************
725 const_iterator lower_bound(key_parameter_t key) const
726 {
727 return etl::lower_bound(cbegin(), cend(), key, compare);
728 }
729
730#if ETL_USING_CPP11
731 //*********************************************************************
732 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
733 const_iterator lower_bound(const K& key) const
734 {
735 return etl::lower_bound(cbegin(), cend(), key, compare);
736 }
737#endif
738
739 //*********************************************************************
743 //*********************************************************************
744 iterator upper_bound(key_parameter_t key)
745 {
746 return etl::upper_bound(begin(), end(), key, compare);
747 }
748
749#if ETL_USING_CPP11
750 //*********************************************************************
751 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
752 iterator upper_bound(const K& key)
753 {
754 return etl::upper_bound(begin(), end(), key, compare);
755 }
756#endif
757
758 //*********************************************************************
762 //*********************************************************************
763 const_iterator upper_bound(key_parameter_t key) const
764 {
765 return etl::upper_bound(begin(), end(), key, compare);
766 }
767
768#if ETL_USING_CPP11
769 //*********************************************************************
770 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
771 const_iterator upper_bound(const K& key) const
772 {
773 return etl::upper_bound(begin(), end(), key, compare);
774 }
775#endif
776
777 //*********************************************************************
781 //*********************************************************************
782 ETL_OR_STD::pair<iterator, iterator> equal_range(key_parameter_t key)
783 {
784 iterator i_lower = etl::lower_bound(begin(), end(), key, compare);
785
786 return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, end(), key, compare));
787 }
788
789#if ETL_USING_CPP11
790 //*********************************************************************
791 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
792 ETL_OR_STD::pair<iterator, iterator> equal_range(const K& key)
793 {
794 iterator i_lower = etl::lower_bound(begin(), end(), key, compare);
795
796 return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, end(), key, compare));
797 }
798#endif
799
800 //*********************************************************************
804 //*********************************************************************
805 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
806 {
807 const_iterator i_lower = etl::lower_bound(cbegin(), cend(), key, compare);
808
809 return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, cend(), key, compare));
810 }
811
812#if ETL_USING_CPP11
813 //*********************************************************************
814 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
815 ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(const K& key) const
816 {
817 const_iterator i_lower = etl::lower_bound(cbegin(), cend(), key, compare);
818
819 return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, cend(), key, compare));
820 }
821#endif
822
823 //*************************************************************************
825 //*************************************************************************
826 bool contains(const TKey& key) const
827 {
828 return find(key) != end();
829 }
830
831#if ETL_USING_CPP11
832 //*************************************************************************
833 template <typename K, typename KC = TKeyCompare, etl::enable_if_t<comparator_is_transparent<KC>::value, int> = 0>
834 bool contains(const K& k) const
835 {
836 return find(k) != end();
837 }
838#endif
839
840 //*************************************************************************
843 //*************************************************************************
844 size_type size() const
845 {
846 return lookup.size();
847 }
848
849 //*************************************************************************
852 //*************************************************************************
853 bool empty() const
854 {
855 return lookup.empty();
856 }
857
858 //*************************************************************************
861 //*************************************************************************
862 bool full() const
863 {
864 return lookup.full();
865 }
866
867 //*************************************************************************
870 //*************************************************************************
871 size_type capacity() const
872 {
873 return lookup.capacity();
874 }
875
876 //*************************************************************************
879 //*************************************************************************
880 size_type max_size() const
881 {
882 return lookup.max_size();
883 }
884
885 //*************************************************************************
888 //*************************************************************************
889 size_t available() const
890 {
891 return lookup.available();
892 }
893
894 protected:
895
896 //*********************************************************************
898 //*********************************************************************
900 : lookup(lookup_)
901 {
902 }
903
904 //*********************************************************************
908 //*********************************************************************
909 ETL_OR_STD::pair<iterator, bool> insert_at(iterator i_element, value_type& value)
910 {
911 ETL_OR_STD::pair<iterator, bool> result(end(), false);
912
913 if (i_element == end())
914 {
915 // At the end.
916 lookup.push_back(&value);
917 result.first = --end();
918 result.second = true;
919 }
920 else
921 {
922 // Not at the end.
923 lookup.insert(i_element.ilookup, &value);
924 result.first = i_element;
925 result.second = true;
926 }
927
928 return result;
929 }
930
931 private:
932
933 // Disable copy construction and assignment.
936
937 lookup_t& lookup;
938
939 Compare compare;
940
941 //*************************************************************************
943 //*************************************************************************
944#if defined(ETL_POLYMORPHIC_REFERENCE_FLAT_MULTIMAP) || defined(ETL_POLYMORPHIC_CONTAINERS)
945 public:
947 {
948 }
949#else
950 protected:
952 {
953 }
954#endif
955 };
956
957 //***************************************************************************
963 //***************************************************************************
964 template <typename TKey, typename TMapped, typename TKeyCompare>
966 {
967 return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
968 }
969
970 //***************************************************************************
976 //***************************************************************************
977 template <typename TKey, typename TMapped, typename TKeyCompare>
979 {
980 return !(lhs == rhs);
981 }
982
983 //***************************************************************************
990 //***************************************************************************
991 template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey> >
992 class reference_flat_multimap : public ireference_flat_multimap<TKey, TValue, TCompare>
993 {
994 public:
995
996 static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_;
997
998 //*************************************************************************
1000 //*************************************************************************
1002 : ireference_flat_multimap<TKey, TValue, TCompare>(lookup)
1003 {
1004 }
1005
1006 //*************************************************************************
1008 //*************************************************************************
1010 : ireference_flat_multimap<TKey, TValue, TCompare>(lookup)
1011 {
1013 }
1014
1015 //*************************************************************************
1020 //*************************************************************************
1021 template <typename TIterator>
1022 reference_flat_multimap(TIterator first, TIterator last)
1023 : ireference_flat_multimap<TKey, TValue, TCompare>(lookup)
1024 {
1026 }
1027
1028 //*************************************************************************
1030 //*************************************************************************
1032 {
1034 }
1035
1036 private:
1037
1038 typedef typename ireference_flat_multimap<TKey, TValue, TCompare>::value_type node_t;
1039
1040 // The vector that stores pointers to the nodes.
1042 };
1043
1044 template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare>
1045 ETL_CONSTANT size_t reference_flat_multimap< TKey, TValue, MAX_SIZE_, TCompare>::MAX_SIZE;
1046
1047 //*************************************************************************
1049 //*************************************************************************
1050#if ETL_USING_CPP17 && ETL_HAS_INITIALIZER_LIST
1051 template <typename... TPairs>
1052 reference_flat_multimap(TPairs...) -> reference_flat_multimap<typename etl::nth_type_t<0, TPairs...>::first_type,
1053 typename etl::nth_type_t<0, TPairs...>::second_type,
1054 sizeof...(TPairs)>;
1055#endif
1056
1057 //*************************************************************************
1059 //*************************************************************************
1060#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
1061 template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey>, typename... TPairs>
1062 constexpr auto make_reference_flat_multimap(TPairs&&... pairs) -> etl::reference_flat_multimap<TKey, TMapped, sizeof...(TPairs), TKeyCompare>
1063 {
1064 return { {etl::forward<TPairs>(pairs)...} };
1065 }
1066#endif
1067}
1068
1069#endif
Definition: reference_flat_multimap.h:55
Definition: reference_flat_multimap.h:69
Definition: reference_flat_multimap.h:191
Definition: reference_flat_multimap.h:107
Definition: reference_flat_multimap.h:85
const_reverse_iterator crbegin() const
Definition: reference_flat_multimap.h:423
iterator erase(const_iterator i_element)
Definition: reference_flat_multimap.h:559
size_t count(key_parameter_t key) const
Definition: reference_flat_multimap.h:683
ETL_OR_STD::pair< iterator, iterator > equal_range(key_parameter_t key)
Definition: reference_flat_multimap.h:782
iterator lower_bound(key_parameter_t key)
Definition: reference_flat_multimap.h:706
const_iterator find(key_parameter_t key) const
Definition: reference_flat_multimap.h:636
reverse_iterator rbegin()
Definition: reference_flat_multimap.h:387
const_reverse_iterator crend() const
Definition: reference_flat_multimap.h:432
iterator upper_bound(key_parameter_t key)
Definition: reference_flat_multimap.h:744
bool empty() const
Definition: reference_flat_multimap.h:853
const_reverse_iterator rbegin() const
Definition: reference_flat_multimap.h:396
const_iterator cbegin() const
Definition: reference_flat_multimap.h:369
size_type size() const
Definition: reference_flat_multimap.h:844
ETL_OR_STD::pair< iterator, bool > insert_at(iterator i_element, value_type &value)
Definition: reference_flat_multimap.h:909
size_t available() const
Definition: reference_flat_multimap.h:889
iterator erase(const_iterator first, const_iterator last)
Definition: reference_flat_multimap.h:571
iterator insert(const_iterator, const value_type &value)
Definition: reference_flat_multimap.h:483
bool full() const
Definition: reference_flat_multimap.h:862
size_t erase(key_parameter_t key)
Definition: reference_flat_multimap.h:510
bool contains(const TKey &key) const
Check if the map contains the key.
Definition: reference_flat_multimap.h:826
~ireference_flat_multimap()
Destructor.
Definition: reference_flat_multimap.h:951
const_iterator end() const
Definition: reference_flat_multimap.h:360
const_iterator upper_bound(key_parameter_t key) const
Definition: reference_flat_multimap.h:763
const_reverse_iterator rend() const
Definition: reference_flat_multimap.h:414
iterator begin()
Definition: reference_flat_multimap.h:333
ETL_OR_STD::pair< iterator, bool > insert(value_type &value)
Definition: reference_flat_multimap.h:466
iterator end()
Definition: reference_flat_multimap.h:351
iterator find(key_parameter_t key)
Definition: reference_flat_multimap.h:589
const_iterator cend() const
Definition: reference_flat_multimap.h:378
size_type max_size() const
Definition: reference_flat_multimap.h:880
void clear()
Clears the reference_flat_multimap.
Definition: reference_flat_multimap.h:579
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(key_parameter_t key) const
Definition: reference_flat_multimap.h:805
void insert(TIterator first, TIterator last)
Definition: reference_flat_multimap.h:496
ireference_flat_multimap(lookup_t &lookup_)
Constructor.
Definition: reference_flat_multimap.h:899
void assign(TIterator first, TIterator last)
Definition: reference_flat_multimap.h:445
size_type capacity() const
Definition: reference_flat_multimap.h:871
iterator erase(iterator i_element)
Definition: reference_flat_multimap.h:550
reverse_iterator rend()
Definition: reference_flat_multimap.h:405
const_iterator lower_bound(key_parameter_t key) const
Definition: reference_flat_multimap.h:725
const_iterator begin() const
Definition: reference_flat_multimap.h:342
Definition: reference_flat_multimap.h:993
~reference_flat_multimap()
Destructor.
Definition: reference_flat_multimap.h:1031
reference_flat_multimap()
Constructor.
Definition: reference_flat_multimap.h:1001
reference_flat_multimap(const reference_flat_multimap &other)
Copy constructor.
Definition: reference_flat_multimap.h:1009
reference_flat_multimap(TIterator first, TIterator last)
Definition: reference_flat_multimap.h:1022
#define ETL_ASSERT(b, e)
Definition: error_handler.h:316
ETL_CONSTEXPR exception(string_type reason_, string_type, numeric_type line_)
Constructor.
Definition: exception.h:69
Definition: exception.h:47
ETL_CONSTEXPR17 T * addressof(T &t)
Definition: addressof.h:51
iterator begin()
Definition: vector.h:100
size_type max_size() const
Definition: vector_base.h:140
void push_back(const_reference value)
Definition: vector.h:432
const_reverse_iterator crbegin() const
Definition: vector.h:190
reverse_iterator rend()
Definition: vector.h:172
size_type capacity() const
Definition: vector_base.h:131
const_iterator cend() const
Definition: vector.h:145
void clear()
Clears the vector.
Definition: vector.h:414
iterator end()
Definition: vector.h:118
const_reverse_iterator crend() const
Definition: vector.h:199
const_iterator cbegin() const
Definition: vector.h:136
bool full() const
Definition: vector.h:977
size_type size() const
Definition: vector.h:959
iterator erase(iterator i_element)
Definition: vector.h:865
bool empty() const
Definition: vector.h:968
size_t available() const
Definition: vector.h:986
reverse_iterator rbegin()
Definition: vector.h:154
iterator insert(const_iterator position, const_reference value)
Definition: vector.h:560
bitset_ext
Definition: absolute.h:38
pair< T1, T2 > make_pair(T1 a, T2 b)
A convenience wrapper for creating a pair from two objects.
Definition: utility.h:322
etl::byte operator&(etl::byte lhs, etl::byte rhs)
And.
Definition: byte.h:273
bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:645
bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:633
bool operator==(const etl::ireference_flat_multimap< TKey, TMapped, TKeyCompare > &lhs, const etl::ireference_flat_multimap< TKey, TMapped, TKeyCompare > &rhs)
Definition: reference_flat_multimap.h:965
bool operator!=(const etl::ireference_flat_multimap< TKey, TMapped, TKeyCompare > &lhs, const etl::ireference_flat_multimap< TKey, TMapped, TKeyCompare > &rhs)
Definition: reference_flat_multimap.h:978
Definition: compare.h:52
iterator
Definition: iterator.h:399