CatapultServer  v0.5.0.1 (Elephant)
LockInfoCacheView.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult { namespace cache {
26 
28  template<typename TDescriptor, typename TCacheTypes>
30 
32  template<typename TDescriptor, typename TCacheTypes>
34  : public utils::MoveOnly
35  , public LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::Size
36  , public LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::Contains
37  , public LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::Iteration
38  , public LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::ConstAccessor
39  , public LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::PatriciaTreeView
40  , public LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::ActivePredicate {
41  public:
43 
44  public:
46  explicit BasicLockInfoCacheView(const typename TCacheTypes::BaseSets& lockInfoSets)
47  : LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::Size(lockInfoSets.Primary)
48  , LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::Contains(lockInfoSets.Primary)
49  , LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::Iteration(lockInfoSets.Primary)
50  , LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::ConstAccessor(lockInfoSets.Primary)
51  , LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::PatriciaTreeView(lockInfoSets.PatriciaTree.get())
52  , LockInfoCacheViewMixins<TDescriptor, TCacheTypes>::ActivePredicate(lockInfoSets.Primary)
53  {}
54  };
55 
57  template<typename TDescriptor, typename TCacheTypes, typename TBasicView = BasicLockInfoCacheView<TDescriptor, TCacheTypes>>
58  class LockInfoCacheView : public ReadOnlyViewSupplier<TBasicView> {
59  public:
61  explicit LockInfoCacheView(const typename TCacheTypes::BaseSets& lockInfoSets)
62  : ReadOnlyViewSupplier<TBasicView>(lockInfoSets)
63  {}
64  };
65 }}
catapult::cache::ReadOnlyViewSupplier
Decorates a view and supplies a read-only view.
Definition: ReadOnlyViewSupplier.h:28
ReadOnlyViewSupplier.h
catapult::cache::PatriciaTreeCacheMixins
Grouping of all basic and patricia tree cache mixins for a single set.
Definition: CacheMixinAliases.h:52
catapult::cache::LockInfoCacheView
View on top of the lock info cache.
Definition: LockInfoCacheView.h:58
catapult::cache::LockInfoCacheView::LockInfoCacheView
LockInfoCacheView(const typename TCacheTypes::BaseSets &lockInfoSets)
Creates a view around lockInfoSets.
Definition: LockInfoCacheView.h:61
catapult::validators::CacheReadOnlyType
typename cache::AccountRestrictionCacheTypes::CacheReadOnlyType CacheReadOnlyType
Definition: AddressInteractionValidator.cpp:30
catapult::utils::MoveOnly
A class that can be moved but not copied.
Definition: NonCopyable.h:43
CacheMixinAliases.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::BasicLockInfoCacheView< SecretLockInfoCacheDescriptor, SecretLockInfoCacheTypes >::ReadOnlyView
typename SecretLockInfoCacheTypes ::CacheReadOnlyType ReadOnlyView
Definition: LockInfoCacheView.h:42
catapult::cache::BasicLockInfoCacheView::BasicLockInfoCacheView
BasicLockInfoCacheView(const typename TCacheTypes::BaseSets &lockInfoSets)
Creates a view around lockInfoSets.
Definition: LockInfoCacheView.h:46
catapult::cache::BasicLockInfoCacheView
Basic view on top of the lock info cache.
Definition: LockInfoCacheView.h:33