CatapultServer  v0.5.0.1 (Elephant)
DeltaElements.h
Go to the documentation of this file.
1 
21 #pragma once
22 
23 namespace catapult { namespace deltaset {
24 
26  template<typename TSet>
27  struct DeltaElements {
28  public:
30  constexpr explicit DeltaElements(const TSet& addedElements, const TSet& removedElements, const TSet& copiedElements)
31  : Added(addedElements)
32  , Removed(removedElements)
33  , Copied(copiedElements)
34  {}
35 
36  public:
38  bool HasChanges() const {
39  return !(Added.empty() && Copied.empty() && Removed.empty());
40  }
41 
42  public:
44  const TSet& Added;
45 
47  const TSet& Removed;
48 
50  const TSet& Copied;
51  };
52 }}
catapult::deltaset::DeltaElements::Removed
const TSet & Removed
Removed elements.
Definition: DeltaElements.h:47
catapult::deltaset::DeltaElements::Added
const TSet & Added
Added elements.
Definition: DeltaElements.h:44
ValidatorContext.h
catapult::validators::Notification
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
catapult::deltaset::DeltaElements::HasChanges
bool HasChanges() const
Returns true if there are any pending changes.
Definition: DeltaElements.h:38
catapult::deltaset::DeltaElements
Slim wrapper around changed elements.
Definition: DeltaElements.h:27
MAKE_STATEFUL_VALIDATOR
#define MAKE_STATEFUL_VALIDATOR(NAME, HANDLER)
Definition: ValidatorTypes.h:123
catapult::utils::TimeSpan
Represents a time duration.
Definition: TimeSpan.h:30
catapult::validators::DECLARE_STATEFUL_VALIDATOR
DECLARE_STATEFUL_VALIDATOR(Address, Notification)(model
Definition: AddressValidator.cpp:29
Validators.h
catapult::deltaset::DeltaElements::Copied
const TSet & Copied
Copied elements.
Definition: DeltaElements.h:50
catapult::validators::ValidationResult::Success
Validation succeeded.
types.h
catapult::Timestamp
utils::BaseValue< uint64_t, Timestamp_tag > Timestamp
Definition: src/catapult/types.h:73
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::model::AccountAddressNotification
Notification of use of an account address.
Definition: Notifications.h:57
catapult::deltaset::DeltaElements::DeltaElements
constexpr DeltaElements(const TSet &addedElements, const TSet &removedElements, const TSet &copiedElements)
Creates new delta elements from addedElements, removedElements and copiedElements.
Definition: DeltaElements.h:30