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

WIP: An intrusive boilerplate-free Focus/EEPROM storage class #712

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noseglasses
Copy link
Collaborator

This is an example of how Focus/EEPROM handling of individual
parameters could be implemented in a non-boilerplate fashion.

A new header focus_eeprom.h contains two template classes
that allow to add Focus/EEPROM handling both to members of
base classes (ReferenceFocusEEPROMWrapper)
and to define new members in derived classes
(ValueFocusEEPROMWrapper).

Using the wrapper classes is intrusive in a sense that
it requires classes (plugins) to be modified to add
Focus/EEPROM capability.

Warning: The code compiles but was not thoroughly tested.
It is just meant as an example how things could
be done and a basis for discussion.

Signed-off-by: Florian Fleissner [email protected]

This is an example of how Focus/EEPROM handling of individual
parameters could be implemented in a non-boilerplate fashion.

A new header focus_eeprom.h contains two template classes
that allow to add Focus/EEPROM handling both to members of
base classes (ReferenceFocusEEPROMWrapper)
and to define new members in derived classes
(ValueFocusEEPROMWrapper).

Using the wrapper classes is intrusive in a sense that
it requires classes (plugins) to be modified to add
Focus/EEPROM capability.

Warning: The code compiles but was not thoroughly tested.
         It is just meant as an example how things could
         be done and a basis for discussion.

Signed-off-by: Florian Fleissner <[email protected]>
@noseglasses noseglasses changed the title An intrusive boilerplate-free Focus/EEPROM storage class WIP: An intrusive boilerplate-free Focus/EEPROM storage class Nov 6, 2019
@noseglasses noseglasses added the wip label Nov 6, 2019
@algernon
Copy link
Contributor

algernon commented Nov 6, 2019

Somewhat related: #344. I intended to rework storage a bit, but as a followup for #695, because it needs some more fleshing out. Something like that should make this kind of class simpler too.

I'm liking the direction this is going on a first look, by the way.

@obra obra marked this pull request as draft December 21, 2020 21:46
@algernon algernon removed the wip label Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants