PcapPlusPlus  24.09
PfRingDeviceList.h
Go to the documentation of this file.
1 #pragma once
2 
3 // GCOVR_EXCL_START
4 
5 #include <memory>
6 #include "PfRingDevice.h"
7 
9 
14 namespace pcpp
15 {
16 
23  {
24  private:
25  std::vector<std::unique_ptr<PfRingDevice>> m_PfRingDeviceList;
26  std::vector<PfRingDevice*> m_PfRingDeviceListView;
27  std::string m_PfRingVersion;
28 
30 
31  public:
32  PfRingDeviceList(const PfRingDeviceList&) = delete;
33  PfRingDeviceList(PfRingDeviceList&&) noexcept = delete;
34  PfRingDeviceList& operator=(const PfRingDeviceList&) = delete;
35  PfRingDeviceList& operator=(PfRingDeviceList&&) noexcept = delete;
36 
42  {
43  static PfRingDeviceList instance;
44  return instance;
45  }
46 
51  const std::vector<PfRingDevice*>& getPfRingDevicesList() const
52  {
53  return m_PfRingDeviceListView;
54  }
55 
61  PfRingDevice* getPfRingDeviceByName(const std::string& devName) const;
62 
67  std::string getPfRingVersion() const
68  {
69  return m_PfRingVersion;
70  }
71  };
72 
73 } // namespace pcpp
74 
75 // GCOVR_EXCL_STOP
Definition: PfRingDevice.h:35
Definition: PfRingDeviceList.h:23
PfRingDevice * getPfRingDeviceByName(const std::string &devName) const
const std::vector< PfRingDevice * > & getPfRingDevicesList() const
Definition: PfRingDeviceList.h:51
std::string getPfRingVersion() const
Definition: PfRingDeviceList.h:67
static PfRingDeviceList & getInstance()
Definition: PfRingDeviceList.h:41
The main namespace for the PcapPlusPlus lib.