CatapultServer  v0.5.0.1 (Elephant)
MosaicCacheTypes.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "src/state/MosaicEntry.h"
25 #include "catapult/utils/Hashers.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>
43  }
44 }
45 
46 namespace catapult { namespace cache {
47 
50  public:
51  static constexpr auto Name = "MosaicCache";
52 
53  public:
54  // key value types
55  using KeyType = MosaicId;
57 
58  // cache types
62 
65 
66  public:
68  static auto GetKeyFromValue(const ValueType& entry) {
69  return entry.mosaicId();
70  }
71  };
72 
75  public:
77 
78  // region secondary descriptors
79 
80  public:
82  public:
83  using KeyType = Height;
86 
87  public:
88  static auto GetKeyFromValue(const ValueType& heightMosaics) {
89  return heightMosaics.key();
90  }
91  };
92 
93  // endregion
94 
95  public:
98 
99  public:
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