CatapultServer
v0.5.0.1 (Elephant)
|
A group of identifiers that share a common (external) attribute. More...
Public Types | |
using | Identifiers = std::unordered_set< TIdentifier, TIdentifierHasher > |
Unordered set of identifiers. More... | |
using | GroupingKeyType = TGroupingKey |
Type of grouping key. More... | |
Public Member Functions | |
IdentifierGroup (const TGroupingKey &key) | |
Creates a group around a given key. More... | |
const TGroupingKey & | key () const |
Gets the grouping key. More... | |
const Identifiers & | identifiers () const |
Gets the identifiers. More... | |
bool | empty () const |
Returns true if the group is empty, false otherwise. More... | |
size_t | size () const |
Gets the number of identifiers in the group. More... | |
void | add (const TIdentifier &identifier) |
Adds identifier to the group. More... | |
void | remove (const TIdentifier &identifier) |
Removes identifier from the group. More... | |
Private Attributes | |
TGroupingKey | m_key |
Identifiers | m_identifiers |
A group of identifiers that share a common (external) attribute.
using catapult::utils::IdentifierGroup< TIdentifier, TGroupingKey, TIdentifierHasher >::GroupingKeyType = TGroupingKey |
Type of grouping key.
using catapult::utils::IdentifierGroup< TIdentifier, TGroupingKey, TIdentifierHasher >::Identifiers = std::unordered_set<TIdentifier, TIdentifierHasher> |
Unordered set of identifiers.
|
inlineexplicit |
Creates a group around a given key.
|
inline |
Adds identifier to the group.
|
inline |
Returns true
if the group is empty, false
otherwise.
|
inline |
Gets the identifiers.
|
inline |
Gets the grouping key.
|
inline |
Removes identifier from the group.
|
inline |
Gets the number of identifiers in the group.
|
private |
|
private |