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

#include <BlockQueue.h>

Public Member Functions

std::size_t count () const
 
std::size_t size () const
 
bool isEmpty () const
 
h256 nextHash () const
 
T const & next () const
 
void clear ()
 
void enqueue (T &&_t)
 
T dequeue ()
 
std::vector< TdequeueMultiple (std::size_t _n)
 
bool remove (h256 const &_hash)
 
template<class Pred >
std::vector< TremoveIf (Pred _pred)
 
bool replace (h256 const &_hash, T &&_t)
 

Private Member Functions

std::vector< TremoveRange (typename std::deque< T >::iterator _begin, typename std::deque< T >::iterator _end)
 

Static Private Member Functions

static std::function< bool(T const &)> sha3UnclesEquals (h256 const &_hash)
 

Private Attributes

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

Detailed Description

template<class T>
class dev::eth::SizedBlockQueue< T >

Definition at line 71 of file BlockQueue.h.

Member Function Documentation

template<class T>
void dev::eth::SizedBlockQueue< T >::clear ( )
inline

Definition at line 84 of file BlockQueue.h.

template<class T>
std::size_t dev::eth::SizedBlockQueue< T >::count ( ) const
inline

Definition at line 74 of file BlockQueue.h.

template<class T>
T dev::eth::SizedBlockQueue< T >::dequeue ( )
inline

Definition at line 96 of file BlockQueue.h.

template<class T>
std::vector<T> dev::eth::SizedBlockQueue< T >::dequeueMultiple ( std::size_t  _n)
inline

Definition at line 106 of file BlockQueue.h.

template<class T>
void dev::eth::SizedBlockQueue< T >::enqueue ( T &&  _t)
inline

Definition at line 90 of file BlockQueue.h.

template<class T>
bool dev::eth::SizedBlockQueue< T >::isEmpty ( ) const
inline

Definition at line 78 of file BlockQueue.h.

template<class T>
T const& dev::eth::SizedBlockQueue< T >::next ( ) const
inline

Definition at line 82 of file BlockQueue.h.

template<class T>
h256 dev::eth::SizedBlockQueue< T >::nextHash ( ) const
inline

Definition at line 80 of file BlockQueue.h.

template<class T>
bool dev::eth::SizedBlockQueue< T >::remove ( h256 const &  _hash)
inline

Definition at line 111 of file BlockQueue.h.

template<class T>
template<class Pred >
std::vector<T> dev::eth::SizedBlockQueue< T >::removeIf ( Pred  _pred)
inline

Definition at line 118 of file BlockQueue.h.

template<class T>
std::vector<T> dev::eth::SizedBlockQueue< T >::removeRange ( typename std::deque< T >::iterator  _begin,
typename std::deque< T >::iterator  _end 
)
inlineprivate

Definition at line 145 of file BlockQueue.h.

template<class T>
bool dev::eth::SizedBlockQueue< T >::replace ( h256 const &  _hash,
T &&  _t 
)
inline

Definition at line 125 of file BlockQueue.h.

template<class T>
static std::function<bool(T const&)> dev::eth::SizedBlockQueue< T >::sha3UnclesEquals ( h256 const &  _hash)
inlinestaticprivate

Definition at line 140 of file BlockQueue.h.

template<class T>
std::size_t dev::eth::SizedBlockQueue< T >::size ( ) const
inline

Definition at line 76 of file BlockQueue.h.

Member Data Documentation

template<class T>
std::deque<T> dev::eth::SizedBlockQueue< T >::m_queue
private

Definition at line 156 of file BlockQueue.h.

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

Tracks total size in bytes.

Definition at line 157 of file BlockQueue.h.


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