PcapPlusPlus  Next
PfRingDeviceList.h
Go to the documentation of this file.
1 #pragma once
2 
3 // GCOVR_EXCL_START
4 
5 #include "PfRingDevice.h"
6 #include "DeviceListBase.h"
7 
9 
12 namespace pcpp
13 {
17  class PfRingDeviceList : public internal::DeviceListBase<PfRingDevice>
18  {
19  private:
21 
22  std::vector<PfRingDevice*> m_PfRingDeviceListView;
23  std::string m_PfRingVersion;
24 
26 
27  public:
28  PfRingDeviceList(const PfRingDeviceList&) = delete;
29  PfRingDeviceList(PfRingDeviceList&&) noexcept = delete;
30  PfRingDeviceList& operator=(const PfRingDeviceList&) = delete;
31  PfRingDeviceList& operator=(PfRingDeviceList&&) noexcept = delete;
32 
36  {
37  static PfRingDeviceList instance;
38  return instance;
39  }
40 
43  const std::vector<PfRingDevice*>& getPfRingDevicesList() const
44  {
45  return m_PfRingDeviceListView;
46  }
47 
51  PCPP_DEPRECATED("Use `getDeviceByName`")
52  PfRingDevice* getPfRingDeviceByName(const std::string& devName) const;
53 
57  PfRingDevice* getDeviceByName(const std::string& devName) const;
58 
61  std::string getPfRingVersion() const
62  {
63  return m_PfRingVersion;
64  }
65  };
66 
67 } // namespace pcpp
68 
69 // GCOVR_EXCL_STOP
Definition: PfRingDevice.h:35
Definition: PfRingDeviceList.h:18
PfRingDevice * getPfRingDeviceByName(const std::string &devName) const
const std::vector< PfRingDevice * > & getPfRingDevicesList() const
Definition: PfRingDeviceList.h:43
std::string getPfRingVersion() const
Definition: PfRingDeviceList.h:61
static PfRingDeviceList & getInstance()
Definition: PfRingDeviceList.h:35
PfRingDevice * getDeviceByName(const std::string &devName) const
A base class for device lists, providing common functionality for managing a list of devices.
Definition: DeviceListBase.h:10
The main namespace for the PcapPlusPlus lib.