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

SITL: Move the ENUM definition to the header file #27051

Conversation

muramura
Copy link
Contributor

ENUM definitions are not processes. There is a header file.
I think it would be better to move the definitions to the header file.

@amilcarlucas
Copy link
Contributor

This removes the benefit of encapsulation.

What is the advantage of this change?

@muramura
Copy link
Contributor Author

@amilcarlucas san.
I have defined the ENUM privately.
I think there are no benefits to defining the ENUM in the processing section.
You can obtain the definition through the editor.

@khancyr khancyr requested review from Ryanf55 and peterbarker June 3, 2024 07:55
@khancyr
Copy link
Contributor

khancyr commented Jun 3, 2024

@Ryanf55 @peterbarker I think you own this driver. So just need a decision here. I don't think it change anything, so mostly code style

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Jun 3, 2024

@amilcarlucas san. I have defined the ENUM privately. I think there are no benefits to defining the ENUM in the processing section. You can obtain the definition through the editor.

I agree, the benefit is encapsulation. These enums are an implementation detail, intended to be hidden from the higher level simulation code. I do not agree with moving the code out of an implementation detail. That would violate the interface segregation principal of SOLID design principal.

@khancyr
Copy link
Contributor

khancyr commented Jun 3, 2024

Then close this PR is !Thanks Muramura-san for bring this.

@khancyr khancyr closed this Jun 3, 2024
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.

4 participants