CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
22 #include <unordered_set>
24 namespace catapult {
namespace utils {
27 template<
typename TIdentifier,
typename TGroupingKey,
typename TIdentifierHasher>
31 using Identifiers = std::unordered_set<TIdentifier, TIdentifierHasher>;
43 const TGroupingKey&
key()
const {
65 void add(
const TIdentifier& identifier) {
70 void remove(
const TIdentifier& identifier) {
IdentifierGroup(const TGroupingKey &key)
Creates a group around a given key.
Definition: IdentifierGroup.h:38
std::unordered_set< TIdentifier, TIdentifierHasher > Identifiers
Unordered set of identifiers.
Definition: IdentifierGroup.h:31
const TGroupingKey & key() const
Gets the grouping key.
Definition: IdentifierGroup.h:43
bool empty() const
Returns true if the group is empty, false otherwise.
Definition: IdentifierGroup.h:54
size_t size() const
Gets the number of identifiers in the group.
Definition: IdentifierGroup.h:59
const Identifiers & identifiers() const
Gets the identifiers.
Definition: IdentifierGroup.h:48
TGroupingKey GroupingKeyType
Type of grouping key.
Definition: IdentifierGroup.h:34
void add(const TIdentifier &identifier)
Adds identifier to the group.
Definition: IdentifierGroup.h:65
Definition: AddressExtractionExtension.cpp:28
void remove(const TIdentifier &identifier)
Removes identifier from the group.
Definition: IdentifierGroup.h:70
Identifiers m_identifiers
Definition: IdentifierGroup.h:76
A group of identifiers that share a common (external) attribute.
Definition: IdentifierGroup.h:28
TGroupingKey m_key
Definition: IdentifierGroup.h:75