CatapultServer  v0.5.0.1 (Elephant)
NamespaceCacheView.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "NamespaceCacheMixins.h"
24 #include "NamespaceCacheTypes.h"
28 
29 namespace catapult { namespace cache {
30 
33  private:
36 
37  public:
42 
47  };
48 
51  : public utils::MoveOnly
58  public:
60 
61  public:
64  const NamespaceCacheTypes::BaseSets& namespaceSets,
66  const NamespaceSizes& namespaceSizes)
67  : NamespaceCacheViewMixins::Size(namespaceSets.Primary)
68  , NamespaceCacheViewMixins::Contains(namespaceSets.FlatMap)
69  , NamespaceCacheViewMixins::Iteration(namespaceSets.Primary)
70  , NamespaceCacheViewMixins::PatriciaTreeView(namespaceSets.PatriciaTree.get())
71  , NamespaceCacheViewMixins::NamespaceDeepSize(namespaceSizes)
72  , NamespaceCacheViewMixins::NamespaceLookup(namespaceSets.Primary, namespaceSets.FlatMap)
73  {}
74  };
75 
77  class NamespaceCacheView : public ReadOnlyViewSupplier<BasicNamespaceCacheView> {
78  public:
81  const NamespaceCacheTypes::BaseSets& namespaceSets,
82  const NamespaceCacheTypes::Options& options,
83  const NamespaceSizes& namespaceSizes)
84  : ReadOnlyViewSupplier(namespaceSets, options, namespaceSizes)
85  {}
86  };
87 }}
catapult::cache::BasicCacheMixins::Size
SizeMixin< TSet > Size
Definition: CacheMixinAliases.h:31
catapult::cache::IterationMixin
A mixin for adding iteration support to a cache.
Definition: CacheMixins.h:75
catapult::cache::PatriciaTreeCacheMixins::PatriciaTreeView
PatriciaTreeMixin< typename TCacheDescriptor::PatriciaTree > PatriciaTreeView
Definition: CacheMixinAliases.h:53
catapult::cache::ReadOnlyViewSupplier
Decorates a view and supplies a read-only view.
Definition: ReadOnlyViewSupplier.h:28
catapult::cache::PatriciaTreeMixin
A mixin for adding patricia tree support to a cache.
Definition: PatriciaTreeCacheMixins.h:30
ReadOnlyViewSupplier.h
catapult::cache::NamespaceDeepSizeMixin
A mixin for calculating the deep size of namespaces.
Definition: NamespaceCacheMixins.h:40
NamespaceCacheSerializers.h
NamespaceCacheMixins.h
catapult::cache::NamespaceCacheView::NamespaceCacheView
NamespaceCacheView(const NamespaceCacheTypes::BaseSets &namespaceSets, const NamespaceCacheTypes::Options &options, const NamespaceSizes &namespaceSizes)
Creates a view around namespaceSets, options and namespaceSizes.
Definition: NamespaceCacheView.h:80
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::cache::NamespaceLookupMixin
Definition: NamespaceCacheMixins.h:85
catapult::cache::NamespaceBaseSets
Definition: NamespaceBaseSets.h:48
ReadOnlyArtifactCache.h
catapult::cache::PatriciaTreeCacheMixins
Grouping of all basic and patricia tree cache mixins for a single set.
Definition: CacheMixinAliases.h:52
catapult::cache::BasicCacheMixins::Contains
ContainsMixin< TSet, TCacheDescriptor > Contains
Definition: CacheMixinAliases.h:32
catapult::cache::BasicCacheMixins::Iteration
IterationMixin< TSet > Iteration
Definition: CacheMixinAliases.h:33
NamespaceCacheTypes.h
catapult::cache::ContainsMixin
A mixin for adding contains support to a cache.
Definition: CacheMixins.h:54
catapult::cache::BasicNamespaceCacheView
Basic view on top of the namespace cache.
Definition: NamespaceCacheView.h:50
catapult::cache::BasicNamespaceCacheView::BasicNamespaceCacheView
BasicNamespaceCacheView(const NamespaceCacheTypes::BaseSets &namespaceSets, const NamespaceCacheTypes::Options &, const NamespaceSizes &namespaceSizes)
Creates a view around namespaceSets, options and namespaceSizes.
Definition: NamespaceCacheView.h:63
catapult::cache::detail::UnorderedMapAdapter::BaseSetType
deltaset::BaseSet< TElementTraits, StorageTraits > BaseSetType
Base set type.
Definition: CacheDescriptorAdapters.h:81
catapult::deltaset::BaseSet
Definition: BaseSet.h:52
catapult::cache::NamespaceCacheViewMixins::Size
PrimaryMixins::Size Size
Definition: NamespaceCacheView.h:38
catapult::utils::MoveOnly
A class that can be moved but not copied.
Definition: NonCopyable.h:43
CacheMixinAliases.h
catapult::cache::NamespaceCacheTypes::CacheReadOnlyType
ReadOnlyArtifactCache< BasicNamespaceCacheView, BasicNamespaceCacheDelta, NamespaceId, state::NamespaceEntry > CacheReadOnlyType
Definition: NamespaceCacheTypes.h:84
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::NamespaceCacheViewMixins::Iteration
PrimaryMixins::Iteration Iteration
Definition: NamespaceCacheView.h:40
catapult::cache::SizeMixin
A mixin for adding size support to a cache.
Definition: CacheMixins.h:36
catapult::cache::NamespaceCacheTypes::Options
Custom sub view options.
Definition: NamespaceCacheTypes.h:87
catapult::cache::NamespaceSizes
Extended namespace sizes.
Definition: NamespaceCacheMixins.h:30
catapult::cache::NamespaceCacheView
View on top of the namespace cache.
Definition: NamespaceCacheView.h:77
catapult::cache::NamespaceCacheViewMixins
Mixins used by the namespace cache view.
Definition: NamespaceCacheView.h:32
catapult::cache::BasicCacheMixins
Grouping of all basic cache mixins for a single set.
Definition: CacheMixinAliases.h:30