CatapultServer
v0.5.0.1 (Elephant)
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
w
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Related Functions
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Functions
m
r
Variables
a
b
c
d
e
f
h
i
l
m
n
p
r
s
t
u
v
w
Macros
b
c
d
e
f
g
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
MosaicCacheTypes.h
Go to the documentation of this file.
1
21
#pragma once
22
#include "
src/state/MosaicEntry.h
"
23
#include "
catapult/cache/CacheDatabaseMixin.h
"
24
#include "
catapult/cache/CacheDescriptorAdapters.h
"
25
#include "
catapult/utils/Hashers.h
"
26
#include "
catapult/utils/IdentifierGroup.h
"
27
28
namespace
catapult
{
29
namespace
cache {
30
class
BasicMosaicCacheDelta;
31
class
BasicMosaicCacheView;
32
struct
MosaicBaseSetDeltaPointers;
33
struct
MosaicBaseSets;
34
class
MosaicCache;
35
class
MosaicCacheDelta;
36
class
MosaicCacheView;
37
struct
MosaicEntryPrimarySerializer;
38
struct
MosaicHeightGroupingSerializer;
39
class
MosaicPatriciaTree;
40
41
template
<
typename
TCache,
typename
TCacheDelta,
typename
TKey,
typename
TGetResult>
42
class
ReadOnlyArtifactCache
;
43
}
44
}
45
46
namespace
catapult
{
namespace
cache {
47
49
struct
MosaicCacheDescriptor
{
50
public
:
51
static
constexpr
auto
Name
=
"MosaicCache"
;
52
53
public
:
54
// key value types
55
using
KeyType
=
MosaicId
;
56
using
ValueType
=
state::MosaicEntry
;
57
58
// cache types
59
using
CacheType
=
MosaicCache
;
60
using
CacheDeltaType
=
MosaicCacheDelta
;
61
using
CacheViewType
=
MosaicCacheView
;
62
63
using
Serializer
=
MosaicEntryPrimarySerializer
;
64
using
PatriciaTree
=
MosaicPatriciaTree
;
65
66
public
:
68
static
auto
GetKeyFromValue
(
const
ValueType
& entry) {
69
return
entry.
mosaicId
();
70
}
71
};
72
74
struct
MosaicCacheTypes
{
75
public
:
76
using
CacheReadOnlyType
=
ReadOnlyArtifactCache<BasicMosaicCacheView, BasicMosaicCacheDelta, MosaicId, state::MosaicEntry>
;
77
78
// region secondary descriptors
79
80
public
:
81
struct
HeightGroupingTypesDescriptor
{
82
public
:
83
using
KeyType
=
Height
;
84
using
ValueType
=
utils::IdentifierGroup<MosaicId, Height, utils::BaseValueHasher<MosaicId>
>;
85
using
Serializer
=
MosaicHeightGroupingSerializer
;
86
87
public
:
88
static
auto
GetKeyFromValue
(
const
ValueType
& heightMosaics) {
89
return
heightMosaics.
key
();
90
}
91
};
92
93
// endregion
94
95
public
:
96
using
PrimaryTypes
=
MutableUnorderedMapAdapter<MosaicCacheDescriptor, utils::BaseValueHasher<MosaicId>
>;
97
using
HeightGroupingTypes
=
MutableUnorderedMapAdapter<HeightGroupingTypesDescriptor, utils::BaseValueHasher<Height>
>;
98
99
public
:
100
using
BaseSetDeltaPointers
=
MosaicBaseSetDeltaPointers
;
101
using
BaseSets
=
MosaicBaseSets
;
102
};
103
}}
catapult::cache::MosaicCacheTypes::HeightGroupingTypesDescriptor
Definition:
MosaicCacheTypes.h:81
catapult::cache::MosaicBaseSets
Definition:
MosaicBaseSets.h:47
catapult::cache::MosaicCache
Synchronized cache composed of mosaic information.
Definition:
MosaicCache.h:33
catapult::cache::MosaicCacheDescriptor
Describes a mosaic cache.
Definition:
MosaicCacheTypes.h:49
IdentifierGroup.h
catapult::cache::MosaicCacheDescriptor::Name
static constexpr auto Name
Definition:
MosaicCacheTypes.h:51
catapult::cache::MosaicCacheTypes
Mosaic cache types.
Definition:
MosaicCacheTypes.h:74
catapult::utils::IdentifierGroup::key
const TGroupingKey & key() const
Gets the grouping key.
Definition:
IdentifierGroup.h:43
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition:
src/catapult/types.h:85
catapult::cache::MosaicCacheDelta
Delta on top of the mosaic cache.
Definition:
MosaicCacheDelta.h:75
catapult::cache::MosaicEntryPrimarySerializer
Primary serializer for mosaic cache.
Definition:
MosaicCacheSerializers.h:30
catapult::state::MosaicEntry
A tuple composed of a mosaic definition and its current state.
Definition:
MosaicEntry.h:50
catapult::cache::ReadOnlyArtifactCache
A read-only overlay on top of a cache that provides support for contains, get and isActive.
Definition:
MosaicCacheTypes.h:42
catapult::utils::BaseValue< uint64_t, MosaicId_tag >
catapult::cache::MosaicHeightGroupingSerializer
Serializer for mosaic cache height grouped elements.
Definition:
MosaicCacheSerializers.h:33
catapult::cache::MosaicBaseSetDeltaPointers
Definition:
MosaicBaseSets.h:41
CacheDatabaseMixin.h
CacheDescriptorAdapters.h
catapult::cache::MosaicPatriciaTree
Definition:
MosaicBaseSets.h:35
catapult::cache::MosaicCacheDescriptor::GetKeyFromValue
static auto GetKeyFromValue(const ValueType &entry)
Gets the key corresponding to entry.
Definition:
MosaicCacheTypes.h:68
catapult::cache::MosaicCacheTypes::HeightGroupingTypesDescriptor::GetKeyFromValue
static auto GetKeyFromValue(const ValueType &heightMosaics)
Definition:
MosaicCacheTypes.h:88
MosaicEntry.h
catapult
Definition:
AddressExtractionExtension.cpp:28
Hashers.h
catapult::state::MosaicEntry::mosaicId
MosaicId mosaicId() const
Gets the mosaic id.
Definition:
MosaicEntry.cpp:52
catapult::cache::MosaicCacheView
View on top of the mosaic cache.
Definition:
MosaicCacheView.h:58
catapult::utils::IdentifierGroup
A group of identifiers that share a common (external) attribute.
Definition:
IdentifierGroup.h:28
catapult::cache::detail::UnorderedMapAdapter
Defines cache types for an unordered map based cache.
Definition:
CacheDescriptorAdapters.h:35
catapult-server
plugins
txes
mosaic
src
cache
MosaicCacheTypes.h
Generated by
1.8.16