Skip to content

mw::com: Migrate from boolean enablers to struct Tags to enable Get/Set/Notify functionality in Fields.#357

Open
KrishaDeshkool wants to merge 10 commits into
eclipse-score:mainfrom
KrishaDeshkool:add_field_tags
Open

mw::com: Migrate from boolean enablers to struct Tags to enable Get/Set/Notify functionality in Fields.#357
KrishaDeshkool wants to merge 10 commits into
eclipse-score:mainfrom
KrishaDeshkool:add_field_tags

Conversation

@KrishaDeshkool
Copy link
Copy Markdown
Contributor

No description provided.

@KrishaDeshkool
Copy link
Copy Markdown
Contributor Author

Once the CI is green, i will make this PR open and can we reviewed.

@KrishaDeshkool KrishaDeshkool marked this pull request as ready for review April 27, 2026 09:40
@KrishaDeshkool KrishaDeshkool marked this pull request as draft April 28, 2026 07:34
Comment thread score/mw/com/impl/skeleton_field.h Outdated
Comment thread score/mw/com/impl/skeleton_field.h Outdated
@KrishaDeshkool KrishaDeshkool force-pushed the add_field_tags branch 7 times, most recently from e47f755 to a4a564f Compare May 4, 2026 14:18
Comment thread score/mw/com/impl/proxy_field.h Outdated
@KrishaDeshkool KrishaDeshkool force-pushed the add_field_tags branch 3 times, most recently from ef8184e to 1b49db2 Compare May 5, 2026 09:22
@KrishaDeshkool KrishaDeshkool force-pushed the add_field_tags branch 13 times, most recently from 37b7cfc to f51bb37 Compare June 1, 2026 13:28
@KrishaDeshkool KrishaDeshkool changed the title Add field tags mw::com: Migrate from boolean enablers to struct Tags to enable Get/Set/Notify functionality in Fields. Jun 1, 2026
@KrishaDeshkool KrishaDeshkool force-pushed the add_field_tags branch 2 times, most recently from 3f3d680 to 55b6611 Compare June 1, 2026 13:42
@KrishaDeshkool KrishaDeshkool marked this pull request as ready for review June 1, 2026 13:42
@KrishaDeshkool KrishaDeshkool requested a review from bemerybmw June 1, 2026 13:45
KrishaDeshkool and others added 10 commits June 2, 2026 17:09
The new order allows us to set the bindings to nullptrs by default for
test only constructors. This will be useful for fields which will
require optionally inserting get / set bindings. We change all
constructors so that they're all consistent.
- Use a single test constructor which creates the get / set methods
  according to the provided bindings. This allows us to remove the
  test-only constructor overloads for each template arg combination.
- Always store the get / set method dispatches as unique_ptrs even if
  they're not enabled (when disabled, they'll simply be nullptrs). This
  allows us to have a single private constructor which always accepts
  unique_ptrs (which may be valid or nullptrs).
…nitions

Introduce field_tags.h with tag structs (WithGetter, WithSetter,
WithNotifier) and the contains_type / is_tag_enabled SFINAE utilities.
Re-export the tags through types.h and wire the BUILD dependency.
Change forward and friend declarations of ProxyField and SkeletonField
from fixed bool parameters to variadic typename... packs. Replaces the
eight explicit ProxyField friend specializations with a single template friend.
Replace the fixed bool EnableSet/EnableNotifier template parameters
with a variadic Tags... pack. WithGetter, WithSetter, WithNotifier
tag structs control which API is enabled/disabled via SFINAE.
Adapt all test interfaces, test fixtures, and integration helpers to
use the new WithGetter/WithSetter/WithNotifier tag syntax instead of
bare ProxyField<T> or SkeletonField<T, bool, bool>.
Add field_tags_test.cpp for is_tag_enabled and contains_type traits.
Extend proxy_field_test.cpp to verify that notifier methods are only
callable with WithNotifier, Get() with WithGetter, Set() with WithSetter.
…sent

Remove the ASSERT_PRD that required proxy_event_base_dispatch to be
non-null. When the field's tag pack does not include WithNotifier the
production ctor passes nullptr for the event dispatch, which is valid
because the notifier surface is SFINAE-removed.
SkeletonField became SkeletonField<T, Tags...> in the tag introduction
commit. NamedSkeletonFieldMock must carry the same Tags... so that
InjectFieldMock can dynamic_cast to the correct specialisation.
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.

3 participants