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

[#264] Fix accessability of 'FileDescriptorView' methods #530

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions iceoryx2-ffi/cxx/include/iox2/file_descriptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,7 @@ class FileDescriptorBased {

/// A view to a [`FileDescriptor`].
class FileDescriptorView : public FileDescriptorBased {
private:
template <ServiceType>
friend class WaitSet;
friend class FileDescriptor;
template <ServiceType>
friend class Listener;

explicit FileDescriptorView(iox2_file_descriptor_ptr handle);

public:
/// Returns a [`FileDescriptorView`] to the underlying [`FileDescriptor`].
auto file_descriptor() const -> FileDescriptorView override;

Expand All @@ -57,6 +49,15 @@ class FileDescriptorView : public FileDescriptorBased {
///
auto unsafe_native_handle() const -> int32_t;

private:
template <ServiceType>
friend class WaitSet;
friend class FileDescriptor;
template <ServiceType>
friend class Listener;

explicit FileDescriptorView(iox2_file_descriptor_ptr handle);

iox2_file_descriptor_ptr m_handle = nullptr;
};

Expand Down