Skip to content

mw/com: Various field fixes#373

Open
bemerybmw wants to merge 9 commits intomainfrom
brem_fix_fields
Open

mw/com: Various field fixes#373
bemerybmw wants to merge 9 commits intomainfrom
brem_fix_fields

Conversation

@bemerybmw
Copy link
Copy Markdown
Contributor

No description provided.

@bemerybmw bemerybmw force-pushed the brem_fix_fields branch 2 times, most recently from d8cb244 to df70c32 Compare April 30, 2026 15:07
@bemerybmw bemerybmw marked this pull request as ready for review April 30, 2026 16:09
Comment thread score/mw/com/impl/skeleton_field_test.cpp Outdated
Comment thread score/mw/com/impl/skeleton_field_test.cpp Outdated
Comment thread score/mw/com/impl/skeleton_field_test.cpp Outdated

typename InterfaceTrait::template Event<TestSampleType> some_event{*this, kEventName};
typename InterfaceTrait::template Field<TestSampleType> some_field{*this, kFieldName};
typename InterfaceTrait::template Field<TestSampleType, true> some_field{*this, kFieldName};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will also need tests somewhere for different combinations of setter / getter / notifier?

crimson11
crimson11 previously approved these changes May 11, 2026
typename SkeletonEvent<FieldType>::FieldOnlyConstructorEnabler{}),
field_name,
detail::EnableSetOnlyTag{}}
std::make_unique<SkeletonMethod<SetMethodSignature>>(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm maybe missing some context here ... and it is not an issue with your PR ... But does this ctor call of SkeletonMethod work? I just looked at the code in SkeletonMethod and it looks like it would register now this getter/setter under wrong name/type in the SkeletonBase?

bemerybmw added 9 commits May 11, 2026 14:19
These comments are redundant with the test names and tests themselves.
These comments are very likely to become out of date if these tests
change / are moved so we remove them.
We store the set and get method dispatches always as unique_ptrs which
are either nullptrs in case set / get is disabled or a pointer to a
valid binding. This allows us to avoid having constructors for each
combination of get / set.
Previously, IsSetHandlerRegistered would return true even if no handler
was registered but the setter was not enabled. The new name is
semantically clearer in this case.
The getter / setter methods don't register themselves with the
parent skeleton, rather the field registers itself. Therefore, the field
is also responsible for updating the reference to SkeletonBase in the
contained methods.
We pass true for the setter flag to test the creation of the setter
method binding in traits_test. Currently, this also creates the getter
method binding. In future, this will be enabled via a template
parameter.
- Extracts constants into global constant.
- Removes EXPECT_CALLS which are not part of the expectations of the
  test.
- Cleans up some given / when / then comments
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