Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
generic_maps.hpp
Go to the documentation of this file.
1
6
#ifndef KAGOME_GENERIC_MAPS_HPP
7
#define KAGOME_GENERIC_MAPS_HPP
8
9
#include "
storage/face/batch_writeable.hpp
"
10
#include "
storage/face/iterable.hpp
"
11
#include "
storage/face/readable.hpp
"
12
#include "
storage/face/writeable.hpp
"
13
14
namespace
kagome::storage::face
{
15
21
template
<
typename
K,
typename
V,
typename
KView = K>
22
struct
ReadOnlyMap
23
:
public
Iterable
<K, typename ReadableMap<K, V>::ConstValueView, KView>,
24
public
ReadableMap
<KView, V> {};
25
26
template
<
typename
K,
typename
V,
typename
KView = K>
27
struct
ReadOnlyStorage
:
public
Iterable
<K, V, KView>,
28
public
ReadableStorage
<KView, V> {};
29
35
template
<
typename
K,
typename
V,
typename
KView = K>
36
struct
GenericMap
:
public
ReadOnlyMap
<K, V, KView>,
37
public
Writeable
<KView, V>,
38
public
BatchWriteable
<KView, V> {};
39
40
template
<
typename
K,
typename
V,
typename
KView = K>
41
struct
GenericStorage
:
public
ReadOnlyStorage
<K, V, KView>,
42
public
Writeable
<KView, V>,
43
public
BatchWriteable
<KView, V> {
48
virtual
size_t
size()
const
= 0;
49
};
50
51
}
// namespace kagome::storage::face
52
53
#endif // KAGOME_GENERIC_MAPS_HPP
iterable.hpp
kagome::storage::face::ReadableMap
A mixin for read-only map.
Definition:
readable.hpp:40
kagome::storage::face::ReadOnlyMap
An abstraction over a readable and iterable key-value map.
Definition:
generic_maps.hpp:22
kagome::storage::face::ReadableStorage
Definition:
readable.hpp:65
kagome::storage::face::Iterable
A mixin for an iterable map.
Definition:
iterable.hpp:22
kagome::storage::face
Definition:
batch_writeable.hpp:14
kagome::storage::face::Writeable
An mixin for modifiable map.
Definition:
writeable.hpp:19
kagome::storage::face::BatchWriteable
A mixin for a map that supports batching for efficiency of modifications.
Definition:
batch_writeable.hpp:23
readable.hpp
kagome::storage::face::GenericStorage
Definition:
generic_maps.hpp:41
writeable.hpp
kagome::storage::face::ReadOnlyStorage
Definition:
generic_maps.hpp:27
kagome::storage::face::GenericMap
An abstraction over a readable, writeable, iterable key-value map.
Definition:
generic_maps.hpp:36
batch_writeable.hpp
core
storage
face
generic_maps.hpp
Generated by
1.8.11