1#ifndef CPP_UTILITIES_CONTAINERS_SEQUENCIALMAP_HPP
2#define CPP_UTILITIES_CONTAINERS_SEQUENCIALMAP_HPP
12#include <initializer_list>
68 typename Compare = std::less<Key>,
69 typename Allocator = std::allocator<std::pair<const Key, T>>>
80 using map_type = std::map<Key, T, Compare, Allocator>;
171 explicit SequencialMap(
const Compare& comp,
const Allocator& alloc = Allocator())
186 template<
typename InputIt>
187 SequencialMap(InputIt first, InputIt last,
const Compare& comp = Compare(),
const Allocator& alloc = Allocator())
202 template<
typename InputIt>
204 : m(Compare(), alloc)
222 : m(Compare(), alloc)
248 const Compare& comp = Compare(),
249 const Allocator& alloc = Allocator())
268 {
return m.get_allocator(); }
279 {
return m.empty(); }
306 {
return m.max_size(); }
319 { v.clear(); m.clear(); }
378 template<
typename Container = std::vector<key_type>>
383 { ret.push_back(*it); }
404 return v.second ==
value;
406 if (it ==
cend())
return defaultKey;
407 else return it->first;
423 template<
typename Container = std::vector<T>>
428 { ret.push_back(it->second); }
449 if (it ==
cend())
return defaultValue;
450 else return it->second;
466 {
return *v.at(pos); }
481 {
return *v.at(pos); }
497 auto pair = m.insert(std::make_pair(
key, T()));
498 if (pair.second) v.push_back(pair.first);
499 return pair.first->second;
516 auto pair = m.insert(std::make_pair(
key, T()));
517 if (pair.second) v.push_back(pair.first);
518 return pair.first->second;
535 if (it !=
cend())
return it->second;
553 if (it !=
cend())
return it->second;
588 {
return *(
end() - 1); }
599 {
return *(
cend() - 1); }
612 {
return mid(pos,
size() - pos); }
629 if (pos >=
size())
return ret;
630 length = std::min(length,
size() - pos);
650 if (it !=
end())
return std::make_pair(it,
false);
651 auto pair = m.insert(
value);
652 v.push_back(pair.first);
653 return std::make_pair(
end() - 1,
true);
671 auto it =
find(temp.first);
672 if (it !=
end())
return std::make_pair(it,
false);
673 auto pair = m.insert(std::move(temp));
674 v.push_back(pair.first);
675 return std::make_pair(
end() - 1,
true);
732 {
push_back(ilist.begin(), ilist.end()); }
744 template<
typename InputIt>
747 for (
auto it = first; it != last; ++it)
768 template<
typename... Args>
791 template<
typename... Args>
794 return emplace_at(
size(), std::forward<key_type>(
key), std::forward<Args>(args)...);
821 for (
auto&&
value : other) {
852 for (
auto&&
value : other) {
873 if (it !=
end())
return it;
874 auto pair = m.insert(
value);
875 v.insert(v.begin() + pos, pair.first);
876 return begin() + pos;
896 auto it =
find(temp.first);
897 if (it !=
end())
return it;
898 auto pair = m.insert(std::move(temp));
899 v.insert(v.begin() + pos, pair.first);
900 return begin() + pos;
937 {
return insert(pos, std::make_pair(
key, std::forward<T>(
value))); }
1007 {
return insert(pos, std::make_pair(
key, std::forward<T>(
value))); }
1023 template<
typename InputIt>
1024 void insert(
size_t pos, InputIt first, InputIt last)
1039 void insert(
size_t pos, std::initializer_list<value_type> ilist)
1056 template<
typename InputIt>
1060 for (
auto it = first; it != last; ++it)
1062 auto temp =
find(it->first);
1063 if (temp !=
cend()) {
continue; }
1064 else {
insert(index, it->first, it->second); ++index; }
1081 {
insert(pos, ilist.begin(), ilist.end()); }
1108 template<
typename... Args>
1113 if (it !=
end())
return std::make_pair(it,
false);
1114 auto pair = m.emplace(std::move(k), std::forward<Args>(args)...);
1115 v.insert(v.begin() + pos, pair.first);
1116 return std::make_pair(
begin() + pos,
true);
1144 template<
typename... Args>
1149 if (it !=
end())
return std::make_pair(it,
false);
1150 auto pair = m.emplace(std::move(k), std::forward<Args>(args)...);
1151 v.insert(v.begin() + pos, pair.first);
1152 return std::make_pair(
begin() + pos,
true);
1180 template<
typename... Args>
1184 std::forward<key_type>(
key),
1185 std::forward<Args>(args)...)
1225 if (it ==
cend())
return;
1273 v.erase(v.begin() + (pos.
n - v.data()));
1274 return begin() + index;
1300 { ret =
erase(it.base() - 1); }
1534 if (
this == &other)
return *
this;
1549 { other.
swap(*
this);
return *
this; }
1577 {
return m == other.m; }
1593 {
return *
this != other; }
1608 {
return m < other.m; }
1623 {
return m <= other.n; }
1638 {
return m > other.m; }
1654 {
return m >= other.m; }
1685 return m.key_comp();
1699 return m.value_comp();
1715 template<
typename Stream>
1718 size_t count = std::min(
size_t(10u), map.
size());
1719 out <<
"SequencialMap(";
1720 for (
auto it = map.
cbegin(); it != map.
cbegin() + count; ++it)
1722 out <<
'(' << it->first <<
',' << it->second <<
')';
1723 if (it != map.
cbegin() + count - 1) out <<
',';
1725 if (count < map.
size()) out <<
",...";
1730 struct SerializeManipulator;
1774 template<
typename Stream>
1777 out << manip.map.
size();
1791 template<
typename Stream>
1797 for (
size_t i = 0; i <
size; ++i)
1815 template<
bool constant>
1820 using node_type =
typename SequencialMap::vector_type::value_type;
1822 using pointer =
typename std::conditional<constant, const value_type*, value_type*>::type;
1823 using reference =
typename std::conditional<constant, const value_type&, value_type&>::type;
1827 template<
bool OtherConstant>
1834 {
return n->operator*(); }
1837 {
return n->operator->(); }
1839 template<
bool OtherConstant>
1841 {
n = other.
n;
return *
this; }
1843 template<
bool otherConstant>
1845 {
return (
n == other.
n); }
1847 template<
bool otherConstant>
1849 {
return n != other.
n; }
1851 template<
bool otherConstant>
1853 {
return n < other.
n; }
1855 template<
bool otherConstant>
1857 {
return n <= other.
n; }
1859 template<
bool otherConstant>
1861 {
return n > other.
n; }
1863 template<
bool otherConstant>
1865 {
return n >= other.
n; }
1868 { ++
n;
return *
this; }
1874 { --
n;
return *
this; }
1880 {
n += j;
return *
this; }
1883 {
n -= j;
return *
this; }
1915 using node_type =
typename SequencialMap::vector_type::value_type;
1928 {
return n->operator*().first; }
1931 {
return &(n->operator->()->first); }
1934 { n = other.n;
return *
this; }
1937 {
return (n == other.n); }
1940 {
return n != other.n; }
1943 {
return n < other.n; }
1946 {
return n <= other.n; }
1949 {
return n > other.n; }
1952 {
return n >= other.n; }
1955 { ++n;
return *
this; }
1961 { --n;
return *
this; }
1967 { n += j;
return *
this; }
1970 { n -= j;
return *
this; }
2022template<
typename Key,
2024 typename Compare = std::less<Key>,
2025 typename Allocator = std::allocator<std::pair<const Key, T>>>
2046template<
class Key,
class T,
class Compare,
class Alloc,
class Pred>
2049 for (
auto i = c.
begin(), last = c.
end(); i != last; )
#define UTILITIES_NAMESPACE_END
Define for end namespace declaration, nothing will be generated if UTILITIES_NAMESPACE isn't defined.
Definition: Common.h:92
#define UTILITIES_NAMESPACE_BEGIN
Define for begin namespace declaration, nothing will be generated if UTILITIES_NAMESPACE isn't define...
Definition: Common.h:91
Key-value container behaves like std::map, but extended with random-access operations and traverses i...
Definition: SequencialMap.hpp:71
std::reverse_iterator< iterator > reverse_iterator
Mutable reverse iterator type.
Definition: SequencialMap.hpp:146
void erase(size_type pos, size_type count=1)
Removes specified elements from the container.
Definition: SequencialMap.hpp:1246
const_reverse_iterator rend() const
Returns a reverse iterator to the element following the last element of the reversed container....
Definition: SequencialMap.hpp:1452
SequencialMap & operator=(const SequencialMap &other)
Replaces the contents of the input container.
Definition: SequencialMap.hpp:1532
bool empty() const noexcept
Checks if the container has no elements, i.e. whether begin() == end().
Definition: SequencialMap.hpp:278
reference back()
Returns a reference to the last element in the container.
Definition: SequencialMap.hpp:587
void swap(SequencialMap &other)
Exchanges the contents of the container with those of other. Does not invoke any move,...
Definition: SequencialMap.hpp:1669
const_iterator end() const
Returns an iterator to the element following the last element of the container. This element acts as...
Definition: SequencialMap.hpp:1368
const_reference front() const
Returns a const reference to the first element in the container.
Definition: SequencialMap.hpp:576
SequencialMap(std::initializer_list< value_type > init, const Compare &comp=Compare(), const Allocator &alloc=Allocator())
Constructs the container with the contents of the initializer list init. If multiple elements in the ...
Definition: SequencialMap.hpp:247
SequencialMap()
Default constructor, constructs an empty container.
Definition: SequencialMap.hpp:161
SequencialMap mid(size_type pos, size_type length) const
Returns a sub-map which contains elements from this map, starting at position pos,...
Definition: SequencialMap.hpp:626
std::vector< typename map_type::iterator > vector_type
Underlying map type for random-access operations and sequencial traversal.
Definition: SequencialMap.hpp:85
std::reverse_iterator< key_iterator > reverse_key_iterator
Reverse iterator to traverse keys.
Definition: SequencialMap.hpp:156
bool operator>(const SequencialMap &other) const
Compares the contents of two containers lexicographically.
Definition: SequencialMap.hpp:1637
SequencialMap operator+(const SequencialMap &other) const
Same as push_back, appends all elements from given container other to the end of the container,...
Definition: SequencialMap.hpp:806
SequencialMap(InputIt first, InputIt last, const Allocator &alloc)
Constructs the container with the contents of the range [first, last). If multiple elements in the ra...
Definition: SequencialMap.hpp:203
iterator find(const key_type &key)
Finds an element with key equivalent to key.
Definition: SequencialMap.hpp:342
SequencialMap(const Compare &comp, const Allocator &alloc=Allocator())
Constructs an empty container with given comparator and allocator.
Definition: SequencialMap.hpp:171
bool operator>=(const SequencialMap &other) const
Compares the contents of two containers lexicographically.
Definition: SequencialMap.hpp:1653
iterator insert(size_t pos, const key_type &key, T &&value)
Inserts element into the container, if the container doesn't already contain an element with an equiv...
Definition: SequencialMap.hpp:936
const_iterator cbegin() const
Returns an iterator to the first element of the container. If the container is empty,...
Definition: SequencialMap.hpp:1340
void erase_if(Container::SequencialMap< Key, T, Compare, Alloc > &c, Pred pred)
Erases all elements that satisfy the predicate pred from the container.
Definition: SequencialMap.hpp:2047
const_reverse_iterator crend() const
Returns a reverse iterator to the element following the last element of the reversed container....
Definition: SequencialMap.hpp:1466
typename map_type::difference_type difference_type
Provide same member type of std::map.
Definition: SequencialMap.hpp:131
void insert(iterator pos, std::initializer_list< value_type > ilist)
Inserts elements into the container, if the container doesn't already contain an element with an equi...
Definition: SequencialMap.hpp:1080
allocator_type get_allocator() const
Returns the allocator associated with the container.
Definition: SequencialMap.hpp:267
iterator insert(iterator pos, const_reference value)
Inserts element into the container, if the container doesn't already contain an element with an equiv...
Definition: SequencialMap.hpp:953
typename map_type::const_pointer const_pointer
Provide same member type of std::map.
Definition: SequencialMap.hpp:115
void pop_back()
Removes the last element of the container.
Definition: SequencialMap.hpp:1199
iterator erase(const_iterator pos)
Removes specified elements from the container.
Definition: SequencialMap.hpp:1269
SerializeManipulator serialize() const
Serialize the contents to output stream.
Definition: SequencialMap.hpp:1743
iterator insert(size_t pos, const_reference value)
Inserts element into the container, if the container doesn't already contain an element with an equiv...
Definition: SequencialMap.hpp:870
reverse_iterator rbegin()
Returns a reverse iterator to the first element of the reversed container. It corresponds to the last...
Definition: SequencialMap.hpp:1396
iterator erase(const_iterator first, const_iterator last)
Removes specified elements from the container.
Definition: SequencialMap.hpp:1296
reverse_iterator rend()
Returns a reverse iterator to the element following the last element of the reversed container....
Definition: SequencialMap.hpp:1438
std::pair< iterator, bool > push_back(value_type &&value)
Appends the given element value to the end of the container, if the container doesn't already contain...
Definition: SequencialMap.hpp:668
iterator emplace_hint(const_iterator hint, key_type &&key, Args &&... args)
Inserts a new element to the container as close as possible to the position just before hint....
Definition: SequencialMap.hpp:1181
typename map_type::value_compare value_compare
Provide same member type of std::map.
Definition: SequencialMap.hpp:102
size_type max_size() const noexcept
Returns the maximum number of elements the container is able to hold due to system or library impleme...
Definition: SequencialMap.hpp:305
SequencialMap & operator=(SequencialMap &&other)
Replaces the contents of the input container.
Definition: SequencialMap.hpp:1548
size_type size() const noexcept
Returns the number of elements in the container, i.e. std::distance(begin(), end()).
Definition: SequencialMap.hpp:289
const T operator[](key_type &&key) const
Returns a copy to the value that is mapped to a key equivalent to key, return a default constructed v...
Definition: SequencialMap.hpp:550
SequencialMap & operator=(std::initializer_list< value_type > ilist)
Replaces the contents of the input container.
Definition: SequencialMap.hpp:1560
const_reference at(size_type pos) const
Returns a const reference to the element at specified location pos, with bounds checking.
Definition: SequencialMap.hpp:480
reference front()
Returns a reference to the first element in the container.
Definition: SequencialMap.hpp:565
T & operator[](const key_type &key)
Returns a reference to the value that is mapped to a key equivalent to key, performing an insertion i...
Definition: SequencialMap.hpp:495
value_compare value_comp() const
Returns a function object that compares objects of type std::map::value_type (key-value pairs) by usi...
Definition: SequencialMap.hpp:1697
T & operator[](key_type &&key)
Returns a reference to the value that is mapped to a key equivalent to key, performing an insertion i...
Definition: SequencialMap.hpp:514
std::pair< iterator, bool > emplace_at(size_t pos, const key_type &key, Args &&... args)
Inserts a new element to the container as close as possible to the position just before hint....
Definition: SequencialMap.hpp:1109
Allocator allocator_type
Provide same member type of std::map.
Definition: SequencialMap.hpp:76
iterator insert(iterator pos, const key_type &key, const T &value)
Inserts element into the container, if the container doesn't already contain an element with an equiv...
Definition: SequencialMap.hpp:988
iterator insert(iterator pos, const key_type &key, T &&value)
Inserts element into the container, if the container doesn't already contain an element with an equiv...
Definition: SequencialMap.hpp:1006
SequencialMap(InputIt first, InputIt last, const Compare &comp=Compare(), const Allocator &alloc=Allocator())
Constructs the container with the contents of the range [first, last). If multiple elements in the ra...
Definition: SequencialMap.hpp:187
bool operator<=(const SequencialMap &other) const
Compares the contents of two containers lexicographically.
Definition: SequencialMap.hpp:1622
reverse_key_iterator key_rbegin() const
Returns a reverse iterator to the first key of the reversed container. It corresponds to the last key...
Definition: SequencialMap.hpp:1507
reverse_key_iterator key_rend() const
Returns a reverse iterator to the key following the last key of the reversed container....
Definition: SequencialMap.hpp:1521
const_reference back() const
Returns a const reference to the last element in the container.
Definition: SequencialMap.hpp:598
const_reverse_iterator rbegin() const
Returns a reverse iterator to the first element of the reversed container. It corresponds to the last...
Definition: SequencialMap.hpp:1410
bool contains(const key_type &key) const
Checks if there is an element with key equivalent to key in the container.
Definition: SequencialMap.hpp:330
const T operator[](const key_type &key) const
Returns a copy to the value that is mapped to a key equivalent to key, return a default constructed v...
Definition: SequencialMap.hpp:532
friend Stream & operator<<(Stream &out, const SequencialMap &map)
Writes the contents of list to output stream.
Definition: SequencialMap.hpp:1716
const_reverse_iterator crbegin() const
Returns a reverse iterator to the first element of the reversed container. It corresponds to the last...
Definition: SequencialMap.hpp:1424
Container values() const
Returns a list containing all the values in the map in the sequence order of value appends.
Definition: SequencialMap.hpp:424
typename map_type::pointer pointer
Provide same member type of std::map.
Definition: SequencialMap.hpp:111
void insert(iterator pos, InputIt first, InputIt last)
Inserts elements into the container, if the container doesn't already contain an element with an equi...
Definition: SequencialMap.hpp:1057
std::pair< iterator, bool > emplace_back(key_type &&key, Args &&... args)
Appends a new element to the end of the container.
Definition: SequencialMap.hpp:792
void insert(size_t pos, InputIt first, InputIt last)
Inserts elements into the container, if the container doesn't already contain an element with an equi...
Definition: SequencialMap.hpp:1024
iterator_base< true > const_iterator
Immutable iterator type for constant LegacyRandomAccessIterator.
Definition: SequencialMap.hpp:142
void swap(Container::SequencialMap< Key, T, Compare, Allocator > &lhs, Container::SequencialMap< Key, T, Compare, Allocator > &rhs) noexcept
Specializes the std::swap algorithm.
Definition: SequencialMap.hpp:2026
void push_back(InputIt first, InputIt last)
Appends all elements from from range [first, last) to the end of the container, ignores all values wi...
Definition: SequencialMap.hpp:745
std::pair< iterator, bool > push_back(const_reference value)
Appends the given element value to the end of the container, if the container doesn't already contain...
Definition: SequencialMap.hpp:647
SequencialMap & operator+=(const SequencialMap &other)
Same as push_back, appends all elements from given container other to the end of the container and re...
Definition: SequencialMap.hpp:837
std::pair< iterator, bool > push_back(const key_type &key, T &&value)
Appends the given element value to the end of the container, if the container doesn't already contain...
Definition: SequencialMap.hpp:707
typename map_type::value_type value_type
Provide same member type of std::map.
Definition: SequencialMap.hpp:107
std::map< Key, T, Compare, Allocator > map_type
Underlying map type for map APIs.
Definition: SequencialMap.hpp:80
std::pair< iterator, bool > push_back(const key_type &key, const T &value)
Appends the given element value to the end of the container, if the container doesn't already contain...
Definition: SequencialMap.hpp:691
const T & value(const key_type &key, const T &defaultValue=T()) const
Returns the value associated with the key key.
Definition: SequencialMap.hpp:446
std::reverse_iterator< const_iterator > const_reverse_iterator
Immutable reverse iterator type.
Definition: SequencialMap.hpp:150
reference at(size_type pos)
Returns a reference to the element at specified location pos, with bounds checking.
Definition: SequencialMap.hpp:465
SequencialMap & operator+=(SequencialMap &&other)
Same as push_back, appends all elements from given container other to the end of the container and re...
Definition: SequencialMap.hpp:850
SequencialMap mid(size_type pos) const
Returns a sub-map which contains elements from this map, starting at position pos to the end.
Definition: SequencialMap.hpp:611
SequencialMap(const SequencialMap &other, const Allocator &alloc=Allocator())
Copy constructor. Constructs the container with the copy of the contents of other....
Definition: SequencialMap.hpp:221
Container keys() const
Returns a list containing all the keys in the map in the sequence order of value appends.
Definition: SequencialMap.hpp:379
~SequencialMap()=default
Destructs the container. The destructors of the elements are called and the used storage is deallocat...
key_iterator key_end() const
Returns an iterator to the key following the last key of the container. This key acts as a placehold...
Definition: SequencialMap.hpp:1493
typename map_type::key_compare key_compare
Provide same member type of std::map.
Definition: SequencialMap.hpp:98
iterator_base< false > iterator
Mutable iterator type for LegacyRandomAccessIterator.
Definition: SequencialMap.hpp:138
const_iterator begin() const
Returns an iterator to the first element of the container. If the container is empty,...
Definition: SequencialMap.hpp:1327
const_iterator find(const key_type &key) const
Finds an element with key equivalent to key.
Definition: SequencialMap.hpp:358
typename map_type::size_type size_type
Provide same member type of std::map.
Definition: SequencialMap.hpp:127
iterator insert(size_t pos, value_type &&value)
Inserts element into the container, if the container doesn't already contain an element with an equiv...
Definition: SequencialMap.hpp:893
typename map_type::key_type key_type
Provide same member type of std::map.
Definition: SequencialMap.hpp:90
SequencialMap operator+(SequencialMap &&other) const
Same as push_back, appends all elements from given container other to the end of the container,...
Definition: SequencialMap.hpp:818
const key_type key(const T &value, const key_type &defaultKey=key_type()) const
Returns the key with value value, or defaultKey if the map contains no item with value value.
Definition: SequencialMap.hpp:401
void erase(const key_type &key)
Removes specified element from the container.
Definition: SequencialMap.hpp:1222
bool operator<(const SequencialMap &other) const
Compares the contents of two containers lexicographically.
Definition: SequencialMap.hpp:1607
void clear() noexcept
Definition: SequencialMap.hpp:318
std::pair< iterator, bool > emplace_at(size_t pos, key_type &&key, Args &&... args)
Inserts a new element to the container as close as possible to the position just before hint....
Definition: SequencialMap.hpp:1145
typename map_type::const_reference const_reference
Provide same member type of std::map.
Definition: SequencialMap.hpp:123
typename map_type::mapped_type mapped_type
Provide same member type of std::map.
Definition: SequencialMap.hpp:94
key_compare key_comp() const
Returns the function object that compares the keys, which is a copy of this container's constructor a...
Definition: SequencialMap.hpp:1683
void insert(size_t pos, std::initializer_list< value_type > ilist)
Inserts elements into the container, if the container doesn't already contain an element with an equi...
Definition: SequencialMap.hpp:1039
iterator insert(iterator pos, value_type &&value)
Inserts element into the container, if the container doesn't already contain an element with an equiv...
Definition: SequencialMap.hpp:970
void push_back(std::initializer_list< value_type > ilist)
Appends all elements from initializer list ilist to the end of the container, ignores all values with...
Definition: SequencialMap.hpp:731
key_iterator key_begin() const
Returns an iterator to the first key of the container. If the container is empty,...
Definition: SequencialMap.hpp:1479
bool operator==(const SequencialMap &other) const
Checks if the contents of two containers are not equal.
Definition: SequencialMap.hpp:1576
bool operator!=(const SequencialMap &other) const
Checks if the contents of two containers are equal, that is,.
Definition: SequencialMap.hpp:1592
SerializeManipulator deserialize()
Deserialize the contents from input stream.
Definition: SequencialMap.hpp:1757
iterator begin()
Returns an iterator to the first element of the container. If the container is empty,...
Definition: SequencialMap.hpp:1314
void push_back(const SequencialMap &other)
Appends all elements from given container other to the end of the container, ignores all values with ...
Definition: SequencialMap.hpp:719
iterator end()
Returns an iterator to the element following the last element of the container. This element acts as...
Definition: SequencialMap.hpp:1354
SequencialMap(SequencialMap &&other, const Allocator &alloc=Allocator())
Move constructor. Constructs the container with the contents of other using move semantics....
Definition: SequencialMap.hpp:234
std::pair< iterator, bool > emplace_back(const key_type &key, Args &&... args)
Appends a new element to the end of the container.
Definition: SequencialMap.hpp:769
const_iterator cend() const
Returns an iterator to the element following the last element of the container. This element acts as...
Definition: SequencialMap.hpp:1382
iterator insert(size_t pos, const key_type &key, const T &value)
Inserts element into the container, if the container doesn't already contain an element with an equiv...
Definition: SequencialMap.hpp:918
typename map_type::reference reference
Provide same member type of std::map.
Definition: SequencialMap.hpp:119
Namespace for all classes and functions of convenient containers. See Containers for more instrucion.
Contains std functions overload for classes in Utilities, cannot hide in doxygen, just ignore it.
Stream manipulator for serialization and deserialization.
Definition: SequencialMap.hpp:1765
friend Stream & operator<<(Stream &out, const SerializeManipulator &manip)
Output stream operator for serialization.
Definition: SequencialMap.hpp:1775
friend Stream & operator>>(Stream &in, SerializeManipulator manip)
Input stream operator for deserialization.
Definition: SequencialMap.hpp:1792
Base type for iterators.
Definition: SequencialMap.hpp:1817
typename SequencialMap::vector_type::value_type node_type
Definition: SequencialMap.hpp:1820
typename SequencialMap::value_type value_type
Definition: SequencialMap.hpp:1821
typename SequencialMap::difference_type difference_type
Definition: SequencialMap.hpp:1819
friend iterator_base operator+(difference_type j, iterator_base &it)
Definition: SequencialMap.hpp:1888
bool operator<(const iterator_base< otherConstant > &other) const
Definition: SequencialMap.hpp:1852
iterator_base & operator++()
Definition: SequencialMap.hpp:1867
iterator_base operator+(difference_type j) const
Definition: SequencialMap.hpp:1885
bool operator>(const iterator_base< otherConstant > &other) const
Definition: SequencialMap.hpp:1860
iterator_base(const node_type *node)
Definition: SequencialMap.hpp:1898
pointer operator->() const
Definition: SequencialMap.hpp:1836
bool operator!=(const iterator_base< otherConstant > &other) const
Definition: SequencialMap.hpp:1848
iterator_base(const iterator_base< OtherConstant > &other)
Definition: SequencialMap.hpp:1828
iterator_base & operator=(const iterator_base< OtherConstant > &other)
Definition: SequencialMap.hpp:1840
bool operator==(const iterator_base< otherConstant > &other) const
Definition: SequencialMap.hpp:1844
iterator_base operator--(int)
Definition: SequencialMap.hpp:1876
bool operator>=(const iterator_base< otherConstant > &other) const
Definition: SequencialMap.hpp:1864
iterator_base & operator+=(difference_type j)
Definition: SequencialMap.hpp:1879
std::random_access_iterator_tag iterator_category
Definition: SequencialMap.hpp:1818
reference operator*() const
Definition: SequencialMap.hpp:1833
iterator_base & operator--()
Definition: SequencialMap.hpp:1873
typename std::conditional< constant, const value_type &, value_type & >::type reference
Definition: SequencialMap.hpp:1823
iterator_base & operator-=(difference_type j)
Definition: SequencialMap.hpp:1882
node_type * n
Definition: SequencialMap.hpp:1903
iterator_base operator++(int)
Definition: SequencialMap.hpp:1870
typename std::conditional< constant, const value_type *, value_type * >::type pointer
Definition: SequencialMap.hpp:1822
difference_type operator-(iterator_base j) const
Definition: SequencialMap.hpp:1894
iterator_base operator-(difference_type j) const
Definition: SequencialMap.hpp:1891
bool operator<=(const iterator_base< otherConstant > &other) const
Definition: SequencialMap.hpp:1856
Iterator to traverse keys.
Definition: SequencialMap.hpp:1912
typename SequencialMap::difference_type difference_type
Definition: SequencialMap.hpp:1914
key_iterator & operator+=(difference_type j)
Definition: SequencialMap.hpp:1966
Key value_type
Definition: SequencialMap.hpp:1916
pointer operator->() const
Definition: SequencialMap.hpp:1930
std::random_access_iterator_tag iterator_category
Definition: SequencialMap.hpp:1913
bool operator<=(const key_iterator &other) const
Definition: SequencialMap.hpp:1945
difference_type operator-(key_iterator j) const
Definition: SequencialMap.hpp:1981
key_iterator & operator=(const key_iterator &other)
Definition: SequencialMap.hpp:1933
bool operator<(const key_iterator &other) const
Definition: SequencialMap.hpp:1942
key_iterator operator++(int)
Definition: SequencialMap.hpp:1957
bool operator>(const key_iterator &other) const
Definition: SequencialMap.hpp:1948
bool operator!=(const key_iterator &other) const
Definition: SequencialMap.hpp:1939
key_iterator operator--(int)
Definition: SequencialMap.hpp:1963
const value_type & reference
Definition: SequencialMap.hpp:1917
bool operator>=(const key_iterator &other) const
Definition: SequencialMap.hpp:1951
key_iterator operator+(difference_type j) const
Definition: SequencialMap.hpp:1972
key_iterator & operator-=(difference_type j)
Definition: SequencialMap.hpp:1969
typename SequencialMap::vector_type::value_type node_type
Definition: SequencialMap.hpp:1915
reference operator*() const
Definition: SequencialMap.hpp:1927
const value_type * pointer
Definition: SequencialMap.hpp:1918
key_iterator & operator++()
Definition: SequencialMap.hpp:1954
key_iterator & operator--()
Definition: SequencialMap.hpp:1960
bool operator==(const key_iterator &other) const
Definition: SequencialMap.hpp:1936
friend key_iterator operator+(difference_type j, key_iterator &it)
Definition: SequencialMap.hpp:1975
key_iterator(const key_iterator &other)
Definition: SequencialMap.hpp:1922
key_iterator operator-(difference_type j) const
Definition: SequencialMap.hpp:1978