Skip to content

Added internal::DeviceListBase as a common base for device list classes. #1790

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

Merged
merged 7 commits into from
Apr 29, 2025

Conversation

Dimi1010
Copy link
Collaborator

Split of #1488

Overview of changes:

  • Added the base class internal::DeviceListBase that provides storage and common iterator API for a list of devices.
  • Converted PcapLiveDeviceList to utilize internal::DeviceListBase.

@Dimi1010 Dimi1010 changed the title Added internal::DeviceListBase as a common base for all device list classes. Added internal::DeviceListBase as a common base for device list classes. Apr 27, 2025
Copy link

codecov bot commented Apr 27, 2025

Codecov Report

Attention: Patch coverage is 80.76923% with 5 lines in your changes missing coverage. Please review.

Project coverage is 83.08%. Comparing base (e5f8ac6) to head (b7e9f47).
Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
Pcap++/src/PcapLiveDeviceList.cpp 78.26% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1790      +/-   ##
==========================================
+ Coverage   83.05%   83.08%   +0.03%     
==========================================
  Files         283      284       +1     
  Lines       48973    48981       +8     
  Branches    10333    10358      +25     
==========================================
+ Hits        40675    40698      +23     
+ Misses       7157     7140      -17     
- Partials     1141     1143       +2     
Flag Coverage Δ
alpine320 75.03% <71.42%> (-0.01%) ⬇️
fedora42 75.13% <66.66%> (-0.02%) ⬇️
macos-13 80.58% <76.92%> (-0.01%) ⬇️
macos-14 80.64% <76.92%> (+0.05%) ⬆️
macos-15 80.55% <76.92%> (-0.01%) ⬇️
mingw32 70.65% <55.00%> (-0.03%) ⬇️
mingw64 70.60% <55.00%> (-0.05%) ⬇️
npcap 85.00% <79.16%> (-0.01%) ⬇️
rhel94 74.92% <68.42%> (-0.01%) ⬇️
ubuntu2004 58.51% <56.25%> (-0.02%) ⬇️
ubuntu2004-zstd 58.65% <56.25%> (-0.02%) ⬇️
ubuntu2204 74.84% <68.42%> (-0.01%) ⬇️
ubuntu2204-icpx 61.47% <65.38%> (-0.04%) ⬇️
ubuntu2404 75.08% <70.00%> (+0.02%) ⬆️
ubuntu2404-arm64 75.07% <70.00%> (-0.01%) ⬇️
unittest 83.08% <80.76%> (+0.03%) ⬆️
windows-2019 85.02% <79.16%> (-0.01%) ⬇️
windows-2022 85.05% <79.16%> (-0.01%) ⬇️
winpcap 85.18% <79.16%> (+<0.01%) ⬆️
xdp 50.53% <42.10%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dimi1010 Dimi1010 marked this pull request as ready for review April 27, 2025 18:01
@Dimi1010 Dimi1010 requested a review from seladb as a code owner April 27, 2025 18:01
Copy link
Collaborator

@tigercosmos tigercosmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 26 to 28
using value_type = T*;
using size_type = std::size_t;
using difference_type = std::ptrdiff_t;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these typedefs? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly to mimic standard container. Originally there were other accessor methods beside the iterator, but I cut those from this PR, so they aren't used atm.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need them but I don't have a strong opinion so I'll let you decide

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can remove them and readd them later if needed.

@Dimi1010 Dimi1010 merged commit 964eab7 into seladb:dev Apr 29, 2025
43 checks passed
@Dimi1010 Dimi1010 deleted the refactor/device-list-base branch April 29, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants