Skip to content

[#264] address last IOX_TODOs in C++ language binding #696

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

Merged
merged 22 commits into from
Apr 23, 2025

Conversation

elfenpiff
Copy link
Contributor

@elfenpiff elfenpiff commented Apr 23, 2025

Notes for Reviewer

Pre-Review Checklist for the PR Author

  • Add sensible notes for the reviewer
  • PR title is short, expressive and meaningful
  • Consider switching the PR to a draft (Convert to draft)
    • as draft PR, the CI will be skipped for pushes
  • Relevant issues are linked in the References section
  • Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  • Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  • Commits messages are according to this guideline
  • Tests follow the best practice for testing
  • Changelog updated in the unreleased section including API breaking changes
  • Assign PR to reviewer
  • All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  • All open points are addressed and tracked via issues

References

Closes #264

@elfenpiff elfenpiff self-assigned this Apr 23, 2025
@elfenpiff elfenpiff requested review from Copilot and orecham April 23, 2025 12:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses the remaining TODOS by removing IOX_TODO() stubs and providing concrete implementations for missing functionality across multiple modules. Key changes include:

  • Implementation of functions for dynamic configuration, subscriber buffer sizes, and attribute set operations.
  • Removal of obsolete assertion includes with corresponding updates to include the correct headers.
  • Refactoring of various classes (e.g., AttributeSetView, PortFactoryPublishSubscribe, StaticConfig) to improve ownership semantics and interface consistency.

Reviewed Changes

Copilot reviewed 40 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
iceoryx2-ffi/cxx/src/dynamic_config_publish_subscribe.cpp Implements publisher and subscriber count methods.
iceoryx2-ffi/cxx/src/dynamic_config_event.cpp Implements listener and notifier count methods.
iceoryx2-ffi/cxx/src/attribute_set.cpp Implements attribute lookup and conversion functions; adds to_owned() method.
iceoryx2-ffi/cxx/include/iox2/subscriber.hpp Replaces IOX_TODO() with actual buffer_size implementation.
iceoryx2-ffi/cxx/include/iox2/static_config_publish_subscribe.hpp Updates include dependencies for attribute sets.
iceoryx2-ffi/cxx/include/iox2/static_config_event.hpp Updates include dependencies for attribute sets.
iceoryx2-ffi/cxx/include/iox2/static_config.hpp Introduces move semantics and proper resource release.
iceoryx2-ffi/cxx/include/iox2/service_name.hpp Updates friend declarations for expanded functionality.
iceoryx2-ffi/cxx/include/iox2/service_id.hpp Declares new getters replacing stubs.
iceoryx2-ffi/cxx/include/iox2/port_factory_publish_subscribe.hpp Provides implementations for name, service_id, dynamic_config, and node listing functions.
iceoryx2-ffi/cxx/include/iox2/port_factory_event.hpp Updates service_id and dynamic_config functions to return values.
Various node_* and internal headers Updates friend callbacks to reference internal::list_callback and provides complete implementations.
iceoryx2-ffi/cxx/include/iox2/dynamic_config_publish_subscribe.hpp & dynamic_config_event.hpp Removes IOX_TODO() and declares concrete function implementations.
iceoryx2-ffi/cxx/include/iox2/attribute_set.hpp Refactors AttributeSetView and introduces the owning AttributeSet class.
Files not reviewed (1)
  • iceoryx2-ffi/cxx/CMakeLists.txt: Language not supported

@elfenpiff elfenpiff changed the title [#264] address last todos [#264] address last IOX_TODOs in C++ language binding Apr 23, 2025
@elfenpiff elfenpiff force-pushed the iox2-264-address-last-todos branch from f86af5a to 928b22c Compare April 23, 2025 12:59
Copy link
Contributor

@orecham orecham left a comment

Choose a reason for hiding this comment

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

Functionality is fine. Just some findings on code cleanliness/style.

@elfenpiff elfenpiff requested review from orecham and Copilot April 23, 2025 16:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR resolves the remaining IOX_TODO items in the C++ language binding by replacing placeholders with real implementations and updating APIs for consistency. Key changes include:

  • Implementing get_key_value_len and get_key_value_at functions in AttributeSetView.
  • Replacing IOX_TODO placeholders in Subscriber and PortFactory classes with concrete implementations.
  • Updating API function names and signatures for service identifier and dynamic configuration.

Reviewed Changes

Copilot reviewed 42 out of 43 changed files in this pull request and generated no comments.

Show a summary per file
File Description
iceoryx2-ffi/cxx/src/attribute_set.cpp Replaced IOX_TODO placeholders and updated constructor parameter type for AttributeSetView.
iceoryx2-ffi/cxx/include/iox2/subscriber.hpp Implemented the buffer_size() function by replacing the placeholder.
iceoryx2-ffi/cxx/include/iox2/port_factory_publish_subscribe.hpp Replaced IOX_TODO placeholders in name(), service_id(), dynamic_config(), and nodes().
iceoryx2-ffi/cxx/include/iox2/static_config.hpp Added move constructor, destructor, assignment operators and drop() function.
iceoryx2-ffi/cxx/include/iox2/service_id.hpp Replaced IOX_TODO placeholders with method declarations (renamed as_str() to c_str()).
Other files Updated include directives and added necessary headers to support the new functionality.
Files not reviewed (1)
  • iceoryx2-ffi/cxx/CMakeLists.txt: Language not supported
Comments suppressed due to low confidence (2)

iceoryx2-ffi/cxx/src/attribute_set.cpp:30

  • The constructor parameter type for AttributeSetView has changed from iox2_attribute_set_h_ref to iox2_attribute_set_ptr; ensure that this change is consistently reflected in all usages and that the pointer semantics are well documented.
AttributeSetView::AttributeSetView(iox2_attribute_set_ptr handle)

iceoryx2-ffi/cxx/include/iox2/service_id.hpp:27

  • The method for retrieving the service identifier has been renamed from as_str() to c_str() to align with standard naming conventions; please verify that the updated naming is applied uniformly in the codebase.
auto c_str() const -> const char*;

orecham
orecham previously approved these changes Apr 23, 2025
@elfenpiff elfenpiff force-pushed the iox2-264-address-last-todos branch from 328806f to ad96149 Compare April 23, 2025 17:49
@elfenpiff elfenpiff requested a review from orecham April 23, 2025 18:03
@elfenpiff elfenpiff merged commit 16a78c2 into eclipse-iceoryx:main Apr 23, 2025
51 of 52 checks passed
@elfenpiff elfenpiff deleted the iox2-264-address-last-todos branch April 23, 2025 22:34
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.

Create C++ language binding
2 participants