-
Notifications
You must be signed in to change notification settings - Fork 390
Use Pimpl approach for controller and hardware component interfaces #2898
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
base: master
Are you sure you want to change the base?
Use Pimpl approach for controller and hardware component interfaces #2898
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2898 +/- ##
==========================================
- Coverage 89.50% 89.45% -0.05%
==========================================
Files 155 156 +1
Lines 18534 18545 +11
Branches 1489 1486 -3
==========================================
+ Hits 16588 16589 +1
- Misses 1346 1347 +1
- Partials 600 609 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
left a comment
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, thanks!
| // check if node is initialized and we still have a valid context | ||
| if ( | ||
| node_.get() && | ||
| impl_->node_.get() && |
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.
Just for my knowledge, would impl_ ever become null ?
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.
Nope, it would never, it is initialied in the init or the constructor
| */ | ||
| HardwareComponentInterface(const HardwareComponentInterface & other) = delete; | ||
|
|
||
| HardwareComponentInterface(HardwareComponentInterface && other) = delete; |
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.
This is outside the scope of this PR. HardwareComponentInterface explicitly deletes move operations, but we don't have a similar setup in ControllerInterfaceBase. Would this be an issue because unique_ptr is moveable ?
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.
IIRC, it is done due to the rule of five in C++. We can check if that applies to the controller base class
Juliaj
left a comment
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.
I've updated with the Pimpl approach to protect the ABI stability in the future