CatapultServer
v0.5.0.1 (Elephant)
|
Classes | |
struct | KeyGenerationIdMap |
struct | KeyGenerationIdMap< T, utils::traits::is_type_expression_t< typename T::hasher > > |
Public Types | |
using | ElementType = typename TElementTraits::ElementType |
using | ElementMutabilityTag = typename TElementTraits::MutabilityTag |
using | SetType = typename TSetTraits::SetType |
using | MemorySetType = typename TSetTraits::MemorySetType |
using | KeyType = typename TSetTraits::KeyType |
using | FindTraits = FindTraitsT< ElementType, TSetTraits::AllowsNativeValueModification > |
using | SetTraits = TSetTraits |
using | FindIterator = std::conditional_t< std::is_same_v< ElementMutabilityTag, ImmutableTypeTag >, BaseSetDeltaFindConstIterator< FindTraits, TSetTraits >, BaseSetDeltaFindIterator< FindTraits, TSetTraits > > |
using | FindConstIterator = BaseSetDeltaFindConstIterator< FindTraits, TSetTraits > |
Public Member Functions | |
BaseSetDelta (const SetType &originalElements) | |
Creates a delta around originalElements. More... | |
bool | empty () const |
Gets a value indicating whether or not the set is empty. More... | |
size_t | size () const |
Gets the size of this set. More... | |
FindConstIterator | find (const KeyType &key) const |
FindIterator | find (const KeyType &key) |
bool | contains (const KeyType &key) const |
InsertResult | insert (const ElementType &element) |
template<typename... TArgs> | |
InsertResult | emplace (TArgs &&... args) |
Creates an element around the passed arguments (args) and inserts the element into this set. More... | |
RemoveResult | remove (const KeyType &key) |
Removes the element identified by key from the delta. More... | |
DeltaElements< MemorySetType > | deltas () const |
Gets const references to the pending modifications. More... | |
void | reset () |
Resets all pending modifications. More... | |
uint32_t | generationId () const |
Gets the current generation id. More... | |
uint32_t | generationId (const KeyType &key) const |
Gets the generation id associated with key. More... | |
void | incrementGenerationId () |
Increments the generation id. More... | |
Public Member Functions inherited from catapult::utils::NonCopyable | |
constexpr | NonCopyable ()=default |
Default constructor. More... | |
~NonCopyable ()=default | |
Default destructor. More... | |
NonCopyable (const NonCopyable &)=delete | |
Disabled copy constructor. More... | |
NonCopyable & | operator= (const NonCopyable &)=delete |
Disabled assignment operator. More... | |
Private Member Functions | |
FindIterator | find (const KeyType &key, MutableTypeTag) |
FindConstIterator | find (const KeyType &key, MutableTypeTag) const |
FindConstIterator | find (const KeyType &key, ImmutableTypeTag) const |
void | markFoundElement (const KeyType &key, MutableTypeTag) |
void | markFoundElement (const KeyType &, ImmutableTypeTag) |
InsertResult | insert (const ElementType &element, MutableTypeTag) |
InsertResult | insert (const ElementType &element, ImmutableTypeTag) |
RemoveResult | remove (const KeyType &key, MutableTypeTag) |
RemoveResult | remove (const KeyType &key, ImmutableTypeTag) |
void | markKey (const KeyType &key) |
void | clearKey (const KeyType &key) |
Static Private Member Functions | |
template<typename TResultIterator , typename TBaseSetDelta > | |
static TResultIterator | Find (TBaseSetDelta &set, const KeyType &key) |
template<typename TSet > | |
static constexpr bool | Contains (const TSet &set, const KeyType &key) |
Private Attributes | |
const SetType & | m_originalElements |
MemorySetType | m_addedElements |
MemorySetType | m_removedElements |
MemorySetType | m_copiedElements |
uint32_t | m_generationId |
KeyGenerationIdMap< SetType >::Type | m_keyGenerationIdMap |
Friends | |
template<typename TElementTraits2 , typename TSetTraits2 > | |
BaseSetDeltaIterationView< TSetTraits2 > | MakeIterableView (const BaseSetDelta< TElementTraits2, TSetTraits2 > &set) |
A delta on top of a base set that offers methods to insert/remove/update elements.
TElementTraits | Traits describing the type of element. |
TSetTraits | Traits describing the underlying set. |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::ElementMutabilityTag = typename TElementTraits::MutabilityTag |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::ElementType = typename TElementTraits::ElementType |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::FindConstIterator = BaseSetDeltaFindConstIterator<FindTraits, TSetTraits> |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::FindIterator = std::conditional_t< std::is_same_v<ElementMutabilityTag, ImmutableTypeTag>, BaseSetDeltaFindConstIterator<FindTraits, TSetTraits>, BaseSetDeltaFindIterator<FindTraits, TSetTraits> > |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::FindTraits = FindTraitsT<ElementType, TSetTraits::AllowsNativeValueModification> |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::KeyType = typename TSetTraits::KeyType |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::MemorySetType = typename TSetTraits::MemorySetType |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::SetTraits = TSetTraits |
using catapult::deltaset::BaseSetDelta< TElementTraits, TSetTraits >::SetType = typename TSetTraits::SetType |
|
inlineexplicit |
Creates a delta around originalElements.
|
inlineprivate |
|
inline |
Searches for key in this set. Returns true
if it is found or false
if it is not found.
|
inlinestaticconstexprprivate |
|
inline |
Gets const references to the pending modifications.
|
inline |
Creates an element around the passed arguments (args) and inserts the element into this set.
|
inline |
Gets a value indicating whether or not the set is empty.
|
inline |
Searches for key in this set. Returns a pointer to the matching element if it is found or nullptr
if it is not found.
|
inline |
Searches for key in this set. Returns a pointer to the matching element if it is found or nullptr
if it is not found.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinestaticprivate |
|
inline |
Gets the current generation id.
|
inline |
Gets the generation id associated with key.
|
inline |
Increments the generation id.
|
inline |
Inserts element into this set.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
Removes the element identified by key from the delta.
|
inlineprivate |
|
inlineprivate |
|
inline |
Resets all pending modifications.
|
inline |
Gets the size of this set.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |