-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_channel: Rework inheritance to avoid SiblingCast
Change pw_channel to a new inheritance pattern that places AnyChannel in the middle of the hierarchy. The various Channel API classes are private empty bases of AnyChannel. This ensures conversions between compatible Channel variants are valid, since all channel implementations have all channel variants as bases. Channel implementations extend a ChannelImpl with properties specified in template parameters, and unsupported functions are automatically disabled. This change also refactors and simplifies the channel.h header. Properties and code for checking them are moved to a properties.h header. Also, the macros to generate ChannelImpl specializations are greatly simplified. Change-Id: Ib48bca41ec63ac107bf703b2102f03e9d6cd0347 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/247732 Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: Taylor Cramer <cramertj@google.com> Commit-Queue: Wyatt Hepler <hepler@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
- Loading branch information
Showing
21 changed files
with
584 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.