xrpld
Loading...
Searching...
No Matches
xrpl::test::csf::CollectByNode< CollectorType > Struct Template Reference

Maintain an instance of a Collector per peer. More...

#include <collectors.h>

Collaboration diagram for xrpl::test::csf::CollectByNode< CollectorType >:

Public Member Functions

CollectorType & operator[] (PeerID who)
CollectorType const & operator[] (PeerID who) const
template<class E>
void on (PeerID who, SimTime when, E const &e)

Public Attributes

std::map< PeerID, CollectorType > byNode

Detailed Description

template<class CollectorType>
struct xrpl::test::csf::CollectByNode< CollectorType >

Maintain an instance of a Collector per peer.

For each peer that emits events, this class maintains a corresponding instance of CollectorType, only forwarding events emitted by the peer to the related instance.

CollectorType should be default constructible.

Definition at line 85 of file collectors.h.

Member Function Documentation

◆ operator[]() [1/2]

template<class CollectorType>
CollectorType & xrpl::test::csf::CollectByNode< CollectorType >::operator[] ( PeerID who)

Definition at line 90 of file collectors.h.

◆ operator[]() [2/2]

template<class CollectorType>
CollectorType const & xrpl::test::csf::CollectByNode< CollectorType >::operator[] ( PeerID who) const

Definition at line 96 of file collectors.h.

◆ on()

template<class CollectorType>
template<class E>
void xrpl::test::csf::CollectByNode< CollectorType >::on ( PeerID who,
SimTime when,
E const & e )

Definition at line 102 of file collectors.h.

Member Data Documentation

◆ byNode

template<class CollectorType>
std::map<PeerID, CollectorType> xrpl::test::csf::CollectByNode< CollectorType >::byNode

Definition at line 87 of file collectors.h.