-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate shared DeviceList functionality under a common base class. #1488
base: dev
Are you sure you want to change the base?
Conversation
- Deprecated `getPcapLiveDevicesList` in favor of the iteration API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Added iterator API - Added iterator type aliases. - Deprecated getPfRingDevicesList. - Updated calls to getPfRingDevicesList.
@tigercosmos added |
…-management Conflicts: Pcap++/header/PcapRemoteDeviceList.h Pcap++/src/PcapRemoteDeviceList.cpp
@Dimi1010 CI fails for some reason in generating the codecov report, and idea why? 🤔 |
I have the same issue in my MR I didn't touch to the code at all |
@clementperon gcovr also complains about a new file version when it compares the file to the file in
|
…-management # Conflicts: # Tests/Pcap++Test/Tests/LiveDeviceTests.cpp
@Dimi1010 although it's not a breaking change, it's a pretty big change that I'm not sure we should introduce just before the upcoming release. We already have a few deprecation and breaking changes... What do you think about waiting with this PR until the release? |
@seladb Sure, no problem. |
I'm also uncertain about the statement. Even if we don't include this in the upcoming release, the next one is likely to introduce even more breaking changes. |
I hope that we'll release the version more frequently than the existing one, so hopefully each version will include fewer API changes and breaking changes |
…-management # Conflicts: # Pcap++/src/PcapLiveDeviceList.cpp # Pcap++/src/PcapRemoteDeviceList.cpp # Tests/Pcap++Test/Tests/LiveDeviceTests.cpp
@seladb can we revisit this one for merge? |
Summary
This is a rework of #1431, parts 1 and 2.
The list classes now provide direct functions for iteration and fetching devices. The previous approach of retrieving another 'List' from a 'List' class was redundant and tied the internal implementation to it, making future changes more difficult.
Changes:
PointerVector:
PointerVector<T, Deleter>
.DeviceListBase:
DeviceListBase<DeviceType>
to implement common functionality shared among device lists.PointerVector<DeviceType>
member variable.at()
,front()
,back()
.begin()
,end()
,cbegin()
,cend()
.size()
,empty()
.Refactoring:
DeviceListBase
.RemoteDeviceList
, which is now superseded by the inherited iterator API fromDeviceListBase
.getPcap*DevicesList
methods, which have been superseded by the direct accessor methods provided byDeviceListBase
.Affected Lists:
PcapLiveDeviceList
PfRingDeviceList
DpdkDeviceList
Deprecated Methods: