hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::set::CollectionSet< Key, Hash, KeyEqual > Class Template Reference

#include "collection_set.hpp"

Collaboration diagram for iroha::set::CollectionSet< Key, Hash, KeyEqual >:
Collaboration graph

Public Types

using value_type = Key
 

Public Member Functions

 CollectionSet ()=default
 
template<typename Collection >
void insertValues (Collection &&collection)
 
template<typename Collection >
void removeValues (Collection &&collection)
 
template<typename Callable >
void forEach (Callable &&callable) const
 

Detailed Description

template<typename Key, typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
class iroha::set::CollectionSet< Key, Hash, KeyEqual >

Class provides concurrent implementation of collection which operates with collections on insert and remove

Template Parameters
Key- type of holding values
Hash- hash representation of Key values
KeyEqual- equality type

Member Typedef Documentation

template<typename Key , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
using iroha::set::CollectionSet< Key, Hash, KeyEqual >::value_type = Key

Constructor & Destructor Documentation

template<typename Key , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
iroha::set::CollectionSet< Key, Hash, KeyEqual >::CollectionSet ( )
default

Member Function Documentation

template<typename Key , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
template<typename Callable >
void iroha::set::CollectionSet< Key, Hash, KeyEqual >::forEach ( Callable &&  callable) const
inline

Blocking walk through the collection

Template Parameters
Callable- type of functor
Parameters
callable- functor for invocation on each element
template<typename Key , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
template<typename Collection >
void iroha::set::CollectionSet< Key, Hash, KeyEqual >::insertValues ( Collection &&  collection)
inline

Merge our and passed collection

Template Parameters
Collection- type of passed collection
Parameters
collection- elements to insert
template<typename Key , typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key>>
template<typename Collection >
void iroha::set::CollectionSet< Key, Hash, KeyEqual >::removeValues ( Collection &&  collection)
inline

Remove all elements which are occured in the passed collection

Template Parameters
Collection- type of passed collection
Parameters
collection- elements to remove

The documentation for this class was generated from the following file: