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

Namespaced includes of libraries #358

Open
cerna opened this issue Jul 1, 2021 · 0 comments
Open

Namespaced includes of libraries #358

cerna opened this issue Jul 1, 2021 · 0 comments

Comments

@cerna
Copy link
Contributor

cerna commented Jul 1, 2021

This is part of tackling of issue #200, of which the progress can be followed in #349.

I think the public header files (as are installed on the system and used while compiling and linking executables and other libraries against the base one[s]) should be namespaced - so in the end these would be included as namespace/header.h|hh, for example hal/hal.h. I already implemented it for the base libraries as part of #349.

The main ideas behind it are:

  • It seems to be a standard practise with many projects using the workspace/superbuild (etc) approach are using
  • There are actually headers named the same way in the current Machinekit-HAL's sourcebase - namely the hal.h part of the HAL and the hal.h part of the XHC WBH04B-6 module. Machinekit-HAL should force only the uniqueness of the main names on the module creators, not how they name every file - in other words, the hal.h file should be fine without risk of any clashes
  • Using namespaces will also automatically signal to anybody who is reading the code on which other parts the source depends. (Without reading the build recipes.)
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

No branches or pull requests

1 participant