rippled
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
ripple::PeerFinder::Livecache< Allocator >::hops_t Class Reference

#include <Livecache.h>

Collaboration diagram for ripple::PeerFinder::Livecache< Allocator >::hops_t:
Collaboration graph
[legend]

Classes

struct  Transform
 

Public Types

using iterator = boost::transform_iterator< Transform< false >, typename lists_type::iterator >
 
using const_iterator = boost::transform_iterator< Transform< true >, typename lists_type::const_iterator >
 
using reverse_iterator = boost::transform_iterator< Transform< false >, typename lists_type::reverse_iterator >
 
using const_reverse_iterator = boost::transform_iterator< Transform< true >, typename lists_type::const_reverse_iterator >
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator crbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
const_reverse_iterator crend () const
 
void shuffle ()
 Shuffle each hop list.
 
std::string histogram () const
 

Private Types

using Histogram = std::array< int, 1+Tuning::maxHops+1 >
 
using lists_type = std::array< list_type, 1+Tuning::maxHops+1 >
 

Private Member Functions

 hops_t (Allocator const &alloc)
 
void insert (Element &e)
 
void reinsert (Element &e, std::uint32_t hops)
 
void remove (Element &e)
 

Private Attributes

lists_type m_lists
 
Histogram m_hist
 

Friends

class Livecache
 

Detailed Description

template<class Allocator = std::allocator<char>>
class ripple::PeerFinder::Livecache< Allocator >::hops_t

Definition at line 207 of file Livecache.h.

Member Typedef Documentation

◆ Histogram

template<class Allocator = std::allocator<char>>
using ripple::PeerFinder::Livecache< Allocator >::hops_t::Histogram = std::array<int, 1 + Tuning::maxHops + 1>
private

Definition at line 215 of file Livecache.h.

◆ lists_type

template<class Allocator = std::allocator<char>>
using ripple::PeerFinder::Livecache< Allocator >::hops_t::lists_type = std::array<list_type, 1 + Tuning::maxHops + 1>
private

Definition at line 216 of file Livecache.h.

◆ iterator

template<class Allocator = std::allocator<char>>
using ripple::PeerFinder::Livecache< Allocator >::hops_t::iterator = boost:: transform_iterator<Transform<false>, typename lists_type::iterator>

Definition at line 236 of file Livecache.h.

◆ const_iterator

template<class Allocator = std::allocator<char>>
using ripple::PeerFinder::Livecache< Allocator >::hops_t::const_iterator = boost::transform_iterator< Transform<true>, typename lists_type::const_iterator>

Definition at line 239 of file Livecache.h.

◆ reverse_iterator

template<class Allocator = std::allocator<char>>
using ripple::PeerFinder::Livecache< Allocator >::hops_t::reverse_iterator = boost::transform_iterator< Transform<false>, typename lists_type::reverse_iterator>

Definition at line 243 of file Livecache.h.

◆ const_reverse_iterator

template<class Allocator = std::allocator<char>>
using ripple::PeerFinder::Livecache< Allocator >::hops_t::const_reverse_iterator = boost::transform_iterator< Transform<true>, typename lists_type::const_reverse_iterator>

Definition at line 247 of file Livecache.h.

Constructor & Destructor Documentation

◆ hops_t()

template<class Allocator >
ripple::PeerFinder::Livecache< Allocator >::hops_t::hops_t ( Allocator const &  alloc)
explicitprivate

Definition at line 509 of file Livecache.h.

Member Function Documentation

◆ begin() [1/2]

template<class Allocator = std::allocator<char>>
iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::begin ( )

Definition at line 252 of file Livecache.h.

◆ begin() [2/2]

template<class Allocator = std::allocator<char>>
const_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::begin ( ) const

Definition at line 258 of file Livecache.h.

◆ cbegin()

template<class Allocator = std::allocator<char>>
const_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::cbegin ( ) const

Definition at line 264 of file Livecache.h.

◆ end() [1/2]

template<class Allocator = std::allocator<char>>
iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::end ( )

Definition at line 270 of file Livecache.h.

◆ end() [2/2]

template<class Allocator = std::allocator<char>>
const_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::end ( ) const

Definition at line 276 of file Livecache.h.

◆ cend()

template<class Allocator = std::allocator<char>>
const_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::cend ( ) const

Definition at line 282 of file Livecache.h.

◆ rbegin() [1/2]

template<class Allocator = std::allocator<char>>
reverse_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::rbegin ( )

Definition at line 288 of file Livecache.h.

◆ rbegin() [2/2]

template<class Allocator = std::allocator<char>>
const_reverse_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::rbegin ( ) const

Definition at line 294 of file Livecache.h.

◆ crbegin()

template<class Allocator = std::allocator<char>>
const_reverse_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::crbegin ( ) const

Definition at line 300 of file Livecache.h.

◆ rend() [1/2]

template<class Allocator = std::allocator<char>>
reverse_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::rend ( )

Definition at line 306 of file Livecache.h.

◆ rend() [2/2]

template<class Allocator = std::allocator<char>>
const_reverse_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::rend ( ) const

Definition at line 312 of file Livecache.h.

◆ crend()

template<class Allocator = std::allocator<char>>
const_reverse_iterator ripple::PeerFinder::Livecache< Allocator >::hops_t::crend ( ) const

Definition at line 318 of file Livecache.h.

◆ shuffle()

template<class Allocator >
void ripple::PeerFinder::Livecache< Allocator >::hops_t::shuffle ( )

Shuffle each hop list.

Definition at line 480 of file Livecache.h.

◆ histogram()

template<class Allocator >
std::string ripple::PeerFinder::Livecache< Allocator >::hops_t::histogram ( ) const

Definition at line 496 of file Livecache.h.

◆ insert()

template<class Allocator >
void ripple::PeerFinder::Livecache< Allocator >::hops_t::insert ( Element e)
private

Definition at line 516 of file Livecache.h.

◆ reinsert()

template<class Allocator >
void ripple::PeerFinder::Livecache< Allocator >::hops_t::reinsert ( Element e,
std::uint32_t  hops 
)
private

Definition at line 528 of file Livecache.h.

◆ remove()

template<class Allocator >
void ripple::PeerFinder::Livecache< Allocator >::hops_t::remove ( Element e)
private

Definition at line 545 of file Livecache.h.

Friends And Related Symbol Documentation

◆ Livecache

template<class Allocator = std::allocator<char>>
friend class Livecache
friend

Definition at line 343 of file Livecache.h.

Member Data Documentation

◆ m_lists

template<class Allocator = std::allocator<char>>
lists_type ripple::PeerFinder::Livecache< Allocator >::hops_t::m_lists
private

Definition at line 344 of file Livecache.h.

◆ m_hist

template<class Allocator = std::allocator<char>>
Histogram ripple::PeerFinder::Livecache< Allocator >::hops_t::m_hist
private

Definition at line 345 of file Livecache.h.