CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
29 template<
typename TElementTraits,
typename TSetTraits>
32 template<
typename TSetTraits>
37 namespace catapult {
namespace deltaset {
48 typename TElementTraits,
50 typename TCommitPolicy = BaseSetCommitPolicy<TSetTraits>
55 using SetType =
typename TSetTraits::SetType;
56 using KeyType =
typename TSetTraits::KeyType;
65 template<
typename... TArgs>
95 std::shared_ptr<DeltaType>
rebase() {
99 auto pDelta = std::make_shared<DeltaType>(
m_elements);
107 return std::make_shared<DeltaType>(
m_elements);
113 template<
typename... TArgs>
119 auto deltas = pDelta->deltas();
120 TCommitPolicy::Update(
m_elements, deltas, std::forward<TArgs>(args)...);
129 template<
typename TElementTraits2,
typename TSetTraits2,
typename TCommitPolicy2>
132 template<
typename TElementTraits2,
typename TSetTraits2,
typename TCommitPolicy2>
SetType m_elements
Definition: BaseSet.h:125
void commit(TArgs &&... args)
Definition: BaseSet.h:114
friend BaseSetIterationView< TSetTraits2 > MakeIterableView(const BaseSet< TElementTraits2, TSetTraits2, TCommitPolicy2 > &set)
size_t size() const
Gets the size of this set.
Definition: BaseSet.h:76
FindConstIterator find(const KeyType &key) const
Definition: BaseSet.h:82
std::shared_ptr< DeltaType > rebaseDetached() const
Definition: BaseSet.h:106
std::weak_ptr< DeltaType > m_pWeakDelta
Definition: BaseSet.h:126
Traits for customizing the behavior of find depending on element type.
Definition: BaseSetDefaultTraits.h:180
typename TElementTraits::ElementType ElementType
Definition: BaseSet.h:54
Definition: BaseSetFindIterator.h:30
std::shared_ptr< DeltaType > rebase()
Returns a delta based on the same original elements as this set.
Definition: BaseSet.h:95
A class that can be moved but not copied.
Definition: NonCopyable.h:43
friend bool IsBaseSetIterable(const BaseSet< TElementTraits2, TSetTraits2, TCommitPolicy2 > &set)
BaseSet(TArgs &&... args)
Definition: BaseSet.h:66
A view that provides iteration support to a base set.
Definition: BaseSet.h:33
#define CATAPULT_THROW_RUNTIME_ERROR(MESSAGE)
Macro used to throw a catapult runtime error.
Definition: exceptions.h:167
BaseSetFindIterator< FindTraits, TSetTraits > FindConstIterator
Definition: BaseSet.h:60
bool contains(const KeyType &key) const
Definition: BaseSet.h:89
Definition: AddressExtractionExtension.cpp:28
typename TStorageTraits ::KeyType KeyType
Definition: BaseSet.h:56
bool empty() const
Gets a value indicating whether or not the set is empty.
Definition: BaseSet.h:71
typename TSetTraits::SetType SetType
Definition: BaseSet.h:55