CatapultServer  v0.5.0.1 (Elephant)
AccountRestrictionCacheView.h
Go to the documentation of this file.
1 
21 #pragma once
27 
28 namespace catapult { namespace cache {
29 
33 
36  : public utils::MoveOnly
42  public:
44 
45  public:
48  const AccountRestrictionCacheTypes::BaseSets& restrictionSets,
50  : AccountRestrictionCacheViewMixins::Size(restrictionSets.Primary)
51  , AccountRestrictionCacheViewMixins::Contains(restrictionSets.Primary)
52  , AccountRestrictionCacheViewMixins::Iteration(restrictionSets.Primary)
53  , AccountRestrictionCacheViewMixins::ConstAccessor(restrictionSets.Primary)
54  , AccountRestrictionCacheViewMixins::PatriciaTreeView(restrictionSets.PatriciaTree.get())
56  {}
57 
58  public:
61  return m_networkIdentifier;
62  }
63 
64  private:
66  };
67 
69  class AccountRestrictionCacheView : public ReadOnlyViewSupplier<BasicAccountRestrictionCacheView> {
70  public:
73  const AccountRestrictionCacheTypes::BaseSets& restrictionSets,
75  : ReadOnlyViewSupplier(restrictionSets, networkIdentifier)
76  {}
77  };
78 }}
catapult::cache::BasicCacheMixins::Size
SizeMixin< TSet > Size
Definition: CacheMixinAliases.h:31
catapult::cache::AccountRestrictionCacheTypes::CacheReadOnlyType
ReadOnlyArtifactCache< BasicAccountRestrictionCacheView, BasicAccountRestrictionCacheDelta, const Address &, state::AccountRestrictions > CacheReadOnlyType
Definition: AccountRestrictionCacheTypes.h:79
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::AccountRestrictionCacheView::AccountRestrictionCacheView
AccountRestrictionCacheView(const AccountRestrictionCacheTypes::BaseSets &restrictionSets, model::NetworkIdentifier networkIdentifier)
Creates a view around restrictionSets and networkIdentifier.
Definition: AccountRestrictionCacheView.h:72
catapult::cache::ReadOnlyArtifactCache
A read-only overlay on top of a cache that provides support for contains, get and isActive.
Definition: MosaicCacheTypes.h:42
ReadOnlyArtifactCache.h
catapult::cache::PatriciaTreeCacheMixins
Grouping of all basic and patricia tree cache mixins for a single set.
Definition: CacheMixinAliases.h:52
catapult::cache::ConstAccessorMixin
A mixin for adding const access support to a cache.
Definition: CacheMixins.h:190
catapult::cache::BasicCacheMixins::Iteration
IterationMixin< TSet > Iteration
Definition: CacheMixinAliases.h:33
catapult::cache::BasicAccountRestrictionCacheView::m_networkIdentifier
model::NetworkIdentifier m_networkIdentifier
Definition: AccountRestrictionCacheView.h:65
catapult::cache::ContainsMixin
A mixin for adding contains support to a cache.
Definition: CacheMixins.h:54
catapult::cache::AccountRestrictionCacheView
View on top of the account restriction cache.
Definition: AccountRestrictionCacheView.h:69
catapult::utils::MoveOnly
A class that can be moved but not copied.
Definition: NonCopyable.h:43
CacheMixinAliases.h
catapult::model::NetworkIdentifier
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
catapult::cache::AccountRestrictionCacheViewMixins
PatriciaTreeCacheMixins< AccountRestrictionCacheTypes::PrimaryTypes::BaseSetType, AccountRestrictionCacheDescriptor > AccountRestrictionCacheViewMixins
Mixins used by the account restriction cache view.
Definition: AccountRestrictionCacheView.h:32
AccountRestrictionCacheSerializers.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::BasicAccountRestrictionCacheView::networkIdentifier
model::NetworkIdentifier networkIdentifier() const
Gets the network identifier.
Definition: AccountRestrictionCacheView.h:60
AccountRestrictionBaseSets.h
catapult::cache::BasicAccountRestrictionCacheView::BasicAccountRestrictionCacheView
BasicAccountRestrictionCacheView(const AccountRestrictionCacheTypes::BaseSets &restrictionSets, model::NetworkIdentifier networkIdentifier)
Creates a view around restrictionSets and networkIdentifier.
Definition: AccountRestrictionCacheView.h:47
catapult::cache::AccountRestrictionBaseSets
Definition: AccountRestrictionBaseSets.h:47
catapult::cache::BasicAccountRestrictionCacheView
Basic view on top of the account restriction cache.
Definition: AccountRestrictionCacheView.h:35