Skip to content
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

feat(util): Add builder class for "chain" delegates #3696

Merged
merged 12 commits into from
Oct 9, 2024

Conversation

paulgessinger
Copy link
Member

@paulgessinger paulgessinger commented Oct 7, 2024

Related to #3502


This pull request introduces several enhancements and new features to the Delegate class and related utilities, focusing on improving functionality and adding new capabilities. The most important changes include the addition of requires clauses for better compile-time checks, new methods for connecting delegates, and the introduction of the DelegateChainBuilder class for building delegate chains.

Enhancements to Delegate Class:

  • Added requires clauses to various methods in the Delegate class to ensure compile-time checks for function signatures and ownership types. (Core/include/Acts/Utilities/Delegate.hpp) [1] [2] [3] [4]
  • Moved the kOwnership static member to the public section and added new type aliases for better readability. (Core/include/Acts/Utilities/Delegate.hpp)

New Features:

  • Introduced the DelegateChainBuilder class for constructing chains of delegates, allowing for more flexible and powerful delegate management. (Core/include/Acts/Utilities/DelegateChainBuilder.hpp)
  • Added unit tests for DelegateChainBuilder to ensure its functionality and correctness. (Tests/UnitTests/Core/Utilities/DelegateChainBuilderTests.cpp)
  • Updated CMakeLists to include the new unit tests for DelegateChainBuilder. (Tests/UnitTests/Core/Utilities/CMakeLists.txt)

Enhancements to OwningDelegate Class:

  • Added constructors to the OwningDelegate class to support default initialization and move construction from a Delegate. (Core/include/Acts/Utilities/Delegate.hpp)

@paulgessinger paulgessinger added this to the next milestone Oct 7, 2024
@github-actions github-actions bot added the Component - Core Affects the Core module label Oct 7, 2024
@paulgessinger paulgessinger mentioned this pull request Oct 2, 2024
Copy link

github-actions bot commented Oct 7, 2024

📊: Physics performance monitoring for 562341b

Full contents

physmon summary

@paulgessinger paulgessinger requested a review from andiwand October 7, 2024 15:50
andiwand
andiwand previously approved these changes Oct 9, 2024
Copy link

sonarqubecloud bot commented Oct 9, 2024

@kodiakhq kodiakhq bot merged commit 3d6f703 into acts-project:main Oct 9, 2024
42 checks passed
@github-actions github-actions bot removed the automerge label Oct 9, 2024
@acts-project-service acts-project-service added Fails Athena tests This PR causes a failure in the Athena tests Breaks Athena build This PR breaks the Athena build labels Oct 10, 2024
@paulgessinger paulgessinger modified the milestones: next, v37.1.0 Oct 16, 2024
Rosie-Hasan pushed a commit to Rosie-Hasan/acts that referenced this pull request Nov 13, 2024
Related to acts-project#3502

---

This pull request introduces several enhancements and new features to the `Delegate` class and related utilities, focusing on improving functionality and adding new capabilities. The most important changes include the addition of `requires` clauses for better compile-time checks, new methods for connecting delegates, and the introduction of the `DelegateChainBuilder` class for building delegate chains.

### Enhancements to `Delegate` Class:

* Added `requires` clauses to various methods in the `Delegate` class to ensure compile-time checks for function signatures and ownership types. (`Core/include/Acts/Utilities/Delegate.hpp`) [[1]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L160-R165) [[2]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L213-R230) [[3]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L237-L243) [[4]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L262-R272)
* Moved the `kOwnership` static member to the public section and added new type aliases for better readability. (`Core/include/Acts/Utilities/Delegate.hpp`)

### New Features:

* Introduced the `DelegateChainBuilder` class for constructing chains of delegates, allowing for more flexible and powerful delegate management. (`Core/include/Acts/Utilities/DelegateChainBuilder.hpp`)
* Added unit tests for `DelegateChainBuilder` to ensure its functionality and correctness. (`Tests/UnitTests/Core/Utilities/DelegateChainBuilderTests.cpp`)
* Updated CMakeLists to include the new unit tests for `DelegateChainBuilder`. (`Tests/UnitTests/Core/Utilities/CMakeLists.txt`)

### Enhancements to `OwningDelegate` Class:

* Added constructors to the `OwningDelegate` class to support default initialization and move construction from a `Delegate`. (`Core/include/Acts/Utilities/Delegate.hpp`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaks Athena build This PR breaks the Athena build Component - Core Affects the Core module Fails Athena tests This PR causes a failure in the Athena tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants