로딩중...
검색중...
일치하는것 없음
tnmap.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
5#include <initializer_list>
6#include <utility>
7#include "core/builtin/container/native/smultimap.inl"
8
9namespace by {
10
11 template <typename K, typename V, typename TACTIC = strTactic> class tnmap: public tnbicontainer<K, V> {
13 BY(CLASS(tnmap, _super_))
14
15 public:
16 typedef tstr<V, TACTIC> wrap;
18 typedef typename cmap::iterator citer;
19 typedef std::pair<K, V> cpair;
20 typedef typename super::iter iter;
21 typedef typename super::iteration iteration;
23
24 public:
25 tnmap();
26 tnmap(const std::initializer_list<std::pair<K, V*>>& elems);
27
28 // len:
29 ncnt len() const override;
30
31 // has:
32 using super::in;
33 nbool in(const K& key) const override;
34
35 // get:
36 using super::get;
37 V* get(const K& key) override;
38
39 // add:
40 using super::add;
41 nbool add(const K& key, const V& new1) override;
42
43 // del:
44 using super::del;
45 nbool del(const K& key) override;
46 nbool del(const iter& at) override;
47 nbool del(const iter& from, const iter& end) override;
48
49 // etc:
50 void rel() override;
51
57 void onCloneDeep(const clonable& from) override;
58
59 protected:
60 iteration* _onMakeIteration(const K* key, nbool isReversed, ncnt step, nbool isBoundary) const override;
61
62 void _getAll(const K& key, narr& tray) const override;
63
64 private:
65 nmapIteration* _getIterationFrom(const iter& it);
66
67 private:
68 cmap _map;
69 };
70} // namespace by
Definition tnarr.hpp:9
Definition tnbicontainer.hpp:8
Definition tnmap.hpp:11
nbool del(const K &key) override
void onCloneDeep(const clonable &from) override
Bidirectional iterator for key-value containers
Definition biter.hpp:10
Definition biteration.hpp:5
Definition nmapIteration.hpp:6
to Top