f25dd9dc2146274c8479d930ae1d91b083fd91c1
[junction.git] / junction / extra / impl / MapAdapter_Null.h
1 /*------------------------------------------------------------------------
2   Junction: Concurrent data structures in C++
3   Copyright (c) 2016 Jeff Preshing
4
5   Distributed under the Simplified BSD License.
6   Original location: https://github.com/preshing/junction
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the LICENSE file for more information.
11 ------------------------------------------------------------------------*/
12
13 #ifndef JUNCTION_EXTRA_IMPL_MAPADAPTER_NULL_H
14 #define JUNCTION_EXTRA_IMPL_MAPADAPTER_NULL_H
15
16 #include <junction/Core.h>
17
18 namespace junction {
19 namespace extra {
20
21 class MapAdapter {
22 public:
23     static TURF_CONSTEXPR const char* MapName = "Null";
24
25     MapAdapter(ureg) {
26     }
27
28     class ThreadContext {
29     public:
30         ThreadContext(MapAdapter&, ureg) {
31         }
32
33         void registerThread() {
34         }
35
36         void unregisterThread() {
37         }
38
39         void update() {
40         }
41     };
42
43     class Map {
44     public:
45         Map(ureg) {
46         }
47
48         void assign(u32, void*) {
49         }
50
51         void* get(u32) {
52             return NULL;
53         }
54
55         void erase(u32) {
56         }
57     };
58
59     static ureg getInitialCapacity(ureg) {
60         return 0;
61     }
62 };
63
64 } // namespace extra
65 } // namespace junction
66
67 #endif // JUNCTION_EXTRA_IMPL_MAPADAPTER_NULL_H