CatapultServer  v0.5.0.1 (Elephant)
PacketIoPickerContainer.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "PacketIoPicker.h"
23 #include <vector>
24 
25 namespace catapult { namespace net {
26 
29  public:
31  void insert(PacketIoPicker& picker, ionet::NodeRoles roles);
32 
35  std::vector<ionet::NodePacketIoPair> pickMatching(const utils::TimeSpan& ioDuration, ionet::NodeRoles roles) const;
36 
37  private:
38  std::vector<std::pair<ionet::NodeRoles, PacketIoPicker*>> m_pickers;
39  };
40 }}
PacketIoPickerContainer.h
catapult::utils::TimeSpan
Represents a time duration.
Definition: TimeSpan.h:30
PacketIoPicker.h
catapult::ionet::NodeRoles
NodeRoles
A node's role.
Definition: NodeRoles.h:28
catapult::net::PacketIoPickerContainer::insert
void insert(PacketIoPicker &picker, ionet::NodeRoles roles)
Inserts picker, which is compatible with the specified roles, into this container.
Definition: PacketIoPickerContainer.cpp:26
catapult::net::PacketIoPicker
An interface for picking packet io pairs.
Definition: PacketIoPicker.h:30
TimeSpan.h
catapult::net::PacketIoPickerContainer
A collection of packet io pickers.
Definition: PacketIoPickerContainer.h:28
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::net::PacketIoPickerContainer::m_pickers
std::vector< std::pair< ionet::NodeRoles, PacketIoPicker * > > m_pickers
Definition: PacketIoPickerContainer.h:38
catapult::net::PacketIoPickerContainer::pickMatching
std::vector< ionet::NodePacketIoPair > pickMatching(const utils::TimeSpan &ioDuration, ionet::NodeRoles roles) const
Definition: PacketIoPickerContainer.cpp:30