Metall  v0.28
A persistent memory allocator for data-centric analytics
string_key_store_locator.hpp
Go to the documentation of this file.
1 // Copyright 2022 Lawrence Livermore National Security, LLC and other Metall
2 // Project Developers. See the top-level COPYRIGHT file for details.
3 //
4 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
5 
6 #ifndef METALL_CONTAINER_CONCURRENT__STRING_KEY_STORE_LOCATOR_HPP_
7 #define METALL_CONTAINER_CONCURRENT__STRING_KEY_STORE_LOCATOR_HPP_
8 
9 namespace metall::container {
10 
11 template <typename iterator_type>
13  private:
14  template <typename value_type, typename allocator_type>
15  friend class string_key_store;
16 
17  public:
18  string_key_store_locator(iterator_type iterator) : m_iterator(iterator) {}
19 
21  ++m_iterator;
22  return *this;
23  }
24 
26  auto tmp(*this);
27  ++m_iterator;
28  return tmp;
29  }
30 
31  bool operator==(const string_key_store_locator &other) const {
32  return m_iterator == other.m_iterator;
33  }
34 
35  bool operator!=(const string_key_store_locator &other) const {
36  return m_iterator != other.m_iterator;
37  }
38 
39  private:
40  iterator_type m_iterator;
41 };
42 
43 } // namespace metall::container
44 
45 #endif // METALL_CONTAINER_CONCURRENT__STRING_KEY_STORE_LOCATOR_HPP_
Definition: string_key_store_locator.hpp:12
bool operator==(const string_key_store_locator &other) const
Definition: string_key_store_locator.hpp:31
bool operator!=(const string_key_store_locator &other) const
Definition: string_key_store_locator.hpp:35
string_key_store_locator & operator++()
Definition: string_key_store_locator.hpp:20
string_key_store_locator(iterator_type iterator)
Definition: string_key_store_locator.hpp:18
string_key_store_locator operator++(int)
Definition: string_key_store_locator.hpp:25
A ke-value store that uses string for its key.
Definition: string_key_store.hpp:32
Namespace for Metall container.