MCPcopy Create free account
hub / github.com/cinit/TMoe / Entry

Class Entry

app/src/main/cpp/utils/HashMap.h:16–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14class HashMap {
15public:
16 class Entry {
17 public:
18 Entry(const K &k, const V &v) : key(k), value(v) {}
19
20 Entry(const Entry &) = delete;
21
22 Entry &operator=(const Entry &) = delete;
23
24 [[nodiscard]] K getKey() const {
25 return key;
26 }
27
28 [[nodiscard]] V *getValue() const {
29 return &value;
30 }
31
32 template<typename... Args>
33 void setValue(Args &&...args) const {
34 value = V(std::forward<Args>(args)...);
35 }
36
37 void setValue(V &v) const {
38 value = v;
39 }
40
41 private:
42 const K key;
43 mutable V value;
44 };
45
46private:
47 std::unordered_map<K, std::shared_ptr<Entry>, Hash, Pred> backend;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected