Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
dev::eth::SizedBlockMap< KeyType > Class Template Reference

#include <BlockQueue.h>

Public Member Functions

std::size_t count () const
 
std::size_t size () const
 
bool isEmpty () const
 
KeyType firstKey () const
 
void clear ()
 
void insert (KeyType const &_key, h256 const &_hash, bytes &&_blockData)
 
std::vector< std::pair< h256, bytes > > removeByKeyEqual (KeyType const &_key)
 
std::vector< std::pair< h256, bytes > > removeByKeyNotGreater (KeyType const &_key)
 

Private Types

using BlockMultimap = std::multimap< KeyType, std::pair< h256, bytes >>
 

Private Member Functions

std::vector< std::pair< h256, bytes > > removeRange (typename BlockMultimap::iterator _begin, typename BlockMultimap::iterator _end)
 

Private Attributes

BlockMultimap m_map
 
std::atomic< size_t > m_size = {0}
 Tracks total size in bytes. More...
 

Detailed Description

template<class KeyType>
class dev::eth::SizedBlockMap< KeyType >

Definition at line 161 of file BlockQueue.h.

Member Typedef Documentation

template<class KeyType>
using dev::eth::SizedBlockMap< KeyType >::BlockMultimap = std::multimap<KeyType, std::pair<h256, bytes>>
private

Definition at line 198 of file BlockQueue.h.

Member Function Documentation

template<class KeyType>
void dev::eth::SizedBlockMap< KeyType >::clear ( )
inline

Definition at line 172 of file BlockQueue.h.

template<class KeyType>
std::size_t dev::eth::SizedBlockMap< KeyType >::count ( ) const
inline

Definition at line 164 of file BlockQueue.h.

template<class KeyType>
KeyType dev::eth::SizedBlockMap< KeyType >::firstKey ( ) const
inline

Definition at line 170 of file BlockQueue.h.

template<class KeyType>
void dev::eth::SizedBlockMap< KeyType >::insert ( KeyType const &  _key,
h256 const &  _hash,
bytes &&  _blockData 
)
inline

Definition at line 178 of file BlockQueue.h.

template<class KeyType>
bool dev::eth::SizedBlockMap< KeyType >::isEmpty ( ) const
inline

Definition at line 168 of file BlockQueue.h.

template<class KeyType>
std::vector<std::pair<h256, bytes> > dev::eth::SizedBlockMap< KeyType >::removeByKeyEqual ( KeyType const &  _key)
inline

Definition at line 186 of file BlockQueue.h.

template<class KeyType>
std::vector<std::pair<h256, bytes> > dev::eth::SizedBlockMap< KeyType >::removeByKeyNotGreater ( KeyType const &  _key)
inline

Definition at line 192 of file BlockQueue.h.

template<class KeyType>
std::vector<std::pair<h256, bytes> > dev::eth::SizedBlockMap< KeyType >::removeRange ( typename BlockMultimap::iterator  _begin,
typename BlockMultimap::iterator  _end 
)
inlineprivate

Definition at line 200 of file BlockQueue.h.

template<class KeyType>
std::size_t dev::eth::SizedBlockMap< KeyType >::size ( ) const
inline

Definition at line 166 of file BlockQueue.h.

Member Data Documentation

template<class KeyType>
BlockMultimap dev::eth::SizedBlockMap< KeyType >::m_map
private

Definition at line 216 of file BlockQueue.h.

template<class KeyType>
std::atomic<size_t> dev::eth::SizedBlockMap< KeyType >::m_size = {0}
private

Tracks total size in bytes.

Definition at line 217 of file BlockQueue.h.


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